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:
slerena 2011-09-30 11:32:02 +00:00
parent 4a8060f7d7
commit 29baddf275
3 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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));

View File

@ -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);
}
}