Thold current value empty / Last value displays n/a

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
maromero
Posts: 4
Joined: Mon Jul 30, 2012 12:01 pm

Thold current value empty / Last value displays n/a

Post by maromero »

Hi, i am using CACTI Version 0.8.7i , and Thold 0.4.9 (by Jimmy Conner)

I have setup thold for the following graphs also thold is unable to find Current/Last value and in Last Value tab ,inside threshold it shows n/a.
In the thold status tab, the "current" value collumn is empty, and thold never trigger.

Hope you can help me. Thanks in advance.
Max
Attachments
Last value : n/a
Last value : n/a
2012-07-30 13-12-12.png (13.15 KiB) Viewed 4957 times
Thold current empty
Thold current empty
2012-07-30 13-06-34.png (13.18 KiB) Viewed 4957 times
maromero
Posts: 4
Joined: Mon Jul 30, 2012 12:01 pm

Re: Thold current value empty / Last value displays n/a

Post by maromero »

I noticed something weird in the thold table

no value (NULL) for the field lastread and lasttime

How can I check that the current value in mysql ?
Any way to check if the thold table is updated correctly ?

Thanks !
Attachments
myqld thold
myqld thold
2012-08-01 16-14-02.png (30.27 KiB) Viewed 4931 times
maromero
Posts: 4
Joined: Mon Jul 30, 2012 12:01 pm

Re: Thold current value empty / Last value displays n/a

Post by maromero »

maromero wrote:I noticed something weird in the thold table

no value (NULL) for the field lastread and lasttime

I did a list from the thold_data table and noticed that "lasttime" for every entry is 0000-00-00 00:00:00. The last read and oldvalue columns aren't updating as well. What can I check next?


How can I check that the current value in mysql ?
Any way to check if the thold table is updated correctly ?

Thanks !
maromero
Posts: 4
Joined: Mon Jul 30, 2012 12:01 pm

Re: Thold current value empty / Last value displays n/a

Post by maromero »

no solution to my issue ?
no idea ?
barmaley
Posts: 1
Joined: Sun Aug 12, 2012 3:20 am

Re: Thold current value empty / Last value displays n/a

Post by barmaley »

I have the same problem.
Somebody, please help!:)
speedieg
Posts: 2
Joined: Mon Sep 24, 2012 10:53 am

Re: Thold current value empty / Last value displays n/a

Post by speedieg »

I would be interested in a solution for this as well. Same problem here, 0.8.8a and thold 0.4.9
besclavon
Posts: 3
Joined: Tue Oct 23, 2012 12:06 pm

Re: Thold current value empty / Last value displays n/a

Post by besclavon »

I have this issue too. The source of my problem is that I am running a centralized cacti server and instead of polling directly via SNMP or scripts, I am ssh+rsyncing the files to the central server. Because of this, many of my data files are "inactive" data sources. I read online that thold and the poller do not run when the data source is active, making the current value null. Some one else correct me if I'm wrong. Also, use the command rrdtool --info /your/rrd/file to be sure the actual rrd has the corrent ds info and is being updated.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Thold current value empty / Last value displays n/a

Post by cigamit »

besclavon wrote:I have this issue too. The source of my problem is that I am running a centralized cacti server and instead of polling directly via SNMP or scripts, I am ssh+rsyncing the files to the central server. Because of this, many of my data files are "inactive" data sources. I read online that thold and the poller do not run when the data source is active, making the current value null. Some one else correct me if I'm wrong. Also, use the command rrdtool --info /your/rrd/file to be sure the actual rrd has the corrent ds info and is being updated.
Yes, thold gets it data directly from the poller as it polls, so it is not going to work in your situation and there is no real work around. Making thold pull directly from the rrdfiles can kill a host if you have a vast amount of thresholds (disk i/o).
besclavon
Posts: 3
Joined: Tue Oct 23, 2012 12:06 pm

Re: Thold current value empty / Last value displays n/a

Post by besclavon »

ok, so I am currently thinking/working on a hack. I only have a couple hundred graphs and this is a dedicated machine, so disk I/O is no big deal. if it is, I will run a ramdisk with the files on it and/or SSDs if need be. I am thinking about trying to run my own php snippet to inject data into the mysql db based off of me using the php rrdtool class and accessing the data from the file directly. the psuedo code is something like below...

$res = SELECT * FROM hosts where active=true
foreach ($res as $thisHost){
$opts = array ( "AVERAGE", '--start', '-1d');
$arrDataPoints=rrd_fetch('/my/rrd/file/location.rrd', $opts, count($opts));
$lastds=$arrDataPoints['data'][0];
$sql="update hostTable set current='$lastds';
}

Do you have any advice on whether this is possible before I waste too many man hours via trial and error? Will the thold checks occur in the plugin routine if I make the last and current data "automagically" appear in the DB? or is the plugin passed the queue of thresholds to check from the poller itself (or accesses its object list)? in other words, should I hack the poller to add in my file based polls or hack the plugin? I am trying to keep the existing code base as stock as possible.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Thold current value empty / Last value displays n/a

Post by cigamit »

If I was to do it, I would just loop through all the thresholds, determine the rrdfile for each, pull the data and feed the data into

thold_poller_output ($rrd_update_array)

You would need to determine the formatting of the $rrd_update_array.

And once that is done, just run
thold_check_all_thresholds ();

Maybe in the future, I can add a "Manual Pull" checkbox that will make it pull that data directly from RRD.
besclavon
Posts: 3
Joined: Tue Oct 23, 2012 12:06 pm

Re: Thold current value empty / Last value displays n/a

Post by besclavon »

sounds good. I seem to read a lot about centralizing cacti is one of its weak points if you dont want to open up SNMP or ssh to poll directly. From a security standpoint, I would much rather open up a ssh session and transfer my data through so that no servers are listening. If everything works as planned, I will upload my source (or link to it) when I am done so that others can use it if desired. Plus, I have some composite RRDs from other RRDs using CDEFs and i have no way to monitor them either (known to me) without being able to hit a RRD file directly.

thanks for the pointers.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest