Run perl/pyton script
Posted: Thu Jan 30, 2014 4:01 am
Hi.
I'm facing for the first time the development of plugins/command for Nagios Core. Nagios Core is running under a centos6.4 machine. Actually I'm stuck on the command definition, calling script. Here what I'm trying to do :
I'm defining command that run single unix command or run a python / perl script . For example :
define command {
command_name message
command_line /usr/bin/python /usr/lib/nagios/plugins/msg.py admin@local 'MyText'
}
Nothing happen. Calling it directly from root with :
/usr/bin/python /usr/lib/nagios/plugins/msg.py admin@local 'MyText' work perfectly .
I don't get if the problems are at unix level ( permits / ownership ) or at nagios level ( can't run / can't call )
The msg.py file is xwr by user ( nagios is the owner ) , by group and executable,readable by all
What am I doing wrong?
I'm facing for the first time the development of plugins/command for Nagios Core. Nagios Core is running under a centos6.4 machine. Actually I'm stuck on the command definition, calling script. Here what I'm trying to do :
I'm defining command that run single unix command or run a python / perl script . For example :
define command {
command_name message
command_line /usr/bin/python /usr/lib/nagios/plugins/msg.py admin@local 'MyText'
}
Nothing happen. Calling it directly from root with :
/usr/bin/python /usr/lib/nagios/plugins/msg.py admin@local 'MyText' work perfectly .
I don't get if the problems are at unix level ( permits / ownership ) or at nagios level ( can't run / can't call )
The msg.py file is xwr by user ( nagios is the owner ) , by group and executable,readable by all
What am I doing wrong?