path to plugins in hosts.cfg
Christian Vanguers
wangee at linuxbe.org
Mon Feb 10 23:49:26 CET 2003
On Mon, Feb 10, 2003 at 10:03:03AM -0600, Ryan O'Rourke wrote:
> Thank you for the quick response. That line does exist in resource.cfg
> and I see what you are talking about with checkcommands.cfg.
> I've still got more work to do before I can actually get Nagios to run
> but your advice certainly helps.
Great !!!
> One more quick request: Can you point me to someplace in the docs that
> might help to explain your command line syntax for "check_ftp" in your
> example?
AFAIK, there is no documentation about plugins (for the moment, but it's in the Karl's mind) :-)
The only help you can find, is while running the check itself without
arguments, or most of the time with "--help" option...
<SNIP>
somehost:/usr/local/nagios/libexec$ ./check_ftp
No arguments found
Usage: check_ftp -H host -p port [-w warn_time] [-c crit_time] [-s send]
[-e expect] [-W wait] [-t to_sec] [-v]
somehost:/usr/local/nagios/libexec$ ./check_ftp --help
check_ftp (nagios-plugins 1.3.0-beta2) 1.8
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may
redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Copyright (c) 1999 Ethan Galstad (nagios at nagios.org)
This plugin tests FTP connections with the specified host.
Usage: check_ftp -H host -p port [-w warn_time] [-c crit_time] [-s send]
[-e expect] [-W wait] [-t to_sec] [-v]
Options:
-H, --hostname=ADDRESS
Host name argument for servers using host headers (use
numeric address if possible to bypass DNS lookup).
-p, --port=INTEGER
Port number
-s, --send=STRING
String to send to the server
-e, --expect=STRING
String to expect in server response -W, --wait=INTEGER
Seconds to wait between sending string and polling for response
-w, --warning=DOUBLE
Response time to result in warning status (seconds)
-c, --critical=DOUBLE
Response time to result in critical status (seconds)
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
-v Show details for command-line debugging (do not use with nagios server)
-h, --help
Print detailed help screen
-V, --version
Print version information
</SNIP>
This is the only help i can point you to :)
No i will show you my definition of check_ftp command in my config
<SNIP>
# 'check_ftp' command definition
define command{
command_name check_ftp
command_line $USER1$/check_ftp -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -t $ARG3$
}
</SNIP>
And i call my check_ftp command definition in my services.cfg like this:
<SNIP>
define service{
use generic-service
host_name somehost
service_description FTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups Unix-admins
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_ftp!10!15!20
}
</SNIP>
where 10 == $ARG1$ (warning threshold)
15 == $ARG2$ (critical threshold)
20 == $ARG3$ (timeout)
I know, it's not easy to understand in the beginning, but if you can
understand this time, most of your troubles will be solved right now :)
Hope this helps,
Chris
--
+----------------------------------+-----------------------------------------+
| ____ _____ _ __ | |
| / __ \____ / ___/__ _| |/ / | Christian Vanguers |
| / / / / __ \\__ \/ / / / / | ================== |
| / /_/ / /_/ /__/ / /_/ / | | mailto: christian.vanguers at opsyx.com |
| \____/ .___/____/\__, /_/|_| | www: http://www.opsyx.com |
| /_/ /____/ | |
| OPen SYstems eXpertise | |
+----------------------------------------------------------------------------+
| GnuPG keyID == 0xF814CC3A <christian.vanguers at opsyx.com> |
| Key Fingerprint == 76D7 8E94 440F E430 3981 D922 73E1 76DF F814 CC3A |
+----------------------------------+-----------------------------------------+
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
More information about the Users
mailing list