Define plugins - help
Posted: Tue May 12, 2015 6:37 am
Hi,
I have a nagios setup which is monitoring windows and Linux machines. What I don't quite understand is how to define a plugin. My Nagios is running on Ubunutu.I have setup the check_smtp plugin and it works, but I need to know how to define it more specifically.
What I do understand:
All plugins are in /usr/lib/nagios/plugins and /usr/local/nagios/libexec
you can test a plugin by running commands in that directory for example: check_smtp -H 10.0.0.189 -p 25
You setup you objects (hosts) in /usr/local/nagios/etc/objects. I have a .cfg for each host and once setup I add it in //usr/local/nagios/etc/nagios.cfg under the correct "definitions for monitoring a xxx machine"
check_smtp is defined in /usr/local/nagios/objects/commands.cfg: define command { command name...
What I don't understand
How do I define my check_smtp to go look on port 50. I know smtp doesnt run over port 50 but if I wanted to, how to I set it. Nowhere is there a check_smtp.cfg so nagios always assumes the defaults, but how do I define the switches for my nagios as in the help file:
Usage:
check_smtp -H host [-p port] [-4|-6] [-e expect] [-C command] [-R response] [-f from addr]
[-A authtype -U authuser -P authpass] [-w warn] [-c crit] [-t timeout] [-q]
[-F fqdn] [-S] [-D warn days cert expire[,crit days cert expire]] [-v]
In the commands is says: command line $user1$/check_smtp -H $HOSTADDRESS$ $ARG1$.
So where can I stipulate check_smtp $HOSTADDRESS$ -p50 -w3 -c5
Thank you.
I have a nagios setup which is monitoring windows and Linux machines. What I don't quite understand is how to define a plugin. My Nagios is running on Ubunutu.I have setup the check_smtp plugin and it works, but I need to know how to define it more specifically.
What I do understand:
All plugins are in /usr/lib/nagios/plugins and /usr/local/nagios/libexec
you can test a plugin by running commands in that directory for example: check_smtp -H 10.0.0.189 -p 25
You setup you objects (hosts) in /usr/local/nagios/etc/objects. I have a .cfg for each host and once setup I add it in //usr/local/nagios/etc/nagios.cfg under the correct "definitions for monitoring a xxx machine"
check_smtp is defined in /usr/local/nagios/objects/commands.cfg: define command { command name...
What I don't understand
How do I define my check_smtp to go look on port 50. I know smtp doesnt run over port 50 but if I wanted to, how to I set it. Nowhere is there a check_smtp.cfg so nagios always assumes the defaults, but how do I define the switches for my nagios as in the help file:
Usage:
check_smtp -H host [-p port] [-4|-6] [-e expect] [-C command] [-R response] [-f from addr]
[-A authtype -U authuser -P authpass] [-w warn] [-c crit] [-t timeout] [-q]
[-F fqdn] [-S] [-D warn days cert expire[,crit days cert expire]] [-v]
In the commands is says: command line $user1$/check_smtp -H $HOSTADDRESS$ $ARG1$.
So where can I stipulate check_smtp $HOSTADDRESS$ -p50 -w3 -c5
Thank you.