After threshold breached send SNMP traps
Moderators: Developers, Moderators
-
- Posts: 23
- Joined: Wed Apr 03, 2013 8:17 pm
After threshold breached send SNMP traps
Is there a plugin that will do that as in if a thold is breached it sends an email But can we setup trap information from it as well.
i saw this but its dated back like 5 years ago.
http://blog.cactiusers.org/2009/02/25/t ... -of-thold/
thanks
i saw this but its dated back like 5 years ago.
http://blog.cactiusers.org/2009/02/25/t ... -of-thold/
thanks
- browniebraun
- Developer
- Posts: 791
- Joined: Tue Jun 13, 2006 1:17 am
- Location: Cologne, Germany
Re: After threshold breached send SNMP traps
Works with the latest SVN release of THOLD in combination with the Cacti SNMPAgent plugin for net-snmp.
I still need to commit some changes before Jimmy can release a new version of THOLD, which will also include a THOLD daemon.
(This will allow to run the threshold monitoring on a dedicated server without any influence to the poller itself - I'm monitoring more than 125k of thresholds with CDEFs using that way.)
Regards
-Andi
I still need to commit some changes before Jimmy can release a new version of THOLD, which will also include a THOLD daemon.
(This will allow to run the threshold monitoring on a dedicated server without any influence to the poller itself - I'm monitoring more than 125k of thresholds with CDEFs using that way.)
Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick!
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
Re: After threshold breached send SNMP traps
Hi guys
I needed to send antoher information besides email when a threshold is breached .
I searched for a way to run an external script but it seems now its not possible.
Also tried to edit thold_functions.php file but im not a programmer
I added Cacti SNMPAgent plugin to the cacti server but the default MIB files dont have CACTI-THOLD-MIB in it.
I am attaching the picture which references CACTI-THOLD-MIB.
Can you please tell me where from to download the CACTI-THOLD-MIB?
Thanks in advance.
I needed to send antoher information besides email when a threshold is breached .
I searched for a way to run an external script but it seems now its not possible.
Also tried to edit thold_functions.php file but im not a programmer
I added Cacti SNMPAgent plugin to the cacti server but the default MIB files dont have CACTI-THOLD-MIB in it.
I am attaching the picture which references CACTI-THOLD-MIB.
Can you please tell me where from to download the CACTI-THOLD-MIB?
Thanks in advance.
- Attachments
-
- snmp_notifcations_CACTI.jpg (184.71 KiB) Viewed 13368 times
Re: After threshold breached send SNMP traps
0hhhh is there a way i can send the SNMPTrap then after it sends the Thold alert ?
thanks
thanks
Re: After threshold breached send SNMP traps
I might of found a workaround hack fix but i gotta get it better
But i have the Thold syslog to a facility 4 and then i take that data and parse it to another syslog file on the server which then i inspect all incomging logs and read per line and script based on template name and do lookups and then IF confirmed issue i script a snmptrap command.
I need to look for somethign better then a constant tail -f and do something like a Fail2Ban setup but not for just IPs but more for If certain keywords show up from a template i can trigger other scripts and / or snmptrap etc etc
But i have the Thold syslog to a facility 4 and then i take that data and parse it to another syslog file on the server which then i inspect all incomging logs and read per line and script based on template name and do lookups and then IF confirmed issue i script a snmptrap command.
I need to look for somethign better then a constant tail -f and do something like a Fail2Ban setup but not for just IPs but more for If certain keywords show up from a template i can trigger other scripts and / or snmptrap etc etc
Re: After threshold breached send SNMP traps
You can use snmpagent plugin available in sourceforge along with Thold 0.6.0 (updated by snmpagent developer) available in beta in Cacti SVN.
It works great apart from two issues if using snmp v3:
1. When setting up snmp v3 with SHA, the plugin tries to confirm the authoritative password. Even when the password in both fields match, it throws an error saying they don't match! I have worked around this by commenting out the check function in manager.php of snmpagent plugin. I have raised it with the developer and hopefully it will officially be fixed:
Original Code:
Uncommented Code:
2. It seems Engine ID for SNMP v3 traps has not been taken into acount. So when the plugin generates traps every trap has a different engine ID which can not be managed by many snmp receivers as they require one unique engin ID per device. Again I have worked around this by hard coding a engine-id in setup.php of snmpagent plugin:
Original Code:
Changed Code:
Note that in the above code the "e" argument of snmptrap tool is used. The engine ID has to be in HEX. I have just used an example!
Also note that cacti-snmpagent needs snmptrap binary and you can point to it in the settings in Cacti
An official fix to both these issues would be good. I have raised both with the snmpagent developer.
It works great apart from two issues if using snmp v3:
1. When setting up snmp v3 with SHA, the plugin tries to confirm the authoritative password. Even when the password in both fields match, it throws an error saying they don't match! I have worked around this by commenting out the check function in manager.php of snmpagent plugin. I have raised it with the developer and hopefully it will officially be fixed:
Original Code:
Code: Select all
if ($save["snmp_version"] == 3 && ($save["snmp_auth_password"] != $save["snmp_auth_password_confirm"])) {
raise_message(4);
}
Code: Select all
/*if ($save["snmp_version"] == 3 && ($save["snmp_auth_password"] != $save["snmp_auth_password_confirm"])) {
raise_message(4);
}*/
Original Code:
Code: Select all
$args = " -v 3 " . (($notification_manager["snmp_message_type"] == 2 )? " -Ci " : "" ) . " -u " . $notification_manager["snmp_username"];
Code: Select all
$args = " -v 3 -e 12345678" . (($notification_manager["snmp_message_type"] == 2 )? " -Ci " : "" ) . " -u " . $notification_manager["snmp_username"];
Also note that cacti-snmpagent needs snmptrap binary and you can point to it in the settings in Cacti
An official fix to both these issues would be good. I have raised both with the snmpagent developer.
- browniebraun
- Developer
- Posts: 791
- Joined: Tue Jun 13, 2006 1:17 am
- Location: Cologne, Germany
Re: After threshold breached send SNMP traps
A new version of the SNMPAgent plugin addresses both bugs.
Password validation is working now and administrators are allowed to configure the SNMP Engine ID per notification receiver individually.
Additionally a new, much much faster and more scaling persistent daemon for Net-SNMP has become available with this new release.
Best regards
-Andi
Password validation is working now and administrators are allowed to configure the SNMP Engine ID per notification receiver individually.
Additionally a new, much much faster and more scaling persistent daemon for Net-SNMP has become available with this new release.
Best regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick!
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
Re: After threshold breached send SNMP traps
Hello Browniebraun,
How can we config the plugin snmpagent on cacti version 1.2.23/1.2.24, we want to send snmptraps from thold to another server.
Best,
How can we config the plugin snmpagent on cacti version 1.2.23/1.2.24, we want to send snmptraps from thold to another server.
Best,
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: After threshold breached send SNMP traps
Andi/Browniebraun may not reach out to you. Let's hope he does.
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 0 guests