Check_http
Jonathan Angliss
jon at netdork.net
Thu Oct 21 07:42:30 CEST 2010
On 10/20/10 01:08, Rajesh Kumar wrote:
> Hi All
> I have configured Nagios Core in CentOS. I did
> remotehost(retpro) services of cpu, memory, user, ssh and ping also but
> unable to config check_http.
> How to configure remotehost http (url) and Notification Alert (If
> http down). Pls verify my cfg file in
> /usr/local/nagios/etc/objects/retpro.cfg
Monitoring remote services like HTTP, SSH, and the likes are covered in
the manual, and there is probably already a sample setup in the default
configs with CentOS:
http://nagios.sourceforge.net/docs/3_0/monitoring-publicservices.html
But basically, it'll most likely look something like this:
define service {
use generic-service
host_name retpro
service_description HTTP
check_command check_http
}
If you're looking to monitor a specific page loads, you may need to
create a new command, something like this:
define command {
command_name check_http_url
command_line $USER1$/check_http -H $HOSTADDRESS$ -u $ARG1$
}
define service {
{usual service stuff}
check_command check_http_url!/testpage.php
}
> define service{
> use generic-service
> host_name retpro
> service_description Root Partition
> check_command check_local_disk!20%!10%!/
> }
As Robert Wolfe pointed out, this command is probably not doing what you
think it is. check_local_disk will most likely be doing disk checks
against the server running nagios, making this a duplicate of a monitor
you may already have in place. You will need to use something like
NRPE, or check_by_ssh to check remote hosts. Your services for those
real checks will likely look something like:
define service {
use generic-service
host_name retpro
service_description root partition
check_command check_nrpe!check_disk!20!10
}
This assumes a check_nrpe command has been defined.
--
Jonathan Angliss
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list