2011-09-29 Sancho Lerena <slerena@artica.es>
* pandora_server/lib/PandoraFMS/SNMPServer.pm pandora_server/lib/PandoraFMS/Core.pm: SNMP Alerts now receibe trap type on the _data_ macro. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5028 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4a8060f7d7
commit
29baddf275
|
@ -1,3 +1,9 @@
|
|||
2011-09-29 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* pandora_server/lib/PandoraFMS/SNMPServer.pm
|
||||
pandora_server/lib/PandoraFMS/Core.pm: SNMP Alerts now receibe trap type on
|
||||
the _data_ macro.
|
||||
|
||||
2011-09-28 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* util/recon_scripts/snmpdevices.pl: Fixed a bug which creates duplicated
|
||||
|
|
|
@ -1588,8 +1588,8 @@ Execute alerts that apply to the given SNMP trap.
|
|||
|
||||
=cut
|
||||
##########################################################################
|
||||
sub pandora_evaluate_snmp_alerts ($$$$$$$$) {
|
||||
my ($pa_config, $trap_id, $trap_agent, $trap_oid,
|
||||
sub pandora_evaluate_snmp_alerts ($$$$$$$$$) {
|
||||
my ($pa_config, $trap_id, $trap_agent, $trap_oid, $trap_type,
|
||||
$trap_oid_text, $trap_value, $trap_custom_oid, $dbh) = @_;
|
||||
|
||||
|
||||
|
@ -1724,7 +1724,7 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$) {
|
|||
WHERE talert_actions.id_alert_command = talert_commands.id
|
||||
AND talert_actions.id = ?', $alert->{'id_alert'});
|
||||
|
||||
my $trap_rcv_full = $trap_oid . " " . $trap_value. " ". $trap_custom_oid;
|
||||
my $trap_rcv_full = $trap_oid . " " . $trap_value. " ". $trap_type. " " . $trap_custom_oid;
|
||||
|
||||
pandora_execute_action ($pa_config, $trap_rcv_full, \%agent, \%alert, 1, $action, undef, $dbh, $timestamp) if (defined ($action));
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ sub pandora_snmptrapd {
|
|||
logger ($pa_config, "Received SNMP Trap from $source", 4);
|
||||
|
||||
# Evaluate alerts for this trap
|
||||
pandora_evaluate_snmp_alerts ($pa_config, $trap_id, $source, $oid, $oid, $value, $custom_oid, $dbh);
|
||||
pandora_evaluate_snmp_alerts ($pa_config, $trap_id, $source, $oid, $type, $oid, $value, $custom_oid, $dbh);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue