mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2013-07-03 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Assign default values to the _snmp_fx_ macros from variable bindings. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8469 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
13c8e650ed
commit
846b4a12c2
@ -1,3 +1,8 @@
|
|||||||
|
2013-07-03 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/Core.pm: Assign default values to the _snmp_fx_ macros
|
||||||
|
from variable bindings.
|
||||||
|
|
||||||
2013-07-01 Ramon Novoa <rnovoa@artica.es>
|
2013-07-01 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* lib/PandoraFMS/Core.pm: Resolve numeric ids to strings before writing
|
* lib/PandoraFMS/Core.pm: Resolve numeric ids to strings before writing
|
||||||
|
@ -2771,6 +2771,23 @@ 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++) {
|
||||||
|
my $macro_name = '_snmp_f' . $i . '_';
|
||||||
|
|
||||||
|
last if (! defined ($custom_values[$i-1]));
|
||||||
|
if ($custom_values[$i-1] =~ m/= \S+: (.*)/) {
|
||||||
|
my $value = $1;
|
||||||
|
|
||||||
|
# Strip leading and trailing double quotes
|
||||||
|
$value =~ s/^"//;
|
||||||
|
$value =~ s/"$//;
|
||||||
|
|
||||||
|
$macros{$macro_name} = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Evaluate _snmp_fx_ macros
|
# Evaluate _snmp_fx_ macros
|
||||||
for (my $i = 1; $i <= 6; $i++) {
|
for (my $i = 1; $i <= 6; $i++) {
|
||||||
my $macro_name = '_snmp_f' . $i . '_';
|
my $macro_name = '_snmp_f' . $i . '_';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user