Thold 2.x - Thresholding/Alerting module for cacti 8.6

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Locked
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Hi,
I fresh install cacti and plug-in arch. and finally thold.
I set thold values , mail etc.
I check that thold work or not.
I can see triggered tholds.
Altough thold alarms occur I can't get notification e-mail.
here is the some output:
I can get test e-mail and test mail popup
Altough test e-mail works, I can't get notification e-mail.
here is some output:
[root@cacti-test bin]# ./php /www/htdocs/cacti/plugins/thold/check-thold.php /show 7debug
01/03/2006 04:13:40 PM - THOLD: Poller[0] Checking Thresholds
Checking Threshold : "M_2D_7507 - Traffic - 10.200.99.9 - PO6/0/0"
Data Source : traffic_in went above threshold of 2800000 with 2878050
Checking Threshold : "M_2D_7507 - Traffic - 10.200.99.9 - PO6/0/0"
Data Source : traffic_out went below threshold of 3000000 with 2216481
Checking Threshold : "M_2D_7507 - Traffic - 10.151.34.1 - PO5/0/0"
Data Source : traffic_in went above threshold of 25000 with 199800
Checking Threshold : "M_2D_7507 - Traffic - 10.151.34.1 - PO5/0/0"
Data Source : traffic_out went above threshold of 250000 with 278300
This is pop-up output:
Checking Configuration...
Method: PHP's Mailer Class
Creating Message Text...


This is a test message generated from Cacti. This message was sent to test the configuration of your Mail Settings.

Your email settings are currently set as follows

Method: SMTP
Host: 10.200.123.135
Port: 25
Authenication: false

Sending Message...

Success!


And this is the test mail:
This is a test message generated from Cacti. This message was sent to test the configuration of your Mail Settings.

Your email settings are currently set as follows

Method: SMTP
Host: 10.200.123.135
Port: 25
Authenication: false

Anybody have an idea?
kelbyc
Cacti User
Posts: 52
Joined: Mon Nov 28, 2005 8:50 am

Post by kelbyc »

Do you have baseline monitoring enabled? If not enable it and see if you get any e-mails. I'm having the exact same problem you are having. Except low thresholds are working for me. I get e-mails on low thresholds being triggered but I never get them when a high threshold is triggered. My test e-mail sends just like yours as well. The strange thing is that when baseline monitoring is enabled for one of my hosts I get e-mails about baseline thresholds being above or below the calculated threshold. Try the baseline and see if it works then maybe we can narrow the problem down.
steveh
Posts: 4
Joined: Thu Jan 05, 2006 11:51 am

Same here

Post by steveh »

I downloaded Thold v0.2.7 and installed on cacti 0.8.6g

I get the same error messages:

Warning: main(plugins/thold/thold-functions.php): failed to open stream: No such file or directory in /srv/www/htdocs/cacti/plugins/thold/graph_thold.php on line 20

Warning: main(): Failed opening 'plugins/thold/thold-functions.php' for inclusion (include_path='/usr/share/php') in /srv/www/htdocs/cacti/plugins/thold/graph_thold.php on line 20

Fatal error: Call to undefined function: delete_old_thresholds() in /srv/www/htdocs/cacti/plugins/thold/graph_thold.php on line 22

And see no reason for this. The files exist etc etc. Do the permisions on the folders need changing? If so (sorry!) but how.

Thanks

Steve
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

I will see about making some changes to ensure that everything uses the full path to the files, which is probably where the issue is. Along as the web server has read premissions on the files, everything should be fine. You could test the full path, by modifying the file and hardcode the full path in there.
steveh
Posts: 4
Joined: Thu Jan 05, 2006 11:51 am

Post by steveh »

cigamit wrote:I will see about making some changes to ensure that everything uses the full path to the files, which is probably where the issue is. Along as the web server has read premissions on the files, everything should be fine. You could test the full path, by modifying the file and hardcode the full path in there.
I had tried putting the full path in, but being a complete newbie to Linux until last week this is all a rather steep learning curve for me.

Have managed to get much further than when trying to get cacti going on a 2003 server though, so feeling as though large achievement made but just hitting this stumbling block now.... so if someone could just give me an example of what the line should read that would be great...not quite got my head around the syntax of it all yet.

Thanks
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

steveh wrote:
cigamit wrote:I will see about making some changes to ensure that everything uses the full path to the files, which is probably where the issue is. Along as the web server has read premissions on the files, everything should be fine. You could test the full path, by modifying the file and hardcode the full path in there.
I had tried putting the full path in, but being a complete newbie to Linux until last week this is all a rather steep learning curve for me.

Have managed to get much further than when trying to get cacti going on a 2003 server though, so feeling as though large achievement made but just hitting this stumbling block now.... so if someone could just give me an example of what the line should read that would be great...not quite got my head around the syntax of it all yet.

Thanks
I have now updated the threshold plugin to use full paths whenever possible, so if you don't want to make the changes yourself, you can just redownload the plugin, and recopy the files over. Let me know how it works for you.
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

kanada wrote:Fatal error: Cannot redeclare rrd_last() in /var/www/html/cacti/lib/thold-functions.php on line 19
I have made a few more changes to try and help alleviate this issue, if you could redownload the threshold plugin (its the same version #, so ignore that) and test it again, and let me know how it works out.
steveh
Posts: 4
Joined: Thu Jan 05, 2006 11:51 am

Post by steveh »

cigamit.

Thanks! Working at home today and server in office, have not set up SSH yet so will try on Monday.

Off topic, but I have charts created for a number of things now, one of which is one of our cisco switches, I need to trap the number of collisions and this does not seem to be on the easy drop downs in cacti, any ideas.....

Thanks again, have a good weekend
steveh
Posts: 4
Joined: Thu Jan 05, 2006 11:51 am

thold

Post by steveh »

Got it. Thanks, works a treat.
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

Hello (cigamit?)

if I use the new thold plugin I get no host down notifications. I changed to some version back and it works again. Could you please check the changes between the last three versions?


Torsten
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

Hi,

at our company there is a spam assessin at the mail-gw. The threshold alarms are marked as spam due to the following:

Code: Select all

Content analysis details:   (7.6 points, 5.5 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 0.2 EXTRA_MPART_TYPE       Header has extraneous Content-type:...type= entry
 1.1 BLANK_LINES_70_80      BODY: Message body has 70-80% blank lines
 0.0 HTML_60_70             BODY: Message is 60% to 70% HTML
 1.2 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts
 0.0 HTML_MESSAGE           BODY: HTML included in message
 5.0 HTML_IMAGE_ONLY_04     BODY: HTML: images with 0-400 bytes of words
 0.1 HTML_MIME_NO_HTML_TAG  HTML-only message, but there is no HTML tag
(See Line with scoring of 5.)

Is it possible to write a short sentence in the email or just use an other format so that the scoring is reduced?

Torsten
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

torstentfk wrote:Hi,

at our company there is a spam assessin at the mail-gw. The threshold alarms are marked as spam due to the following:

Code: Select all

Content analysis details:   (7.6 points, 5.5 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 0.2 EXTRA_MPART_TYPE       Header has extraneous Content-type:...type= entry
 1.1 BLANK_LINES_70_80      BODY: Message body has 70-80% blank lines
 0.0 HTML_60_70             BODY: Message is 60% to 70% HTML
 1.2 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts
 0.0 HTML_MESSAGE           BODY: HTML included in message
 5.0 HTML_IMAGE_ONLY_04     BODY: HTML: images with 0-400 bytes of words
 0.1 HTML_MIME_NO_HTML_TAG  HTML-only message, but there is no HTML tag
(See Line with scoring of 5.)

Is it possible to write a short sentence in the email or just use an other format so that the scoring is reduced?

Torsten
That is definitely something that needs to be fixed. I will see what I can do.

Thanks!
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

torstentfk wrote:Hello (cigamit?)

if I use the new thold plugin I get no host down notifications. I changed to some version back and it works again. Could you please check the changes between the last three versions?


Torsten
What 2 versions? That is what will tell me what I changed. Ofcourse the host down notifications is about to be removed from the threshold plugin, and added to the monitor plugin, since that is what it does primarily, monitor down hosts.
asmoranomar
Posts: 4
Joined: Fri Jan 13, 2006 8:15 am

Post by asmoranomar »

Windows 2000 Server SP4
Cacti 0.8.6h
Cactid 0.8.6g
Thold 0.2.7
MySQL 5.0.18
PHP 5.1.1
Apache 2.0.55
RRDTool 1.2.12

Two problems:
1) I have problems viewing items under the Console->Management->Threshold window. It locks up and I have to reset apache for it to recover. I have studied the posts and found that the problem was related to line 132 in thold.php as many have suggested. Commenting this line fixes the problem but obviously the pictures are removed. I have studied this a bit more and found that the URL for the picture is incomplete. For example:

Code: Select all

<img src="<?php echo $config["url_path"]; ?>graph_image.php?local_graph_id=<?php echo $graph ?>&rra_id=1&graph_start=-32400&graph_height=100&graph_width=300&graph_nolegend=true">
would return:

Code: Select all

<img src="/cacti/graph_image.php?local_graph_id=184&rra_id=1&graph_start=-32400&graph_height=100&graph_width=300&graph_nolegend=true">
If you missed it...the first part of the URL is missing completely.
I found the url_path var in the includes\config.php file and it says the following:

Code: Select all

/* This is full URL Path to the Cacti installation 
   For example, if your cacti was accessible by http://server/cacti/ you would user '/cacti/'
   as the url path.  For just http://server/ use '/'
*/

$config["url_path"] = /cacti/';
OK...simple enough. I went ahead and put the 'http://server/' in the field anyways just to play around and checked again...and it worked! Now I get graphs without locking up. I wouldn't say this is 'fixed' per se because it clearly states NOT to put the 'http://server/' in the url_path var.

2) All my current values are reporting 0 for everything, even when the current graph shows values. I can't isolate this problem as of yet. No errors in the log and check-thold.php runs without problems. I can set the low threshold above 0 and run the script and it will trigger the alarm. I suspect thold is running fine, and that whatever returns values to thold is the problem - but i cant find anything yet. I've tried the few tricks in previous posts (function get_current_value trick) but to no avail.

Any clues on what is happening?
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

asmoranomar wrote:

Code: Select all

<img src="/cacti/graph_image.php?local_graph_id=184&rra_id=1&graph_start=-32400&graph_height=100&graph_width=300&graph_nolegend=true">
If you missed it...the first part of the URL is missing completely.
The wierd thing is that image files in a web page aren't required to include the full URL, the browser knows that it comes from the current page. This actually works fine in my IE and Firefox. More than likely is working fine in yours in most situations. For instance the cacti.net forums. The logo at top is called with

Code: Select all

<img src="templates/subSilver/images/logo_phpBB.gif"
and it doesn't crash anyone's browser. Its using a relative path, while the threshold image file is absolute, but its all the same to the browser.

Are you using IE? and what version are you using? I've only heard of this happening in IE so far.
asmoranomar wrote: 2) All my current values are reporting 0 for everything, even when the current graph shows values. I can't isolate this problem as of yet. No errors in the log and check-thold.php runs without problems. I can set the low threshold above 0 and run the script and it will trigger the alarm. I suspect thold is running fine, and that whatever returns values to thold is the problem - but i cant find anything yet. I've tried the few tricks in previous posts (function get_current_value trick) but to no avail.

Any clues on what is happening?
This is a bug that I haven't quite figured out why it happening, but I traced it done to the RRDs always returning a NAN value for 1 of the datasources, but not the others, so Cacti's rrd_execute function returns the whole thing as NAN, which Threshold treats as 0. I will have to dig deeper into it and make absolutely sure, as I haven't been able to reproduce it in the last few months.
Locked

Who is online

Users browsing this forum: No registered users and 0 guests