Hi
One of my monitored hosts run a process during off hours that rails the CPU for roughly 30 minutes at the same time every day. Is it possible to configure cacti to not send notification for this specific host and data template during this period?
Thanks
Supppresion window
Moderators: Developers, Moderators
Re: Supppresion window
Cacti does not send notifications, the thold plugin does. As such, this is a thold specific question and the post is getting moved the appropriate forum.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: Supppresion window
This is a definitely dirty workaround, and not tested at all.. :P
In 'plugins/thold/thold_functions.php', try to modify thold_check_threshold() function.
Original (0.4.4-43):
Modify the latter part ("Check for the weekend exemption...") as follows:
This will exclude threshold check at lunch time. :)
And then, enable "Weekend Exemption" on particular threshold settings you want. (Don't change "Default Alerting Options" in Settings)
Of course, only 1 set of exemption can be specified.
In 'plugins/thold/thold_functions.php', try to modify thold_check_threshold() function.
Original (0.4.4-43):
Code: Select all
function thold_check_threshold ($rra_id, $data_id, $name, $currentval, $cdef) {
...
$alert_exempt = read_config_option('alert_exempt');
/* check for exemptions */
$weekday = date('l');
if (($weekday == 'Saturday' || $weekday == 'Sunday') && $alert_exempt == 'on') {
return;
}
/* Get all the info about the item from the database */
$item = db_fetch_assoc("SELECT * FROM thold_data WHERE thold_enabled = 'on' AND data_id = " . $data_id);
/* Return if the item doesn't exist, which means its disabled */
if (!isset($item[0]))
return;
$item = $item[0];
/* Check for the weekend exemption on the threshold level */
if (($weekday == 'Saturday' || $weekday == 'Sunday') && $item['exempt'] == 'on') {
return;
}
...
Code: Select all
/* Check for the particular exemption on the threshold level */
$exempt_period = date('G') * 100 + date('i'); // "hhmm"
if (($exempt_period >= 1200 && $exempt_period <= 1300) && $item['exempt'] == 'on') {
return;
}
And then, enable "Weekend Exemption" on particular threshold settings you want. (Don't change "Default Alerting Options" in Settings)
Of course, only 1 set of exemption can be specified.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Supppresion window
Dirty hack for sure. We need to do this a bit more elegantly, like Jimmy's new Maintenance plugin.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 1 guest