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

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Locked
royce
Cacti User
Posts: 79
Joined: Wed Dec 29, 2004 7:37 am
Location: Sweden

Post by royce »

Mika wrote:royce, thank you for help.
Today I just checked httpd.conf file and noticed the syntax you provided fits exactly there :)
It should be really shame on me :oops:


One more question:
If I run it on a linux machine, should there sendmail be configured localy in order to send email notifications, or I can use existing remote mailserver?


Thanks in advance,
Mika
Great!

check out php.ini. you might be able to configure alternative smtp. otherwise go by sendmail (Er, no, dont use sendmail. go exim, qmail, postfix or whatever MTA that fits your needs.) I'm a fan of qmail, but the cactibox run a exim instance configured as a sattelite-host to send all mails through our smtp server. Works well.

Christofer
royce
Cacti User
Posts: 79
Joined: Wed Dec 29, 2004 7:37 am
Location: Sweden

Post by royce »

brain wrote:hi

it seems, i have found a bug, perhaps others have met this already. in the mysql table there are some column types defined as INT(50). well, on my debian box, it did not worked for numbers larger than 32 bits (so larger than int(11)). this was bad, because if u try to monitor hard disk usage, then the max value a trigger can have is around 2 gigs. and that's not so much :)

so i changed all int(50) to bigint in the table thold_data, and now it works for me. has anyone already faced this problem?

debian sarge
mysql Ver 12.22 Distrib 4.0.23, for pc-linux-gnu (i386)

Good point. I can see this fix will solve serveral problems.

Christofer
royce
Cacti User
Posts: 79
Joined: Wed Dec 29, 2004 7:37 am
Location: Sweden

Re: Problem with one threshold - GRAPH DOES NOT EXIST

Post by royce »

Pumpi wrote:Getting following error when receiving a treshold mail with one of my Checkpoint FW-1 devices:

GRAPH DOES NOT EXIST


I have deleted the device from threshold monitoring and start a new threshold for this firewall:

Code: Select all

Notice: Undefined offset: 0 in /usr/local/httpd/htdocs/cacti/thold.php on line 65"
code]Notice: Undefined index: element in /usr/local/httpd/htdocs/cacti/lib/thold-functions.php on line 223
Record Upda[/code]

No image even on the threshold config screen (right click on emty graph:

Code: Select all

The image “https://192.x.x.x/cacti/graph_image.php?local_graph_id=&rra_id=1&graph_start=-32400&graph_height=100&graph_width=300&graph_nolegend=true” cannot be displayed, because it contains errors."
And no Graph ID is shown.


Any ideas ?
Combined graphs might fail?
hard-coded http:// -tags?
http://[host] in settings? (Thold settings) (Well, this shouldnt matter)

Go through source and see if you're able figure out whats wrong.

Christofer
adesimone
Posts: 32
Joined: Mon Jan 24, 2005 12:46 am
Contact:

Post by adesimone »

solefald: yes, an external program should be easy to implement. Would you want it as a per-datasource setting or global setting?

neophyte: I would check your crontab. Also, make sure debug=1 on [cactiroot]/thold/check-thold.php and look at the logfile - [cactiroot]/log/thold.log . You can also try running 'php [cacti_root]/thold/check-thold.php' from the command line to see the output.

brain: you have a good point with using bigint; I was thinking more in MB then GB... I'll make sure that is fixed next time around

Pumpi: The script just looks to find which graph contains those datasources - the emails that are sent out don't have a graph_ID associated, so you won't see it. The older version used to allow you to input a graph_ID manually incase this failed; but it really shouldn't fail if there are graphs that exsit with that datasource.

KARLOS: I would make sure you can send email from your local solaris box (i.e. via mailx). Also, you can check your maillog to see if there was any activity. You can also try running 'php [cacti_root]/thold/check-thold.php' from the command line to see the output.

raderjm: bandwith is stored in the RRD files as bits, so you won't have a problem. (you would have to specify 1.2mb as 1200000)

oharel: Go under user_Management / select the user / make sure 'View Thresholds' is selected under Realm Permissions. Is 'thresholds' available on the left side of the console screen? Can you view them manually under http://[cacti_url]/graph_thold.php ? It is possible that the files did not get installed properly.
raderjm
Posts: 3
Joined: Thu Feb 10, 2005 2:51 pm
Location: SC

Post by raderjm »

:o im obviuosly doing something wrong here...

I added the threshold for one of my T1 circuits that is almost always maxxed out... I just wanted to see an alarm if it got over 1.2mbit. I see the graph telling me that its peaked on several occasion well over 1.4mbit yet it never triggered an alarm. I have it set to send an alert if it exceedes that threshold one time and to resend after 60mins (or 12 polls). When I look at the Threshld tab at the top...it says for my circuit that the current value is 87590 (currently triggered NO) the graph shows 1.4mbit as the current value... so... how is 87590 = 1.4mbit? I have my thold setting set to 1200000 (or 1.2mbit) as I was instructed. Could someone please shed some light on this issue for me? I would greatly appreciate it.

-Thanks in advance!
Wasaaaaabi!
User avatar
solefald
Posts: 38
Joined: Fri Jun 11, 2004 1:35 pm

Post by solefald »

adesimone:

Per data source should be move useful, since i will have to send different messages to the NOC so they know which escalation procedure to refer to.

Thank you very much!!
benhanson
Posts: 43
Joined: Tue Feb 08, 2005 8:59 pm

Problems with IIS

Post by benhanson »

Just since the move to 2.1a, I'm seeing an issue with IIS where trying to load the data_source page causes the www service to freeze up. Address bar shows http://hostname/cacti/thold.php?rra=31&hostid=4, and from this point on I get no response from the web server. Stopping and starting the WWW service clears it up, though I have to kill inetinfo.exe, the service won't shutdown gracefully. I'm going to downgrade and see if something else is up. Nothing is being logged to thold.log either. WWW logs show data_sources.php then 2 gifs as the last things loaded. Any ideas?
benhanson
Posts: 43
Joined: Tue Feb 08, 2005 8:59 pm

Something in thold.php

Post by benhanson »

I just swapped thold.php from 2.1a with the one from 2.0b and it works. Looks like quite a bit more functionality in thold.php from 2.1a.
KARLOS
Posts: 34
Joined: Thu Jan 20, 2005 7:31 am

Post by KARLOS »

hi,
My local box Solaris receives email, but toward an external email not. I believe that one must configure something of the PHP, but I am not sure.

Can help me someone?

THx
rik
Posts: 38
Joined: Mon Nov 22, 2004 5:15 am
Location: Zuerich; Switzerland
Contact:

:-)

Post by rik »

first of all... i must say it again... this is such a great addon this should be a feature inside of cacti!!!

::thank you for the great work::

i just want to help someone who has a the same problem like me:

the email-server accepts smtp but does not allow relay...

so i need to give a mailserver to which it should send the email, but i didn't went well with sendmail, i just could not get it to run.

my solution was::

- installed mini_sendmail
- changed the php.ini = sendmail_path = mini_sendmail -s[Mailserver] -t

it worked for me... i hope it can help someone
greets
rik
benhanson
Posts: 43
Joined: Tue Feb 08, 2005 8:59 pm

How to debug php

Post by benhanson »

Any suggestions on how to figure out which portion of thold.php is causing my IIS failure? Anyone have an opinion on a good php debugging solution?(Windows or OS X)
adesimone
Posts: 32
Joined: Mon Jan 24, 2005 12:46 am
Contact:

Post by adesimone »

raderjm: looks like the rrd files actually store the value in BYTES not BITS; and so you are seeing the value in thold has BYTES. (That still does not add up because 87590 * 8 = 700,720). Try setting your thold to 150000, which is equal to 1200000 bits (1.2mbit). I hope to make this easier in the future by giving you the option to specify a percentage, etc.

benhanson: not sure what is happening here - I'm guessing it's getting stuck in a loop somewhere. Does the cpu on server spike? Thold 2.0 is very different from 2.1. And thold.log only shows output from check-thold.php. If I get an opportunity, I will try to replicate this problem.

KARLOS & rik: you can configure your sendmail to use a 'smarthost' which all email will be sent to. I think php.ini will also allow you to specify a relay host

thanks for the support & comments so far
adesimone
User avatar
thewall
Posts: 24
Joined: Thu Mar 03, 2005 9:13 am
Location: Brasil

HELP!

Post by thewall »

Hi...

What's going on:

Warning: mysql_connect(): Too many connections in /usr/local/apache/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Too many connections in /usr/local/apache/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Too many connections in /usr/local/apache/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Too many connections in /usr/local/apache/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Fatal error: Call to undefined function: cacti_log() in /usr/local/apache/htdocs/cacti/lib/database.php on line 51


And second, where do I have to paste de file download.php, for thresholt start to work????

thanks
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Check out my reply to you in the General forum.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
thewall
Posts: 24
Joined: Thu Mar 03, 2005 9:13 am
Location: Brasil

Install on Debian!

Post by thewall »

Guys,

I save the file download.php, renamed to thold2.1a.zip, moved via SCP to my server and then.... where do I put the files, after gunzip them???

Anybody can help me??
Locked

Who is online

Users browsing this forum: No registered users and 1 guest