Yes - won't install without it.chadd wrote:Oh, and do you still need the settings plugin as a prereq to thold? (I am using it, but not sure it is necessary..
Thresholding / Alerting Plugin - Official Q/A Thread
Moderators: Developers, Moderators
-
- Cacti Guru User
- Posts: 1884
- Joined: Mon Oct 16, 2006 5:57 am
- Location: United Kingdom
- Contact:
This is correct - you need to have an entry in global.php in the plugins[] section for this, as it's not been moved over to the new PIA config yet.archon wrote:Hi,
I've installed thold plugin (v0.4.1) but i have a problem with settings plugin (v0.5), in status field it sais "Status: Old Plugin Architecture".
I have PA v2.4 and Cacti v0.8.7d
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
This is because you created a threshold without using a template for it. You can not retroactively go back and add it to a template, you had to have auto-created it.chadd wrote:The "Template Propagation Enabled" check box on the threshold I am creating is grayed out.
Yes, this is by design, it will create it for current graphs of that type. If that is not desired, then create your threshold by selecting the drop down in Graph Management page.chadd wrote: If I choose the "Apply Thresholds" drop-down on the device page, It will auto create thresholds for each interface, seemingly, based on the template I have - but what if I did not want to create thresholds for all the interfaces, or wanted to use different template(s)? Anyway, looks like I have a lot of catching up to do on this plugin . Anyway help would be appreciated.
There is no way, since there can only be 1 template of each type it seems a bit unnecessary (especially since you can't change it). You are using the latest version, so the options are there.chadd wrote:Also, there does not seem to be a way to see what template a particular threshold is using, or even to assign it to one. Is there an SVN version that has the options you are talking about, or did I just screw up the install some how? Thanks again for your help.
Hi.
I'm trying to use th thold plugin, but, even if i get no errors, i see no threshold activated.
I then try to add a template but it tells me that it's already present.
I check the DB and all the tables (thold*) are empty.
What can i do?
I use cacti 0.8.7d, latest plugin settings and latest thold on centos 5.3.
Thanks.
Pier
I'm trying to use th thold plugin, but, even if i get no errors, i see no threshold activated.
I then try to add a template but it tells me that it's already present.
I check the DB and all the tables (thold*) are empty.
What can i do?
I use cacti 0.8.7d, latest plugin settings and latest thold on centos 5.3.
Thanks.
Pier
I MAKED THIS:
""Go to Console -> devices
Click the device you want to apply the Threshhold Template
And then click “Create Graphs for this Host”
Create Graphs for this Host -> Auto-create thresholds
17.4 some threshold examples
Create disk usage Thold template
When (used_space/total_space%) > 90%, cacti will send alert mail
4.1.1 Add “VALUE_OF_HDD_TOTAL” at global _arrays.php
vi /opt/www/html/cacti/include/global _arrays.php
add VALUE_OF_HDD_TOTAL
find
$custom_data_source_types = array(
add
“VALUE_OF_HDD_TOTAL” => “Value of hdd_total data source”,
add a new CDEF
Now go to Console -> Graph Management -> CDEFs click “Add” to add a new CDEF
Add new CDEF named like “Used Disk Space Percent”, at this CDEF, add 5 items:
Item #1 Special Data Source: CURRENT_DATA_SOURCE
Item #2 Custom String: 100
Item #3 Operator: *
Item #4 Special Data Source: VALUE_OF_HDD_TOTAL
Item #5 Operator: /
cdef
create new Threshold Templates
Go to Console -> Threshold Templates -> click Add
For linux host, we choose “ucd/net – CPU Usage – user” template;
for windows host, we choose “Host MIB – Hard Drive Space” template
this depends on what templates we used in device graphic:
Data Field: hdd_used
Enabled: yes
Threshold Type: High / Low
High Threshold: 90
Low Threshold: 0
Data Type: CDEF
""
BUT I DON´T RECEIVED ALERT IN MY EMAIL.
I have not received any e-mail.
SOMEONE CAN HELP ME WITH ALERTS BY EMAIL @ CACTI ?!
I need to do this...
""Go to Console -> devices
Click the device you want to apply the Threshhold Template
And then click “Create Graphs for this Host”
Create Graphs for this Host -> Auto-create thresholds
17.4 some threshold examples
Create disk usage Thold template
When (used_space/total_space%) > 90%, cacti will send alert mail
4.1.1 Add “VALUE_OF_HDD_TOTAL” at global _arrays.php
vi /opt/www/html/cacti/include/global _arrays.php
add VALUE_OF_HDD_TOTAL
find
$custom_data_source_types = array(
add
“VALUE_OF_HDD_TOTAL” => “Value of hdd_total data source”,
add a new CDEF
Now go to Console -> Graph Management -> CDEFs click “Add” to add a new CDEF
Add new CDEF named like “Used Disk Space Percent”, at this CDEF, add 5 items:
Item #1 Special Data Source: CURRENT_DATA_SOURCE
Item #2 Custom String: 100
Item #3 Operator: *
Item #4 Special Data Source: VALUE_OF_HDD_TOTAL
Item #5 Operator: /
cdef
create new Threshold Templates
Go to Console -> Threshold Templates -> click Add
For linux host, we choose “ucd/net – CPU Usage – user” template;
for windows host, we choose “Host MIB – Hard Drive Space” template
this depends on what templates we used in device graphic:
Data Field: hdd_used
Enabled: yes
Threshold Type: High / Low
High Threshold: 90
Low Threshold: 0
Data Type: CDEF
""
BUT I DON´T RECEIVED ALERT IN MY EMAIL.
I have not received any e-mail.
SOMEONE CAN HELP ME WITH ALERTS BY EMAIL @ CACTI ?!
I need to do this...
Graph with multiple data template
Hi,
In Thold 0.4.1, if a graph use multiple data templates, thold_add wizard can only display datasources for the first data template. Therefore you can't create thold for all datasources.
I modified thold_add.php so that I can select and create thold for all datasources of a graph.
I posted here in case somebody needs this.
In Thold 0.4.1, if a graph use multiple data templates, thold_add wizard can only display datasources for the first data template. Therefore you can't create thold for all datasources.
I modified thold_add.php so that I can select and create thold for all datasources of a graph.
Code: Select all
--- thold_add.php original
+++ thold_add.php modified
@@ -493,9 +493,15 @@
LEFT JOIN graph_templates_item ON graph_templates_item.task_item_id = data_template_rrd.id
LEFT JOIN graph_local ON graph_local.id=graph_templates_item.local_graph_id
WHERE graph_local.id = ' . $graph);
+ $dt_sql = 'SELECT DISTINCT data_template_rrd.local_data_id
+ FROM data_template_rrd
+ LEFT JOIN graph_templates_item ON graph_templates_item.task_item_id = data_template_rrd.id
+ LEFT JOIN graph_local ON graph_local.id=graph_templates_item.local_graph_id
+ WHERE graph_local.id = ' . $graph;
$dss = db_fetch_assoc('SELECT DISTINCT id, data_source_name
FROM data_template_rrd
- WHERE local_data_id = ' . $dt . ' ORDER BY data_source_name');
+ WHERE local_data_id IN (' . $dt_sql . ') ORDER BY data_source_name');
/* show the data source options */
?>
<tr>
Message From Thold Incorrect
My Cacti:
quote]Cacti Version - 0.8.7c
Plugin Architecture - 2.3
Poller Type - CMD.php
Server Info - FreeBSD 7.0-RELEASE
Web Server - Apache/2.2.6 (FreeBSD) mod_ssl/2.2.6 OpenSSL/0.9.8e DAV/2 PHP/5.2.6 with Suhosin-Patch
PHP - 5.2.6
PHP Extensions - session, Reflection, date, libxml, apache2handler, dbase, ctype, gd, mcrypt, mysql, openssl, pdf, standard, sockets, xml, pcre, SimpleXML, SPL, dom, xmlreader, xmlrpc, xmlwriter, zlib, PDO, pdo_mysql, json, snmp
MySQL - 5.0.45
RRDTool - 1.2.23
SNMP - 5.4.1
Plugins
quote]Cacti Version - 0.8.7c
Plugin Architecture - 2.3
Poller Type - CMD.php
Server Info - FreeBSD 7.0-RELEASE
Web Server - Apache/2.2.6 (FreeBSD) mod_ssl/2.2.6 OpenSSL/0.9.8e DAV/2 PHP/5.2.6 with Suhosin-Patch
PHP - 5.2.6
PHP Extensions - session, Reflection, date, libxml, apache2handler, dbase, ctype, gd, mcrypt, mysql, openssl, pdf, standard, sockets, xml, pcre, SimpleXML, SPL, dom, xmlreader, xmlrpc, xmlwriter, zlib, PDO, pdo_mysql, json, snmp
MySQL - 5.0.45
RRDTool - 1.2.23
SNMP - 5.4.1
Plugins
- Thresholds (thold - v0.4.1)
Global Plugin Settings (settings - v0.5)
Device Monitoring (monitor - v0.8.2)
Network Tools (tools - v0.3)
Host Info (hostinfo - v0.2)
Nagios plugin for Cacti (npc - v2.0.0b)
PHP Network Weathermap (weathermap - v0.95b)
Read-only Devices Tab (devices - v0.4)
Create Aggregate Graphs (aggregate - v0.70 Beta 1)
- Attachments
-
- xxxx - Traffic - xxxx [traffic_in] went below threshold of 20 with 4.2542
- traffic.JPG (35.7 KiB) Viewed 12281 times
Re: Thresholding / Alerting Plugin - Official Q/A Thread
Hi Devs,
My Alerting/Thold is working perfectly but I want to edit the content of the email notification when thold is breached. What should I do if I want to remove the graph that comes with the alert?
Thanks!
My Alerting/Thold is working perfectly but I want to edit the content of the email notification when thold is breached. What should I do if I want to remove the graph that comes with the alert?
Thanks!
Re: Thresholding / Alerting Plugin - Official Q/A Thread
Check under Settings, there is a field for editing the message.boichico wrote:Hi Devs,
My Alerting/Thold is working perfectly but I want to edit the content of the email notification when thold is breached. What should I do if I want to remove the graph that comes with the alert?
Thanks!
Re: Thresholding / Alerting Plugin - Official Q/A Thread
I have a question about the notification fields we can use when sending out an alert. It seems that when you use the <THRESHOLDNAME> option in the hi/lo alert, it is not using the threshold name listed. But instead using the Data source name.
For instance, I have a switch named 'CSS NET 10.254' and the data source says 'CSS NET 10.254 - TRAFFIC - 2'. So when I set up the threshold for this port I name it 'CSS NET 10.254 [SM-PHP] - TRAFFIC - 2'
So I enter in the message to be setting in the threshold global setting page and it is
<html><body>An alert has been issued that requires your attention. <br><br><b>Host</b>: <DESCRIPTION> (<HOSTNAME>)<br><b>URL</b>: <URL><br><b>Message</b>: <SUBJECT><br><b>Threshold</b>: <THRESHOLDNAME><br><b>DSNAME</b>: <DSNAME></body></html>
When the message is sent it shows:
Host: CSS Web Net 10.254 (10.10.100.254)
URL: http://10.5.0.75///graph.php?local_grap ... 4&rra_id=1
Message: CSS Web Net 10.254 - Traffic - 2 [traffic_out] is still above threshold of 1 with 3538.4833
Threshold: CSS Web Net 10.254 - Traffic - 2
DSNAME: traffic_out
In investigating, it is pulling the thresholdname from the data_template_data table and using the cache name which is the data source name and not pulling the threshold name from the thold_data. This makes it hard to identify which threshold is sending the notification without looking at the threshold list to see which one has been triggered.
I have found that if I go to the data source option and add the extra information into that name it reports as I expect but it would be more convenient if the thresholdname parameter actually used the name from the threshold setup page.
Is it possible that this can be corrected in a future version?
Darrell
PS Forgot to add this. Using Cacti 8.7g with architecture 2.8 and thold 4.4
For instance, I have a switch named 'CSS NET 10.254' and the data source says 'CSS NET 10.254 - TRAFFIC - 2'. So when I set up the threshold for this port I name it 'CSS NET 10.254 [SM-PHP] - TRAFFIC - 2'
So I enter in the message to be setting in the threshold global setting page and it is
<html><body>An alert has been issued that requires your attention. <br><br><b>Host</b>: <DESCRIPTION> (<HOSTNAME>)<br><b>URL</b>: <URL><br><b>Message</b>: <SUBJECT><br><b>Threshold</b>: <THRESHOLDNAME><br><b>DSNAME</b>: <DSNAME></body></html>
When the message is sent it shows:
Host: CSS Web Net 10.254 (10.10.100.254)
URL: http://10.5.0.75///graph.php?local_grap ... 4&rra_id=1
Message: CSS Web Net 10.254 - Traffic - 2 [traffic_out] is still above threshold of 1 with 3538.4833
Threshold: CSS Web Net 10.254 - Traffic - 2
DSNAME: traffic_out
In investigating, it is pulling the thresholdname from the data_template_data table and using the cache name which is the data source name and not pulling the threshold name from the thold_data. This makes it hard to identify which threshold is sending the notification without looking at the threshold list to see which one has been triggered.
I have found that if I go to the data source option and add the extra information into that name it reports as I expect but it would be more convenient if the thresholdname parameter actually used the name from the threshold setup page.
Is it possible that this can be corrected in a future version?
Darrell
PS Forgot to add this. Using Cacti 8.7g with architecture 2.8 and thold 4.4
Re: Thresholding / Alerting Plugin - Official Q/A Thread
As a workaround, try to modify 'plugins/thold/thold_functions.php'.Skyla wrote:In investigating, it is pulling the thresholdname from the data_template_data table and using the cache name which is the data source name and not pulling the threshold name from the thold_data. This makes it hard to identify which threshold is sending the notification without looking at the threshold list to see which one has been triggered.
I have found that if I go to the data source option and add the extra information into that name it reports as I expect but it would be more convenient if the thresholdname parameter actually used the name from the threshold setup page.
(I'm using thold-0.4.4-41, but not fully tested)
At line 527:
At line 561, 592, 631, 649, 694, 622:$thold_alert_text = str_replace('<THRESHOLDNAME>', $desc, $thold_alert_text);
to
$thold_alert_text = str_replace('<THRESHOLDNAME>', $item['name'], $thold_alert_text);
* If you want to know particular datasource name which was triggered, leave "($thold_show_datasource ...)".$subject = $desc . ($thold_show_datasource ? " [$name]" : '') . ...
to
$subject = $item['name'] . ...
Who is online
Users browsing this forum: No registered users and 1 guest