Force polling some selected graphs even host down
Moderators: Developers, Moderators
-
- Posts: 1
- Joined: Fri Feb 05, 2010 10:11 am
Force polling some selected graphs even host down
Not sure if anyone has requested this feature before. It would be very useful if there is an option to allow poller polling some graphs even host is down.
For example, Advance Ping will show the gaps rather than show the red bar when the host is down. When caculate the packet loss, it's not really accurate. If Cacti allow the users to force Advance Ping script running when the host is down, the ping will catch the packet loss and include that in the caculation.
In addition, when we look at the gaps in graph right now, we have to wonder if the host was down, or there was something wrong with the poller. If we allow force polling and seeing the gaps in the graph, we will know that's something to do with the poller.
If this can be included in the furture version, that will be excellent!
For example, Advance Ping will show the gaps rather than show the red bar when the host is down. When caculate the packet loss, it's not really accurate. If Cacti allow the users to force Advance Ping script running when the host is down, the ping will catch the packet loss and include that in the caculation.
In addition, when we look at the gaps in graph right now, we have to wonder if the host was down, or there was something wrong with the poller. If we allow force polling and seeing the gaps in the graph, we will know that's something to do with the poller.
If this can be included in the furture version, that will be excellent!
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
That's exactly would should happen when "downed host detection" is deactivated.mcbarlo wrote:I turned off availability check for device but now all graphs for this device are graphed even this host is down.
No. I do not understand which sense it makes to graph certain graphs even when the host is down. All of them should show "NaN", thenCan I turn on polling for specific graph when host is down?
R.
For example in Advenced Ping when host is down I have blank gaps instead of red bar. This is the same situation described in first post.No. I do not understand which sense it makes to graph certain graphs even when the host is down. All of them should show "NaN", then
I have hosts with Advenced Ping graphs and many other. I would like to enable polling for Advenved Ping graphs only when host is down.
This will be great for me and maybe for someone other too.
Re: Force polling some selected graphs even host down
mcbarlo,
did you find any solution for your problem?
I have exactly the same and I'm wondering why Developer does not understand it.
I want both:
1. working host availability check
2. Proper data graphed in Advanced Ping (red bars instead of gaps)
did you find any solution for your problem?
I have exactly the same and I'm wondering why Developer does not understand it.
I want both:
1. working host availability check
2. Proper data graphed in Advanced Ping (red bars instead of gaps)
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Force polling some selected graphs even host down
Making red bars appear in Adv. Ping should be done by changing the Graph Template to mark NaN as red. Still I stand by my opinion, that polling a device that's down is bad
R.
R.
Re: Force polling some selected graphs even host down
Errr... bump
I have a script that pings my devices.
If they don't respond to SNMP, i don't want most of the graphs created, but I DO want the ping graphs to be made. That's because the device can respond to ping but not to SNMP.
I will probably implement a dirty little hack, but it would be nice to have it as a mainline feature.
Just did it. It's a spine patch, poller.c
It doesn't poll for SNMP but it executes script/script server queries. At least I hope it's correct.
WARNING: I make no guarantees that it won't screw up your box, so use it with caution!
I have a script that pings my devices.
If they don't respond to SNMP, i don't want most of the graphs created, but I DO want the ping graphs to be made. That's because the device can respond to ping but not to SNMP.
I will probably implement a dirty little hack, but it would be nice to have it as a mainline feature.
Just did it. It's a spine patch, poller.c
It doesn't poll for SNMP but it executes script/script server queries. At least I hope it's correct.
WARNING: I make no guarantees that it won't screw up your box, so use it with caution!
Code: Select all
--- poller.backup.c 2011-04-05 01:20:25.000000000 +0300
+++ poller.c 2011-04-05 01:22:40.000000000 +0300
@@ -534,7 +534,7 @@
}
/* do the reindex check for this device if not script based */
- if ((!device->ignore_device) && (device_id)) {
+ if (device_id) {
if ((result = db_query(&mysql, query4)) != 0) {
num_rows = mysql_num_rows(result);
@@ -845,10 +845,13 @@
SPINE_LOG_MEDIUM(("Device[%i] TH[%i] NOTE: There are '%i' Polling Items for this Device", device_id, device_thread, num_rows));
i = 0;
- while ((i < num_rows) && (!device->ignore_device)) {
+ while (i < num_rows) {
switch(poller_items[i].action) {
+
case POLLER_ACTION_SNMP: /* raw SNMP poll */
- /* initialize or reinitialize snmp as required */
+ if (!device->ignore_device)
+ {
+ /* initialize or reinitialize snmp as required */
if (!device->snmp_session) {
last_snmp_port = poller_items[i].snmp_port;
last_snmp_version = poller_items[i].snmp_version;
@@ -1027,7 +1030,8 @@
snprintf(snmp_oids[num_oids].oid, sizeof(snmp_oids[num_oids].oid), "%s", poller_items[i].arg1);
snmp_oids[num_oids].array_position = i;
num_oids++;
-
+ }
+
break;
case POLLER_ACTION_SCRIPT: /* execute script file */
poll_result = exec_poll(device, poller_items[i].arg1);
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs
Re: Force polling some selected graphs even host down
Understood. Could you expand on or link to some where please explaining how actually graph NaN like this (finding it little hard to search for it with all the "help my graph returns nan!" threads).gandalf wrote:Making red bars appear in Adv. Ping should be done by changing the Graph Template to mark NaN as red. Still I stand by my opinion, that polling a device that's down is bad
R.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Force polling some selected graphs even host down
The aforementioned change will never be incorporated into mainline. I agree, you do not poll unreachable hosts. You instead highlight this state on the graph as 'unknown' data. I'm not sure that this is how the Advanced Ping works. It's been too many years.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Force polling some selected graphs even host down
I think you misunderstood me. I agree with you. I was wondering how to show Nan data on the graph! Sussed it now though
For the people who find this thread wondering how, basically...
Create a CDEF with a custom string, in the case of the Advanced Ping = d,UN,INF,UNKN,IF
This turns it in to a number (infinity) which you can then graph as an area
The section "Example: You suspect to have problems and want to see unknown data." on http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html explains!
For the people who find this thread wondering how, basically...
Create a CDEF with a custom string, in the case of the Advanced Ping = d,UN,INF,UNKN,IF
This turns it in to a number (infinity) which you can then graph as an area
The section "Example: You suspect to have problems and want to see unknown data." on http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html explains!
Re: Force polling some selected graphs even host down
Sorry to resurrect this ancient thread but.....
Have to agree on this one, allowing graphs to be selectively polled when a device is down would be really useful.
This is so that you can get actual availability data from cacti, otherwise the NaNs get lost into the rra's as they get less granular and you seriously start to lose data where the rra is rebuilt around the NAN value which in the case of availability data is a concern :s
This by the way is most useful for tools such as ReportIT where losing data like this makes the calculations wrong
Have to agree on this one, allowing graphs to be selectively polled when a device is down would be really useful.
This is so that you can get actual availability data from cacti, otherwise the NaNs get lost into the rra's as they get less granular and you seriously start to lose data where the rra is rebuilt around the NAN value which in the case of availability data is a concern :s
This by the way is most useful for tools such as ReportIT where losing data like this makes the calculations wrong
Re: Force polling some selected graphs even host down
So I don't sound dumb here.... :p
I agree that polling a downed device is usually not a good idea! However there is a circumstance when it is very useful.
For instance, given a graph based on mURLin URL availability. The input to RRDTool is 100 for url is up. 0 for url is down.
That works great while the host is up, however if the host goes down, availability of the URL should be 0. However on the graph as the values are NaN's the availability still stays at 100% when calculated.
The only way I can see around this is to either implement COMPUTE, where I believe we could override the inputs to RRDTool (correct if I'm wrong there, I've just been reading up on this so quite new to me) or allow a datasource to be updated even if the attached host is down.
This has only come up due to me looking into oddities in mURLin availability. Initially I thought I could get around this using ReportIT but since some of the NaNs get lost in the RRAs as they get less granular you get weird results :s
Also this has stuck a spanner in the works for an availability plugin I was working on, using the same premise as mURLin! Doh!
If there is any interest in this let me know and I can look into it, however if it is something you REALLY don't want to have implemented then would a plugin hook be out of the question? Not sure where it could go at the moment though...
I agree that polling a downed device is usually not a good idea! However there is a circumstance when it is very useful.
For instance, given a graph based on mURLin URL availability. The input to RRDTool is 100 for url is up. 0 for url is down.
That works great while the host is up, however if the host goes down, availability of the URL should be 0. However on the graph as the values are NaN's the availability still stays at 100% when calculated.
The only way I can see around this is to either implement COMPUTE, where I believe we could override the inputs to RRDTool (correct if I'm wrong there, I've just been reading up on this so quite new to me) or allow a datasource to be updated even if the attached host is down.
This has only come up due to me looking into oddities in mURLin availability. Initially I thought I could get around this using ReportIT but since some of the NaNs get lost in the RRAs as they get less granular you get weird results :s
Also this has stuck a spanner in the works for an availability plugin I was working on, using the same premise as mURLin! Doh!
If there is any interest in this let me know and I can look into it, however if it is something you REALLY don't want to have implemented then would a plugin hook be out of the question? Not sure where it could go at the moment though...
Who is online
Users browsing this forum: No registered users and 0 guests