From b9641a0ad1cdec1845479006249c31e608ddc305 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 5 Aug 2013 07:25:33 +0000 Subject: [PATCH] 2013-08-05 Miguel de Dios * util/pandora_snmp.sh: added first and weird version of tool to generate a lot of traps snmp for Pandora. Needs to improve. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8627 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/lib/PandoraFMS/PredictionServer.pm | 3 +++ pandora_server/util/pandora_snmp.sh | 6 ++++++ 3 files changed, 14 insertions(+) create mode 100644 pandora_server/util/pandora_snmp.sh diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 8256d30136..26052dffeb 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2013-08-05 Miguel de Dios + + * util/pandora_snmp.sh: added first and weird version of tool to + generate a lot of traps snmp for Pandora. Needs to improve. + 2013-08-01 Ramon Novoa * lib/PandoraFMS/Core.pm: Changed the name of the self-monitoring XML diff --git a/pandora_server/lib/PandoraFMS/PredictionServer.pm b/pandora_server/lib/PandoraFMS/PredictionServer.pm index 3075b049c2..395d288a3d 100644 --- a/pandora_server/lib/PandoraFMS/PredictionServer.pm +++ b/pandora_server/lib/PandoraFMS/PredictionServer.pm @@ -170,6 +170,9 @@ sub exec_prediction_module ($$$$) { enterprise_hook ('exec_service_module_sla', [$pa_config, $agent_module, $server_id, $dbh]); logger ($pa_config, "End execution", 5); } + elsif ($agent_module->{'custom_string_1'} eq 'SLA_Value') { + #Do none + } else { logger ($pa_config, "Executing service module " . $agent_module->{'id_agente_modulo'} . " " . diff --git a/pandora_server/util/pandora_snmp.sh b/pandora_server/util/pandora_snmp.sh new file mode 100644 index 0000000000..47ee59cdab --- /dev/null +++ b/pandora_server/util/pandora_snmp.sh @@ -0,0 +1,6 @@ +#!/bin/bash +TARGET=127.0.0.1 +while [ 1 ] +do + snmptrap -v 1 -c public $TARGET .1.3.6.1.4.1.2789.2005 192.168.5.2 6 "$RANDOM" 1233433 .1.3.6.1.4.1.2789.2005.1 s "$RANDOM" +done