thold plugin 0.4.6 screenshots

Support questions about the Threshold plugin

Moderators: Developers, Moderators

noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

thold plugin 0.4.6 screenshots

Post by noname »

Some screenshots of new thold plugin for users and thold contributors before 0.4.6:

thold-0.4.6:
- http://docs.cacti.net/plugin:thold

Default settings in "Cacti Settings (Thresholds)"
Image

Notification can be selectable per device
Image

Console -> Notification Lists (sample)
Image

Console -> Notification Lists -> General
Image

Console -> Notification Lists -> Hosts
Image

Sorry, no screenshot for "Thresholds" tab.

Console -> Notification Lists -> Templates
Image

Per threshold settings -- "Warning" notification is available (for High/Low and Time Based threshold)
Image

Per threshold settings -- "RPN Expression" (sample)
Image
This is sample.
I tried to calculate traffics as percentages.
  • Ordinary expression: (|ds:traffic_in| * 8) / |query_ifSpeed| * 100
  • RPN expression: |ds:traffic_in|,8,*,|query_ifSpeed|,/,100,*
Result:
Image
EDIT: "Trigger = Never" means "don't alert", so the above settings are not correct..

Graph for Fa0/1 (100Mbits interface):
Image
6.32k / 100M = 0.0000632 (0.00632%)
18.49k / 100M = 0.0001849 (0.01849%)


Graph for Gi0/1 (1Gbits interface):
Image
19.48k / 1G = 0.00001948 (0.001948%)
7.19k / 1G = 0.00000719 (0.000719%)


'thold' tab view at that moment
Image
Alert history during last 30 days can be seen in 'Log' tab.
Last edited by noname on Fri Oct 07, 2011 11:00 am, edited 1 time in total.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: thold plugin 0.4.6 screenshots

Post by TheWitness »

Trigger 'Never' means don't Alert. Also, for 1Gb interfaces, you should use |query_ifHighSpeed|, which is reported in units of MegaBits. For example, a 1Gb interface reports 1000, 1Gb. So, the percentage works a bit differently:

traffic_in and traffic_out are represented in 'octets' or 'bytes'. Therefore percentage becomes:

traffic_in (octets/second) / (ifHighSpeed (10-e6 bits) * 1000000 (10e6) / 8 (bytes/bit)) * 100

Or (I think):

Code: Select all

|ds:traffic_in|,|query_ifHighSpeed|,1000000,*,8,/,/,100,*
We need to add ifHighSpeed to the XML file. To be done shortly. No reason anyone should have to customize to do this.

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?
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: thold plugin 0.4.6 screenshots

Post by noname »

TheWitness wrote:Trigger 'Never' means don't Alert.
Oops, I've misunderstood.. I'll correct my original post.
TheWitness wrote:Also, for 1Gb interfaces, you should use |query_ifHighSpeed|, which is reported in units of MegaBits. For example, a 1Gb interface reports 1000, 1Gb.
Hmm, that's indeed.

On gigabit interfaces, ifSpeed returns 1,000,000,000 and ifHighSpeed returns 1,000.
It's better to use ifHighSpeed than ifSpeed for calculating utilization?
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Re: thold plugin 0.4.6 screenshots

Post by sukanta »

Great Improvement::

Following problem face during upgradation from 0.4.3

After running : upgrade.php
PHP Fatal error: Call to undefined function get_hash_thold_template() in /var/www/html/cacti/plugins/thold/includes/database.php on line 201

Also It is taking too much time (Not Finishing) ehen trying to create thresholdl for traffic_in

In MySQL Found:


Copying to tmp table SELECT DISTINCT field_name FROM data_local AS dl INNER JOIN host_snmp_cache AS hsc ON

10/08/2011 12:06:31 AM - THOLD: Poller[0] WARNING: Unsupported Field '|QUERY_IFHIGHSPEED|'



Cacti Version : 0.8.7g
OS: Centos 5.6
Settings: 0.7.1

===================

It will be great helpful if we got the down report with duration of each events in log.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: thold plugin 0.4.6 screenshots

Post by TheWitness »

Thanks for reporting the database.php issue. It's minor. However, you might want to save your templates once to provide them a hash prior to exporting. 0.4.6-2 has been released to address that.

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?
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Re: thold plugin 0.4.6 screenshots

Post by sukanta »

Thanks for resolving upgrade issue..

Still followings two exists:

1) It is taking too much time (Not Finishing) when trying to create threshold for traffic_in/out. for cpu ok.

In MySQL Found:

Copying to tmp table SELECT DISTINCT field_name FROM data_local AS dl INNER JOIN host_snmp_cache AS hsc ON dl.snmp_query_id=hsc.snmp_query_id WHERE dl.data_template_id=41


2) high speed not supported

10/08/2011 12:06:31 AM - THOLD: Poller[0] WARNING: Unsupported Field '|QUERY_IFHIGHSPEED|'
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: thold plugin 0.4.6 screenshots

Post by TheWitness »

Run two commands for me:

Code: Select all

explain SELECT DISTINCT field_name FROM data_local AS dl INNER JOIN host_snmp_cache AS hsc ON dl.snmp_query_id=hsc.snmp_query_id WHERE dl.data_template_id=41

Code: Select all

show create table data_local

Code: Select all

show create table host_snmp_cache
For the second issue, here is a patch that we will be releasing soon. You will have to reindex your hosts though:

Code: Select all

php -q poller_reindex_hosts.php
Attachments
interface.xml
(4.4 KiB) Downloaded 252 times
rrd.tar.gz
(20 KiB) Downloaded 239 times
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?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: thold plugin 0.4.6 screenshots

Post by TheWitness »

If you are using boost, you also need boost-5.1-1.tgz from the Cacti Doc's site.
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?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: thold plugin 0.4.6 screenshots

Post by TheWitness »

I can get this a bit more optimized. I'll release as 0.4.7 with some enhancements for Down Host detection.

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?
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Re: thold plugin 0.4.6 screenshots

Post by sukanta »

TheWitness wrote:Run two commands for me:

Code: Select all

explain SELECT DISTINCT field_name FROM data_local AS dl INNER JOIN host_snmp_cache AS hsc ON dl.snmp_query_id=hsc.snmp_query_id WHERE dl.data_template_id=41
Hanging the Mysql Process where snmp_cache is large. For new installation working fine .But why u need this.Old thold working fine on same setup..

Code: Select all

show create table data_local
mysql> show create table data_local;
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| data_local | CREATE TABLE `data_local` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`data_template_id` mediumint(8) unsigned NOT NULL default '0',
`host_id` mediumint(8) unsigned NOT NULL default '0',
`snmp_query_id` mediumint(8) NOT NULL default '0',
`snmp_index` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=19028 DEFAULT CHARSET=latin1 |
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Code: Select all

show create table host_snmp_cache
mysql> show create table host_snmp_cache;
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| host_snmp_cache | CREATE TABLE `host_snmp_cache` (
`host_id` mediumint(8) unsigned NOT NULL default '0',
`snmp_query_id` mediumint(8) unsigned NOT NULL default '0',
`field_name` varchar(50) NOT NULL default '',
`field_value` varchar(255) default NULL,
`snmp_index` varchar(255) NOT NULL default '',
`oid` text NOT NULL,
PRIMARY KEY (`host_id`,`snmp_query_id`,`field_name`,`snmp_index`),
KEY `host_id` (`host_id`,`field_name`),
KEY `snmp_index` (`snmp_index`),
KEY `field_name` (`field_name`),
KEY `field_value` (`field_value`),
KEY `snmp_query_id` (`snmp_query_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)


For the second issue, here is a patch that we will be releasing soon. You will have to reindex your hosts though:

Code: Select all

php -q poller_reindex_hosts.php
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: thold plugin 0.4.6 screenshots

Post by TheWitness »

Not much of an update. Test SVN#1816. I need your feedback prior to releasing 0.4.7.
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?
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Re: thold plugin 0.4.6 screenshots

Post by sukanta »

TheWitness wrote:Not much of an update. Test SVN#1816. I need your feedback prior to releasing 0.4.7.

No Luck with that SVN also.Still MYSQL hanging on that query when number of entry against that template (like traffic_out) is high.

This is causing due to following function which is part of RPN:

As a workaround disabled that function in thold_templates.php & everything running smoothly.



$replacements = db_fetch_assoc("SELECT DISTINCT field_name
FROM data_local AS dl
INNER JOIN host_snmp_cache AS hsc
ON dl.snmp_query_id=hsc.snmp_query_id
WHERE dl.data_template_id=" . $thold_item_data['data_template_id']);

Thanks to providing modified rrd.php which solve IfHighSpeed issue..

Pl issue patch for new cacti as there are some modification/correction found in SVN/forum...
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: thold plugin 0.4.6 screenshots

Post by TheWitness »

Oh, I see. I patched for thold.php and thold_template.php. Let me get thold_template.php fixed as well.

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?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: thold plugin 0.4.6 screenshots

Post by TheWitness »

Run these three commands as let me know if the performance is a bit better:

Code: Select all

ALTER TABLE data_local ADD INDEX data_template_id(data_template_id);
ALTER TABLE data_local ADD INDEX snmp_query_id(snmp_query_id);
ALTER TABLE host_snmp_cache ADD INDEX snmp_query_id(snmp_query_id);
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?
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Re: thold plugin 0.4.6 screenshots

Post by sukanta »

TheWitness wrote:Run these three commands as let me know if the performance is a bit better:

Code: Select all

ALTER TABLE data_local ADD INDEX data_template_id(data_template_id);
ALTER TABLE data_local ADD INDEX snmp_query_id(snmp_query_id);
ALTER TABLE host_snmp_cache ADD INDEX snmp_query_id(snmp_query_id);
TheWitness

Same problem.

Also another major issue found that template Filtering not working when selecting Status either Breached/Triggered..Till 0.4.4 it was fine.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests