Thold Dead Host Notification With Cactid and Monitor

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
Decombej
Posts: 20
Joined: Fri Jun 23, 2006 9:51 am
Location: Lyon, France

Thold Dead Host Notification With Cactid and Monitor

Post by Decombej »

Hello,

I wanted to receive only alerts for down devices that are Monitored with the monitor plugin, to do that, i modified a bit the workaround (thanks a lot for this piece of code by the way, you can find it here -> http://cactiusers.org/forums/viewtopic.php?p=327#327).

You have to edit check-thold.php, i added the (already patched) workaround at the end of the file, just before the ?>, and then i modified the database query like that:

Old code:

Code: Select all

$hoststatusarray=db_fetch_assoc("SELECT status, hostname, description, id, status_event_count FROM host") or die (mysql_error() ); 
New code:

Code: Select all

$hoststatusarray=db_fetch_assoc("SELECT status, hostname, description, id, status_event_count FROM host WHERE disabled = '' AND monitor = 'on'") or die (mysql_error() ); 
Simple Huh?

I think i'm going to do a Group plugin (for example: a group for servers, routers, switchs, etc...) and seperate the mail addresses for each groups, does anyone know about an existing one? and/or will it be implemented in the a new release of Thold?

Thanks to Thold, Monitor and Cacti's Community
[[color=darkblue]Debian 3.1 | Cacti 0.8.6h | Cactid 0.8.6g | Mysql 4.0.24 | PHP 4.3 with eAccelerator v0.9.4 | Apache 1.3 | Plugin Arch...[/color]]
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

I am currently in the process of combining monitor and thold, so this will be an option in the combined plugin. I am comtemplating doing a full rewrite of the thold plugin, but may just save that version for cacti v0.9.0
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests