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?
Run perl/pyton script
Re: Run perl/pyton script
Change
to just
and make sure you have "#!/usr/bin/python" on the first line of the script.
Code: Select all
command_line /usr/bin/python /usr/lib/nagios/plugins/msg.py admin@local 'MyText'Code: Select all
command_line /usr/lib/nagios/plugins/msg.py admin@local 'MyText'Former Nagios employee