Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Module_Exec incorrect value being returned
Hi Guys,

I recently just started using Pandora FMS and am setting up monitoring on our internal routers for various locations. I'm trying to set them up with a broker agent for each node as I'd like them to all be in configuration files.

Below is my configuration that performs a simple ping test (returns 1 if host is up, returns 0 if host is down)

module_name Host Alive
module_type generic_data
module_exec /bin/ping -c 1 > /dev/null 2>&1; if [ $? == 0 ]; then echo 1; else echo 0; fi
module_timeout 10

If I run this command from the console I receive a value of 1 but when ran from the module Pandora always returns the later value as if the test failed. This also occurs with nmap and a few other tests I would like to perform. But the really weird thing is that If I put the following in Pandora I get a valid ping response back.

module_name Host Alive
module_type generic_string
module_exec /bin/ping -c 1
module_timeout 10

What am I doing wrong or is this an issue with Pandora?

When I have problem with packet loss, I like to configure this module:

module_name Ping X
module_type generic_proc
module_exec ping -c 2 | grep received | gawk '{print $4}'

Check the results with this module.


Users browsing this thread: 1 Guest(s)

(c) 2006-2018 Artica Soluciones Tecnol├│gicas. Contents of this wiki are under Create Common Attribution v3 licence. | |

Theme © MyBB Themes