track downtime?

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
rwolverine
Posts: 30
Joined: Thu Feb 16, 2012 7:37 am

track downtime?

Post by rwolverine »

Is there a plugin that archives when downtimes occur? Monitor seems to only store the last failure date/time. I'm finding myself in need of a monthly or weekly graph for response failures.

Thanks for replying, i'm having trouble finding the keyword to search for.
artagel
Cacti User
Posts: 226
Joined: Wed May 21, 2008 11:33 pm

Re: track downtime?

Post by artagel »

Thold does this.
Please mark the topic solved if this resolves your problem.
rwolverine
Posts: 30
Joined: Thu Feb 16, 2012 7:37 am

Re: track downtime?

Post by rwolverine »

Thold seems to in the fact that you will recieve Email messages that you could then tally yourself and make graphs.

I'm looking for a something that will track and allow for reporting on outtages per month with duration and things of that nature.
victorantunes
Cacti User
Posts: 111
Joined: Fri Sep 28, 2012 6:52 pm

Re: track downtime?

Post by victorantunes »

Let me see if I understand this.

Uptime prints whenever the device is responding.
Now, you want actual visual information displaying when the device was down, instead of simply searching for empty stuff in the Uptime graph.

If that is what you want, then you could make a graph template to display downtimes by going through a not-so-complicated logic.

Not long ago I built one (not really useful really, was more like of an exercise test) that shows whenever a device is available.

Use the udc/net uptime data source and build a CDEF that, whenever exists a value, the graph displays 1, and displays 0 whenever there's no data.

See attached image, orange graph. I based it off the Generic Uptime template, but the result should be the same for the ucd/net Uptime.

CDEF:

Code: Select all

CURRENT_DATA_SOURCE,1,GT,1,0,IF
Now, modifying it to instead show downtimes instead of uptimes is only a matter of messing a little with the CDEF. Should be easy, really.

I can try it later and post the results if you're not too familiar with it.

Hope it helps, and also hope I understood your question right, otherwise I'll just look like a fool :P
Attachments
avail.png
avail.png (29.39 KiB) Viewed 5590 times
victorantunes
Cacti User
Posts: 111
Joined: Fri Sep 28, 2012 6:52 pm

Re: track downtime?

Post by victorantunes »

So I did some little tweaking and achieved something I didn't expect to.

Would this be something like what you want?

Yes, I only powered up my machine a few times last week, and for only a few hours each time.
Attachments
Uptime + downtime in percentage.
Uptime + downtime in percentage.
availability.png (16.49 KiB) Viewed 5587 times
artagel
Cacti User
Posts: 226
Joined: Wed May 21, 2008 11:33 pm

Re: track downtime?

Post by artagel »

The reason I mentioned THOLD is because it has a history button that let's you see the history of downtimes. But it doesn't provide a graph like you would like.
Smokeping could probably do that well for you too.
-Dan
Please mark the topic solved if this resolves your problem.
rwolverine
Posts: 30
Joined: Thu Feb 16, 2012 7:37 am

Re: track downtime?

Post by rwolverine »

I realise now that I should share these devices are being monitored via ping, they are not SNMP enabled and I'm not graphing them only using monitor to alert me when they go down.

Sounds like I need to start graphing them before i can use either recomendation.

Thanks for the help guys! I know i'm only using about 2% of Cacti's capabilities.
rwolverine
Posts: 30
Joined: Thu Feb 16, 2012 7:37 am

Re: track downtime?

Post by rwolverine »

Okay, got my graph working correctly now. How do I apply this CDEF?
User avatar
enrigama
Posts: 1
Joined: Sat Jul 07, 2018 2:26 pm

Re: track downtime?

Post by enrigama »

victorantunes wrote: Mon Oct 01, 2012 2:18 pm Let me see if I understand this.

Uptime prints whenever the device is responding.
Now, you want actual visual information displaying when the device was down, instead of simply searching for empty stuff in the Uptime graph.

If that is what you want, then you could make a graph template to display downtimes by going through a not-so-complicated logic.

Not long ago I built one (not really useful really, was more like of an exercise test) that shows whenever a device is available.

Use the udc/net uptime data source and build a CDEF that, whenever exists a value, the graph displays 1, and displays 0 whenever there's no data.

See attached image, orange graph. I based it off the Generic Uptime template, but the result should be the same for the ucd/net Uptime.

CDEF:

Code: Select all

CURRENT_DATA_SOURCE,1,GT,1,0,IF
Now, modifying it to instead show downtimes instead of uptimes is only a matter of messing a little with the CDEF. Should be easy, really.

I can try it later and post the results if you're not too familiar with it.

Hope it helps, and also hope I understood your question right, otherwise I'll just look like a fool :P
Hi! Almost 10 years later... THANKS A LOT! This trick is awesome! Because CDEF Funtions are not may type of options to graph.

Use:
1. GENERIC SNMP OID graph template.
2. Set any OID (like CPU, or RAM USED, etc...)
3. Config the CDEF function.
4. SET the CDEF funtion in the graph template.
5. Create a new graph.
6. ENJOY!
KhalidSiddig
Posts: 2
Joined: Mon May 13, 2024 7:50 am

Re: track downtime?

Post by KhalidSiddig »

victorantunes wrote: Mon Oct 01, 2012 4:14 pm So I did some little tweaking and achieved something I didn't expect to.

Would this be something like what you want?

Yes, I only powered up my machine a few times last week, and for only a few hours each time.
can u please attach this template updated for cacti version 1.2.23.
User avatar
macan
Cacti Guru User
Posts: 1106
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: track downtime?

Post by macan »

I wrote small plugin for this. https://github.com/xmacan/plugin_uptime/


I have a feeling it has some bug now, it's acting weird for some devices, but it should work
Let the Cacti grow!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests