Thold 2.x - Thresholding/Alerting module for cacti 8.6
Moderators: Developers, Moderators
for John Le Lardon
you have to create a schedule task with crontab,
task repeat : 5 min
parameter: c:\php\php.exe c:\apache2\htdocs\cacti\thold\check-thold.exe
(for windows) with linux i don't know
in the php.ini file don't forget the ""
see in your threshold setting if all is ok...
test a capture with ethereal with a filter for your network adapter if there are anything go out of your PC and if a network equipment doesn't lock the mail...
Hope you will find the problem
ProxyO
you have to create a schedule task with crontab,
task repeat : 5 min
parameter: c:\php\php.exe c:\apache2\htdocs\cacti\thold\check-thold.exe
(for windows) with linux i don't know
in the php.ini file don't forget the ""
see in your threshold setting if all is ok...
test a capture with ethereal with a filter for your network adapter if there are anything go out of your PC and if a network equipment doesn't lock the mail...
Hope you will find the problem
ProxyO
How to fix ERROR: Notice: Undefined offset: 0
It is working now after the patch, great!! thanks very much
Manuel
Manuel
error when patch
when i ran this
admin00# patch -p1 < patch.name
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- cacti_old/lib/thold-functions.php 2005-02-19 15:13:33.000000000 +0200
|+++ cacti/lib/thold-functions.php 2005-05-23 00:40:00.000000000 +0300
--------------------------
Patching file lib/thold-functions.php using Plan A...
Hunk #1 failed at 30.
1 out of 1 hunks failed--saving rejects to lib/thold-functions.php.rej
done
I don't even have a cacti_old/ directory.
Can someoene tell me what to change in thold-functions.php i can do it manually anyone know how??
thanks
admin00# patch -p1 < patch.name
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- cacti_old/lib/thold-functions.php 2005-02-19 15:13:33.000000000 +0200
|+++ cacti/lib/thold-functions.php 2005-05-23 00:40:00.000000000 +0300
--------------------------
Patching file lib/thold-functions.php using Plan A...
Hunk #1 failed at 30.
1 out of 1 hunks failed--saving rejects to lib/thold-functions.php.rej
done
I don't even have a cacti_old/ directory.
Can someoene tell me what to change in thold-functions.php i can do it manually anyone know how??
thanks
-
- Cacti User
- Posts: 52
- Joined: Fri May 06, 2005 7:39 am
- Location: france
- Contact:
in crontab it's okay :
it's done in install docs
for php.ini like this ?
i try with quote ... reguards :p
Code: Select all
*/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
for php.ini like this ?
Code: Select all
sendmail_path = "/usr/sbin/sendmail -t -i"
I got a problem with thold on Win32/PHP 4.3.3
poller.php was't stopping and saying waitting for x/N until timeout, after lot of debug i found why.
in lib/functions.php there is 2 call to mail() without a body
mail(read_config_option("alert_email"), $msg, "", "Content-Type: text/html\n");
mail(read_config_option("alert_email"), $msg, "", "Content-Type: text/html\n");
after some test i found that mail('toto@toto', 'some subject','') stop php without any error (and any mail sended), so the poller was waiting for a crashed process
I just changed the body to " " and now it work fine, it seems to be a bug in php 4.3.3 (at least) (work with 4.3.11, seems to be corrected in 4.3.4 from what i saw in changelog) so i guess it still better to change this in thold.
poller.php was't stopping and saying waitting for x/N until timeout, after lot of debug i found why.
in lib/functions.php there is 2 call to mail() without a body
mail(read_config_option("alert_email"), $msg, "", "Content-Type: text/html\n");
mail(read_config_option("alert_email"), $msg, "", "Content-Type: text/html\n");
after some test i found that mail('toto@toto', 'some subject','') stop php without any error (and any mail sended), so the poller was waiting for a crashed process
I just changed the body to " " and now it work fine, it seems to be a bug in php 4.3.3 (at least) (work with 4.3.11, seems to be corrected in 4.3.4 from what i saw in changelog) so i guess it still better to change this in thold.
-
- Cacti User
- Posts: 52
- Joined: Fri May 06, 2005 7:39 am
- Location: france
- Contact:
yes i'm with you , make 2 post one for problems and one ( locked ) with annoncement of new patch and how to apply thanks .
if u can make an order to aply patch also
i think about "arch patch" but i have problem causing by the patch , evry time i try apply it evry time i can't add new device (the new device created have "" unknown "" "" "" "100%" after patching and can't save if i edit old device ) .
when i patch i get error :
patching file plugins/index.php
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 307:
i'm on fedora core 3 , cacti 0.8.6d ,mysql Ver 11.18 Distrib 3.23.58
if u can make an order to aply patch also
i think about "arch patch" but i have problem causing by the patch , evry time i try apply it evry time i can't add new device (the new device created have "" unknown "" "" "" "100%" after patching and can't save if i edit old device ) .
when i patch i get error :
patching file plugins/index.php
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 307:
i'm on fedora core 3 , cacti 0.8.6d ,mysql Ver 11.18 Distrib 3.23.58
Last edited by john le lardon on Wed May 25, 2005 5:00 am, edited 1 time in total.
error when patch
Message for aboyz,
I have seen the same error when tried to apply the patch, so i did the changes manually at thold-functions.php and it started to work properly.
Please replace your actuall file with this one which is already patched and works fine.
Manuel
I have seen the same error when tried to apply the patch, so i did the changes manually at thold-functions.php and it started to work properly.
Please replace your actuall file with this one which is already patched and works fine.
Manuel
- Attachments
-
- thold-functions.zip
- original file + the patch applied
- (3.81 KiB) Downloaded 548 times
The error you got when you patched is fine, its because I chomped the last blank line off the patch. As far as the other, open include/plugins.phpjohn le lardon wrote:yes i'm with you , make 2 post one for problems and one ( locked ) with annoncement of new patch and how to apply thanks .
if u can make an order to aply patch also
i think about "arch patch" but i have problem causing by the patch , evry time i try apply it evry time i can't add new device (the new device created have "" unknown "" "" "" "100%" after patching and can't save if i edit old device ) .
when i patch i get error :
patching file plugins/index.php
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 307:
i'm on fedora core 3 , cacti 0.8.6d ,mysql Ver 11.18 Distrib 3.23.58
find this code
Code: Select all
function do_hook_function($name,$parm=NULL) {
global $plugin_hooks;
$ret = '';
Code: Select all
$ret = '';
Code: Select all
$ret = $parm;
Re: error when patch
mmerelles wrote:Message for aboyz,
I have seen the same error when tried to apply the patch, so i did the changes manually at thold-functions.php and it started to work properly.
Please replace your actuall file with this one which is already patched and works fine.
Manuel
Hi,
thanks for the patch, i replaced it with the hold thold-functions.php still nothing being send or warning. I mean i got thold high on 2000 connection. As of now its doing more then 2500. wonder why it didn't go off or warning me or even send me a email. anyone know what is going on?
The lights is all green i don't think its working..
-
- Cacti User
- Posts: 52
- Joined: Fri May 06, 2005 7:39 am
- Location: france
- Contact:
okay thanks , i have all reinstalled to have clear cacti directory too many patch to apply
go eat ... see the patch later
it's okay
thold-fonction repair graf tree problems and $param repair adding devices !
Thanks! juste mail don't work at the moment , i try sendmail in php.ini ,don't work , mini_sendmail don't work . i don't know how to make it good .
and i don't know why sendmail wouldn't work !?
to past time i going to up monitor plugin
go eat ... see the patch later
it's okay
thold-fonction repair graf tree problems and $param repair adding devices !
Thanks! juste mail don't work at the moment , i try sendmail in php.ini ,don't work , mini_sendmail don't work . i don't know how to make it good .
and i don't know why sendmail wouldn't work !?
to past time i going to up monitor plugin
Thold not reading Current:
Same thing here.....it appears that thold is not reading the current value. I now have alerts for 50 devices since it is not reading it properly.
Anyone have any ideas??
--Shawn
Anyone have any ideas??
--Shawn
-
- Cacti User
- Posts: 52
- Joined: Fri May 06, 2005 7:39 am
- Location: france
- Contact:
Who is online
Users browsing this forum: No registered users and 1 guest