forsan_102218
Sep 16, 2014Nimbostratus
External/Scripted monitor fails
Hi,
I need to have a monitor that do a curl on a url witch returns a specific value. I could have done this with the regular http monitor but I need to insert a random number into the URI to avoid caching in the internal proxy.
I have tried to import the script and create an external monitor but without any results. I'm checking the access log on the apache server and I can not see any requests. I have also created a "script" monitor where I put the script in the /config/eav/ directory. In the script monitor I can set it in the debug mode and I get the following in the log.
********** Debugging session beginning at: Tue Sep 16 21:57:08 2014
Arguments 1-2:
::ffff:192.168.20.1
80
Environment variables:
DEBUG=yes
FILENAME=test
MON_TMPL_NAME=/Common/test
NODE_IP=::ffff:192.168.20.1
NODE_PORT=80
--
!/bin/sh
invalid line from file /config/eav/test:
'!/bin/sh'
If I run the script manually it works as expected, but not when the monitor is executing the script. I have 755 as access:
-rwxr-xr-x 1 root root 2267 Sep 16 21:51 test
Regards Andréas