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

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Locked
aboyz

anyone got a working version?

Post by aboyz »

Hi,

Was wondering if anyone got thold working? because i tried all the patch and replaced this and that nothing seem to work!! can someone maybe update a final version!!! so we can install it cleanly without any patches??

the one i'm using are the final version and apply one patch from someone. sending me the thold-functions.php replacing that doesn't help anyone got a fully working version please upload it here.

thanks
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

to make good install try install cacti , install oficial patch ( for graph ) install therhold2.1a and all can work fine at this time .
but i think is an other way to install thold with plugin arch but thold not implement it at the moment.

for my email problem:
i just try check-thold.php and i get that:

Code: Select all

xxx@xxx.fr,xxx@xxx.fr... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.13.1/8.13.1; Fri, 27 May 2005 11:14:02 +0200
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<root@localhost.localdomain> SIZE=403
250 2.1.0 <root@localhost.localdomain>... Sender ok
>>> RCPT To:<xxx@xxx.fr>
>>> RCPT To:<xxx@xxx.fr>
>>> DATA
250 2.1.5 <xxx@xxx.fr>... Recipient ok
250 2.1.5 <xxx@xxx.fr>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 j4R9E2bW021243 Message accepted for delivery
xxx@ixxx.fr,xxx@xxx.fr... Sent (j4R9E2bW021243 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 localhost.localdomain closing connection
xxx@xxx.fr,xxx@xxx.fr... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.13.1/8.13.1; Fri, 27 May 2005 11:14:03 +0200
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<root@localhost.localdomain> SIZE=403
250 2.1.0 <root@localhost.localdomain>... Sender ok
>>> RCPT To:<xxx@xxx.fr>
>>> RCPT To:<xxx@xxx.fr>
>>> DATA
250 2.1.5 <xxx@xxx.fr>... Recipient ok
250 2.1.5 <xxx@xxx.fr>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 j4R9E3CB021247 Message accepted for delivery
xxx@xxx.fr,xxx@xxx.fr... Sent (j4R9E3CB021247 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 localhost.localdomain closing connection
RRA: 11 : traffic_out
Ref. values count: 18
Ref. value (min): 74
Ref. value (max): 79
Cur. value: 75
Low bl thresh: 59
High bl thresh: 95
Check against baseline: OK
------------------
then it's work ?i don't have take mail at the moment :S !
but why my crontab goes wrong ?

Code: Select all

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

*/5 * * * * php /var/www/html/cacti//poller.php >/dev/null 2>&1 && php /var/www/html/cacti//thold/check-thold.php > /dev/null 2>&1
the path is corect i try the command do i try change anything?
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

thold 2.1a doesn't work with cacti 0.8.6d

Post by mlist »

I installed cacti 0.8.6d on Fedora core 3 without any problems. Cati works fine.
I successfully installed thold, no problem errors during installation but, after, when I tried to connecto to cacti (http://ipmachine/cacti), the login page didn't appear.
Uninstalling thold the problem was solved
Trying to reinstall thold the following error is shown:

[root@localhost thold2.1a]# ./install.sh /var/www/html/cacti/
Directory Check OK
Installing into /var/www/html/cacti/
An installation seems already be present.
This version is not back-ward compatible.
WARNING: If you proceed, all old thold settings will be erased.
Do you want to continue (y/n):y
Overwriting existing install...
DB login OK

WARNING: you may want to backup files & cacti database before proceeding.
An uninstall script is provided to remove & restore modified files.
Use at your own risk. NO Warranty or Guarantee given.
If you continue, you agree not to hold me liable for damages or loss of data.
press CTRL+C in the next 5 seconds to stop

Backing up files...
Adding SQL tables...
ERROR 1062 at line 46: Duplicate entry '18-1' for key 1
Installing new files...
mkdir: cannot create directory `/var/www/html/cacti//thold/': File exists
mv: cannot stat `check-thold.php': No such file or directory
mv: cannot stat `thold.php': No such file or directory
mv: cannot stat `listthold.php': No such file or directory
mv: cannot stat `tab_thold.gif': No such file or directory
mv: cannot stat `graph_thold.php': No such file or directory
mv: cannot stat `config_arrays.php': No such file or directory
mv: cannot stat `config_settings.php': No such file or directory
mv: cannot stat `data_sources.php': No such file or directory
mv: cannot stat `graphs_new.php': No such file or directory
mv: cannot stat `functions.php': No such file or directory
mv: cannot stat `top_graph_header.php': No such file or directory
mv: cannot stat `top_header.php': No such file or directory
mv: cannot stat `thold-functions.php': No such file or directory
***************************************************************************************************
Installation complete. MAKE SURE YOU MODIFY YOUR CRONTAB (crontab -e on most systems):

Replace the line:
*/5 * * * * php /var/www/html/cacti//poller.php > /dev/null > /dev/null 2>&1
With:
*/5 * * * * php /var/www/html/cacti//poller.php >/dev/null 2>&1 && php /var/www/html/cacti//thold/check-thold.php > /dev/null 2>&1
****************************************************************************************************

At the end i tried to run again uninstall script but the error now is:

[root@localhost thold2.1a]# ./uninstall.sh /var/www/html/cacti/
Uninstalling from /var/www/html/cacti/
mv: `/var/www/html/cacti//graph_thold.php' and `./graph_thold.php' are the same file
mv: `/var/www/html/cacti//listthold.php' and `./listthold.php' are the same file
mv: `/var/www/html/cacti//thold.php' and `./thold.php' are the same file
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
done
*****
Be sure to modify your crontab


I tried to drop "thold" tables an delete all *tho* files from /var/www/html/cacti but the problem is always the same.

Did someon try to install thold with cacti 0.8.6d?
Do you have any suggestions?

Thanks :(
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

the problem is easy i have the same just like you're firste time but try @
http://ipmachine/cacti/
(see the final / :lol: )
for me it's work but it's true that http://ipmachine/cacti don't work ... i think it can be good for security :lol:
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

thold 2.1a doesn't work with cacti 0.8.6d and fedora c3

Post by mlist »

Hi john le lardon,

I did a new installation on another machine and the problem is always the same:
I'm not able to connect to cacti machine neither http://ipmachine/cacti or http://ipmachine/cacti/
Do you have any suggestion?
I'm quite sure cacti installation is correct because all devices and reports work perfectly and thold installation script run correctly as you can see:


[root@localhost thold2.1a]# ./install.sh
Error - wrong syntax - you must specify cacti root directory ie: install.sh /var/www/html/cacti
[root@localhost thold2.1a]# ./install.sh /var/www/html/cacti/
Directory Check OK
Installing into /var/www/html/cacti/
This is a new install..
DB login OK

WARNING: you may want to backup files & cacti database before proceeding.
An uninstall script is provided to remove & restore modified files.
Use at your own risk. NO Warranty or Guarantee given.
If you continue, you agree not to hold me liable for damages or loss of data.
press CTRL+C in the next 5 seconds to stop

Backing up files...
Adding SQL tables...
Installing new files...
***************************************************************************************************
Installation complete. MAKE SURE YOU MODIFY YOUR CRONTAB (crontab -e on most systems):

Replace the line:
*/5 * * * * php /var/www/html/cacti//poller.php > /dev/null > /dev/null 2>&1
With:
*/5 * * * * php /var/www/html/cacti//poller.php >/dev/null 2>&1 && php /var/www/html/cacti//thold/check-thold.php > /dev/null 2>&1
********************************************************************************


Thanks
lindsay
Posts: 2
Joined: Sat May 28, 2005 8:31 am

Re: thold 2.1a doesn't work with cacti 0.8.6d and fedora c3

Post by lindsay »

I had the same or a similar problem with an FC3 setup.

The problem for me was that by default SELinux is enabled for FC3. This messes around with the Thold install. I disabled SELinux (check google on how to do this) and it came good.

I'd suggest disabling SELinux, rebooting and then trying to log in again.

If that fails reinstalling cacti and then reinstalling thold should get you up and running (if you had the same problem as I did).
lindsay
Posts: 2
Joined: Sat May 28, 2005 8:31 am

suggested improvements

Post by lindsay »

Recently I started evaluating software for performance data visualisation and monitoring as a replacement to an existing Nagios install. I've been playing around with Cacti/Thold and have been quite impressed.

A couple of suggestions I'd like to make to the development team - some of these are no doubt already being considered, some of them may be far too advanced for what the tool was intended for:
1) Only show threshold info for the graphs/hosts that the user has access to. Currently a user can see threshold information for all hosts, even if they only have access to a restricted set of hosts.

2) Somebody has already identified the bug with threshold breach alerts not being sent on a Saturday but I did not see a response, just wanted to make sure you were aware of it.

3) Threshold alert settings based on user preference. e.g. User 'test01' can change whether they receive weekend alerts through their own 'settings' panel. Further, specifying windows when alerts are to be generated which are more granular than "not weekends" would help allow Thold to be used for on-call situaitons. Then again, this functionality could be handled on the system receiving the email.

4) Warning threshold and critical threshold....optionally going to different email addresses...or at least with different subject prefixes. This way the receiving system could redirect 'critical' alerts to an email-sms gateway or similar.

5) Dependancy awareness. Ability to configure that if host a is down, don't bother initiating an alert for host b. etc. This is very useful in enterprise size sites where the loss of a central router would ideally not result in hundreds of notifications being generated for each affected host/graph.
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

i found my mistake for mailing , one things is in php.ini i must specify ( -v XXX@XXX.XXX ) valide mail (in local network gateway), and second thing i'm using root user and crontab option v say :

Code: Select all

[root@test ~]# crontab -l
no crontab for root
then i must use -e to do the mail alert!
okai i change my crontab :

Code: Select all

[root@test ~]# crontab -u root /etc/crontab
and now i have crontab :

Code: Select all

[root@test ~]# crontab -l
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

*/5 * * * * php /var/www/html/cacti//poller.php >/dev/null 2>&1 && php /var/www/html/cacti//thold/check-thold.php > /dev/null 2>&1
[root@test ~]#
i'm happy if it's work :smile:

@ mlist : don't know about your problem sorry but i used FC3 i diseable SElinux
but an advice , check mysql user and permition , becaus i'm a bad boy i use root anywhere for anything :lol:
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

thold 2.1a and fedora core 3 with selinux

Post by mlist »

To lindsay:
THANKS A LOT!!!! The problem was se linux; i just disabled it to have cacti works fine!

To john le lardon:
I'm a bad boy also because I use root user!!!
Only two question (sorry for stupid questions but I'm not an experencied linux user):

1) If I always use root why I need to use crontab -u root /etc/crontab
to modify crontab???
If I just modify crontab with vi /etc/crontab doesn't it work?
Also, after execute the command you described, logwatch sent me an email like this:
object:
Cron <root@localhost> root run-parts /etc/cron.hourly
body:
/bin/bash: root: command not found
Is it correct?

2) A question about php.ini configuration
In my fedora fc3 I use postfix and not sendmail. I modified /etc/postfix/main.cfit to send emails to a gateway (relayhost = [192.168.10.13] )and it works fine.
Running which command I see the path of postfix
[root@localhost postfix]# which postfix
/usr/sbin/postfix

thus, the question is: is correct to modify php.ini section like this?
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/postfix


Thanks a lot for your support
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

@mlist : for crontab i try to modify my /etc/crontab but when I try a crontab -l u can see i havn't see the file !? then i must specify by my side where is the file to crontab...
yes i don't know realy why isn't work just with /etc/crontab , but if you search on web u can found notes about crontab and file crontab.allow and .deny ... and you can try to work with but isn't my objective, then it's work like this it's all i want :)

try to delette "root" is just to specify user i think , but the comande is run-part .

for php.ini before trying change try to use /usr/sbin/postfix if it's work and also see the man of postfix for option
a last thing about this if in php.ini the line can be also:
sendmail_path = "/usr/sbin/postfix"
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

Post by mlist »

Hi john le lardon,

thanks for your help

1) for crontab...ok no problem I simply followed your suggestion and email waring works correctly, I'll read manpage in order to understand this problem

2) is not clear to me the reason but it isn't important...

3) to use posftix is enouth to change the php.ini like this:
sendmail_path = /usr/sbin/postfix

Thanks :) :D
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

thold 2.1a and disk monitor strange behavior

Post by mlist »

I need to monitor a windows disk partition ("e") on windows 2003 server

The graph works correctly thus I went to threshold section where i see two tabs:

hdd_total:13966491648 (bytes)
hdd_used:7119298560 (bytes)

I clicked on hdd_used tab and I see:
Data Source Item [hdd_used] - Current value: [7119298560]
Because I need to configure thold to send email when hdd_used is above 6gb I wrote in High threshold field this value:
6442450944 (bytes)
This means: if hdd_used is above (> 6gb = to 6442450944), send me an email.
The problem is that when I click on save button, cacti always reset this value to 2147483647 (1.99 gb I suppose)

Can someone explain me the reason???
Moreover...is there a good explanation of baseline monitoring??? It isn't clear to me.

Thanks
Attachments
threshold.JPG
threshold.JPG (163.51 KiB) Viewed 4736 times
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

Post by mlist »

mlist wrote:Hi john le lardon,

thanks for your help

1) for crontab...ok no problem I simply followed your suggestion and email waring works correctly, I'll read manpage in order to understand this problem

2) is not clear to me the reason but it isn't important...

3) With fedora c3 I saw that sendmail is a link to /etc/alternative/mta that probabilly is handled by system-switch-mail thus I simly left (in php.ini)
sendmail_path = /usr/sbin/sendmail -t -i
It works although I haven't uderstood how it works.

Thanks :) :D
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

i think it's the highest number for the variable in source search to change it to get more long number, but sorry don't know about the source, how and where you can change it , later in summer i work on php :) but not yet .

just an advice for security ( edit your screen and cut ip information and windows task bar thanks
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

thold 2.1a and disk monitor strange behavior

Post by mlist »

Hi john le lardon,

yes, also I think it's the highest number for the variable in source search.

I do not understand as it is possible that nobody is able of giving some suggestion. Am I the only person who has tried to send warnings for hd usage??? :(
May be it is a thold (or cacti) bug????

thanks
Locked

Who is online

Users browsing this forum: No registered users and 0 guests