2013-07-05 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Exported subst_alert_macros. Added support for an arbitrarily large number of _snmp_fx_ macros. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8481 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
cf2afde6fd
commit
a2e554f5dd
|
@ -1,3 +1,8 @@
|
|||
2013-07-05 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Core.pm: Exported subst_alert_macros. Added support
|
||||
for an arbitrarily large number of _snmp_fx_ macros.
|
||||
|
||||
2013-07-05 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* lib/PandoraFMS/PluginServer.pm: Added agent and module macros to
|
||||
|
|
|
@ -196,6 +196,7 @@ our @EXPORT = qw(
|
|||
pandora_server_statistics
|
||||
pandora_self_monitoring
|
||||
pandora_process_policy_queue
|
||||
subst_alert_macros
|
||||
get_agent_from_addr
|
||||
get_agent_from_name
|
||||
@ServerTypes
|
||||
|
@ -2773,10 +2774,9 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$$) {
|
|||
|
||||
# Assign default values to the _snmp_fx_ macros from variable bindings
|
||||
my @custom_values = split ("\t", $trap_custom_oid);
|
||||
for (my $i = 1; $i <= 6; $i++) {
|
||||
for (my $i = 1; defined ($custom_values[$i-1]); $i++) {
|
||||
my $macro_name = '_snmp_f' . $i . '_';
|
||||
|
||||
last if (! defined ($custom_values[$i-1]));
|
||||
if ($custom_values[$i-1] =~ m/= \S+: (.*)/) {
|
||||
my $value = $1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue