[Nagiosplug-help] Nagios plugin Usage
Bryan Bateman
bryanbateman at earthlink.net
Tue Feb 22 04:30:21 CET 2005
I am a novice but I have found that the libexec directory of nagios contains
the check commands. Simply execute the command with --help appeneded and
the usage information is displayed.
I also noticed that the way you were showing the command was the way it is
expressed in the services.cfg file. This is an alias to the actual command.
The actual command that is used can be found in the checkcommand.cfg file.
You will have to cross reference between that and the information obtained
from the command line to determine what is really going on.
# pwd
/xxxxxx/xxxxxxx/nagios/libexec
# ls
check_breeze check_icmp check_nntp check_ssh
check_by_ssh check_ifoperstatus check_nt check_swap
check_dhcp check_ifstatus check_ntp check_tcp
check_dig check_imap check_nwstat check_time
check_disk check_ircd check_oracle check_udp
check_disk_smb check_ldap check_overcr check_udp2
check_dns check_ldaps check_ping check_ups
check_dummy check_load check_pop check_users
check_file_age check_log check_procs check_wave
check_flexlm check_mailq check_real negate
check_fping check_mrtg check_rpc urlize
check_ftp check_mrtgtraf check_sensors utils.pm
check_hpjd check_mysql check_smtp utils.sh
check_http check_nagios check_snmp
# ./check_http --help
check_http (nagios-plugins 1.4) 1.81
Copyright (c) 1999 Ethan Galstad < <mailto:nagios at nagios.org>
nagios at nagios.org>
Copyright (c) 1999-2004 Nagios Plugin Development Team
< <mailto:nagiosplug-devel at lists.sourceforge.net>
nagiosplug-devel at lists.sourceforge.net>
This plugin tests the HTTP service on the specified host. It can test
normal (http) and secure (https) servers, follow redirects, search for
strings and regular expressions, check connection times, and report on
certificate expiration times.
Usage: check_http -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]
[-w <warn time>] [-c <critical time>] [-t <timeout>] [-L]
[-a auth] [-f <ok | warn | critcal | follow>] [-e
<expect>]
[-s string] [-l] [-r <regex> | -R <case-insensitive
regex>]
[-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N]
[-M <age>] [-A string] [-k string]
NOTE: One or both of -H and -I must be specified
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-H, --hostname=ADDRESS
Host name argument for servers using host headers (virtual host)
Append a port to include it in the header (eg: example.com:5000)
-I, --IP-address=ADDRESS
IP address or name (use numeric address if possible to bypass DNS
lookup).
-p, --port=INTEGER
Port number (default: 80)
-4, --use-ipv4
Use IPv4 connection
-6, --use-ipv6
Use IPv6 connection
-e, --expect=STRING
String to expect in first (status) line of server response (default:
HTTP/1.)
If specified skips all other status line logic (ex: 3xx, 4xx, 5xx
processing)
-s, --string=STRING
String to expect in the content
-u, --url=PATH
URL to GET or POST (default: /)
-P, --post=STRING
URL encoded http POST data
-N, --no-body
Don't wait for document body: stop reading after headers.
(Note that this still does an HTTP GET or POST, not a HEAD.)
-M, --max-age=SECONDS
Warn if document is more than SECONDS old. the number can also be of
the form "10m" for minutes, "10h" for hours, or "10d" for days.
-T, --content-type=STRING
specify Content-Type header media type when POSTing
-l, --linespan
Allow regex to span newlines (must precede -r or -R)
-r, --regex, --ereg=STRING
Search page for regex STRING
-R, --eregi=STRING
Search page for case-insensitive regex STRING
-a, --authorization=AUTH_PAIR
Username:password on sites with basic authentication
-A, --useragent=STRING
String to be sent in http header as "User Agent"
-k, --header=STRING
Any other tags to be sent in http header, separated by semicolon
-L, --link=URL
Wrap output in HTML link (obsoleted by urlize)
-f, --onredirect=<ok|warning|critical|follow>
How to handle redirected pages
-m, --pagesize=INTEGER<:INTEGER>
Minimum page size required (bytes) : Maximum page size required (bytes)
-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, --verbose
Show details for command-line debugging (Nagios may truncate output)
This plugin will attempt to open an HTTP connection with the host.
Successful
connects return STATE_OK, refusals and timeouts return STATE_CRITICAL, other
errors return STATE_UNKNOWN. Successful connects, but incorrect reponse
messages from the host result in STATE_WARNING return values. If you are
checking a virtual server that uses 'host headers' you must supply the FQDN
(fully qualified domain name) as the [host_name] argument.
Send email to nagios-users at lists.sourceforge.net if you have questions
regarding use of this software. To submit patches or suggest improvements,
send email to nagiosplug-devel at lists.sourceforge.net
#
-----Original Message-----
From: nagiosplug-help-admin at lists.sourceforge.net
[mailto:nagiosplug-help-admin at lists.sourceforge.net] On Behalf Of eugene
Sent: Tuesday, February 22, 2005 4:52 AM
To: nagiosplug-help at lists.sourceforge.net
Subject: [Nagiosplug-help] Nagios plugin Usage
Hi Sir/Madam,
Can i know how to use plugins which needed in "check_command" in
"services.cfg"?
For check_ping, i follow the given sample config which use
"check_ping!100.0,20%!500.0,60%" and it works well.
For the others plugin I just use "check_http", "check_pop", "check_ftp",
"check_smtp"
Must we add some config at the behind of the plugin command? Example as
below
check_ping!100.0,20%!500.0,60%
Currently i am still finding out the way to use plugin.
Thank You...
Eugene Than
HelpDesk Support, Network and System
MNC Wireless Berhad (635884-T)
No. 45, Block A, Level 3, Unit 3.03,
Medan Setia 1, Plaza Damansara,
Bukit Damansara, 50490 Kuala Lumpur
M: +6012-613 4855
T: +603-2095 6063
F: +603-2093 5909
E: eugene at mnc.com.my
W: www.mnc.com.my
Mobile Portal: www.gospecial.com
_____
This email is intended only for the use of the individual or entity named
above and may contain information that is confidential and/or privileged. If
you are not the intended recipient, you are hereby notified that any review,
retransmission, dissemination, distribution, copying of, or other use of, or
taking of any action in reliance upon this email is strictly prohibited.
When addressed to our clients, any opinions or advice contained in this
email are subject to the terms and conditions expressed in the governing MNC
client engagement letter. If you have received this email in error, please
notify us immediately by return email or telephone +603-2095 6063 and
destroy the original message. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20050222/2617e7ae/attachment.html>
More information about the Help
mailing list