From 5727f58c45a2e88c698537bb4021b5ac6aaacd89 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 19 Nov 2009 13:40:42 +0000 Subject: [PATCH] 2009-11-19 Sancho Lerena * lib/PandoraFMS/Core.pm: Added id_alert to alert macros. Could be useful to pass a numeric ID to do alert correlation externally to Pandora FMS. * util/plugin/ssh_pandoraplugin.sh: Fixed bug in user parameter processing. Thanks Victoria. * util/plugin/udp_nmap_plugin.sh: Removed output of errors. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2117 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 11 +++++++++++ pandora_server/lib/PandoraFMS/Core.pm | 1 + pandora_server/util/plugin/ssh_pandoraplugin.sh | 4 ++-- pandora_server/util/plugin/udp_nmap_plugin.sh | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 442d11b0eb..65103d2a16 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,14 @@ +2009-11-19 Sancho Lerena + + * lib/PandoraFMS/Core.pm: Added id_alert to alert macros. Could be + useful to pass a numeric ID to do alert correlation externally to + Pandora FMS. + + * util/plugin/ssh_pandoraplugin.sh: Fixed bug in user parameter + processing. Thanks Victoria. + + * util/plugin/udp_nmap_plugin.sh: Removed output of errors. + 2009-11-19 Ramon Novoa * lib/PandoraFMS/Core.pm: Check for empty module/agent when processing diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 3c98add008..6352f64a72 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -462,6 +462,7 @@ sub pandora_execute_action ($$$$$$$$) { _module_ => (defined ($module)) ? $module->{'nombre'} : '', _moduledescription_ => (defined ($module)) ? $module->{'descripcion'} : '', _id_agent_ => (defined ($module)) ? $module->{'id_agente'} : '', + _id_alert_ => $alert->{'id'} ); diff --git a/pandora_server/util/plugin/ssh_pandoraplugin.sh b/pandora_server/util/plugin/ssh_pandoraplugin.sh index a90c1e28bc..ae3a14dec8 100755 --- a/pandora_server/util/plugin/ssh_pandoraplugin.sh +++ b/pandora_server/util/plugin/ssh_pandoraplugin.sh @@ -3,7 +3,7 @@ # (c) Sancho Lerena 2008-2009 # Default values -USER="" +USER="root" HOST="" COMMAND="" PORT=22 @@ -39,7 +39,7 @@ while getopts ":hp:t:c:u:" optname help ;; "u") - PORT=$OPTARG + USER=$OPTARG ;; "t") HOST=$OPTARG diff --git a/pandora_server/util/plugin/udp_nmap_plugin.sh b/pandora_server/util/plugin/udp_nmap_plugin.sh index 89fb169659..dcf90c6ac7 100755 --- a/pandora_server/util/plugin/udp_nmap_plugin.sh +++ b/pandora_server/util/plugin/udp_nmap_plugin.sh @@ -50,5 +50,5 @@ while getopts ":hp:t:" optname done # execution -nmap -T5 -p $PORT -sU $HOST | grep open | wc -l +nmap -T5 -p $PORT -sU $HOST | grep open | wc -l 2> /dev/null