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

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Locked
proxyo
Posts: 11
Joined: Wed Apr 20, 2005 9:07 am
Location: France

Post by proxyo »

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
mmerelles
Posts: 18
Joined: Sat May 21, 2005 11:56 am

How to fix ERROR: Notice: Undefined offset: 0

Post by mmerelles »

It is working now after the patch, great!! thanks very much


Manuel
aboyz

error when patch

Post by aboyz »

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
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

in crontab it's okay :

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
it's done in install docs ;)

for php.ini like this ?

Code: Select all

sendmail_path = "/usr/sbin/sendmail -t -i"
i try with quote ... reguards :p
Jeb
Posts: 38
Joined: Tue May 24, 2005 2:50 am

Post by Jeb »

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.
predou
Posts: 45
Joined: Fri Jan 07, 2005 8:42 am

Post by predou »

Hi all!

Can the author create a new post with new title cause i don't understand where we are in version and patchs of treshold ?? :p

I think it will be more visible to create new topic at each major version we do in our script.
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

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
Last edited by john le lardon on Wed May 25, 2005 5:00 am, edited 1 time in total.
magnetyk
Posts: 34
Joined: Tue May 10, 2005 10:04 am

Post by magnetyk »

Hi,

The current values of my graphes aren't currently updated in the list but alerts work fine. How do I fix this problem ?

Thx for help[/img]
mmerelles
Posts: 18
Joined: Sat May 21, 2005 11:56 am

error when patch

Post by mmerelles »

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
Attachments
thold-functions.zip
original file + the patch applied
(3.81 KiB) Downloaded 522 times
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

john 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
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.php
find this code

Code: Select all

function do_hook_function($name,$parm=NULL) {
    global $plugin_hooks;
    $ret = '';
and change the

Code: Select all

    $ret = '';
to

Code: Select all

    $ret = $parm;
That should do the trick. I think I will create a new thread, so we can keep these out of the thold thread. I will post an updated patch also.
aboyz

Re: error when patch

Post by aboyz »

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..
magnetyk
Posts: 34
Joined: Tue May 10, 2005 10:04 am

Post by magnetyk »


PostPosted: Wed May 25, 2005 4:56 am Post subject:
Hi,

The current values of my graphes aren't currently updated in the list but alerts work fine. How do I fix this problem ?

Thx for help
Nobody can help me ? :roll:
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

okay thanks , i have all reinstalled to have clear cacti directory :lol: too many patch to apply :D
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 :smile:
sromines
Posts: 10
Joined: Fri Mar 11, 2005 4:31 pm
Contact:

Thold not reading Current:

Post by sromines »

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
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

sromines : do you have sufficient memory to stock more information? on your database?
Locked

Who is online

Users browsing this forum: No registered users and 0 guests