1st post, so naturally the 1st question by the nagios newb re: socket error
Ortner, Gerald
Gerald.Ortner at gespag.at
Thu Oct 22 16:17:36 CEST 2009
Try
define command {
command_name check_s1
command_line $USER1$/check_http -H
www.site1.com -I $HOSTADDRESS$ -w "$ARG1$" -c "$ARG2$"
}
Von: lance raymond [mailto:lance.raymond at gmail.com]
Gesendet: Donnerstag, 22. Oktober 2009 15:17
An: nagios-users at lists.sourceforge.net
Betreff: Re: [Nagios-users] 1st post,so naturally the 1st question by
the nagios newb re: socket error
I haven't installed anything on the webservers (yet), but I do wish to
via snmp do load, cpu, etc. or if there is a better way like a client
daemon, feel free to let me know. I am still reading/understanding what
each is used for (service.cfg, commands.cfg, etc.) but I have the
following all for that check;
services.cfg
define service {
service_description check_s1
use generic-service
hostgroup_name s1_WebServers
check_command check_s1!3!5
}
check_commands.cfg
define command {
command_name check_s1
command_line $USER1$/check_http -H
www.site1.com -w "$ARG1$" -c "$ARG2$"
}
command.cfg has;
command[check_s1]=/usr/local/groundwork/nagios/libexec/check_http -H
www.site1.com -I $HOSTADDRESS$
As for where the local command was run, yes it was local to the
groundwork (nagios) server from the following location;
root at groundwork:/usr/local/groundwork/nagios/libexec/check_http -H
www.site1.com -I 192.168.50.101
HTTP OK HTTP/1.1 200 OK - 14351 bytes in 0.249 seconds
|time=0.249456s;;;0.000000 size=14351B;;;0
I am not sure what the NRPE plugin is but just looking at the options,
it looks like it's run on the client as there is no spot for IP, when
run local it simply says connection refused by host for the site1.com
domain.
Thanks.
On Thu, Oct 22, 2009 at 4:59 AM, Martin Melin <mmelin at gmail.com> wrote:
Hi,
Where did you define the check_s1 command? On which host? It looks like
an NRPE config so is this on one of the web servers or on your Nagios
host?
Where did you try running the command from the shell? On the Nagios host
or the web server?
Please show the command definition from Nagios for check_s1 as well.
Make sure that you've edited the correct NRPE config file, reloaded
nrped if you're not using inetd. To check that the check works from the
command line, run the check_nrpe command from Nagios, not check_http
from Nagios or the webserver.
Regards,
Martin Melin
On Thu, Oct 22, 2009 at 3:32 AM, lance raymond <lance.raymond at gmail.com>
wrote:
Hi all, well I am running GroundWork open source and really
happy with the layout, etc. and now comes the nagios things. My goal is
to setup things neatly, organized and learn as I go rather than asking
stupid q's along the way. So with that, the 1st task;
I have 8 webservers all host numerous sites, a few host only
select. So I have created some hostgroups, adding the servers that
belong to each, and wonderfully it works. I can select a server, see
the group, click the group, see the servers (did I mention I'm good) :)
Anyway, I want to setup 2 seperate checks one for each website,
then associate them with the groups, so for example;
ws1 (site1, site2)
ws2 (site1)
ws3 (site1, site2)
ws4 (site2)
Pretty simple. So I copied the check_http command where I saw
it used and have the following;
command[check_http]=/usr/local/groundwork/nagios/libexec/check_http -H
$HOSTADDRESS$ -I $HOSTADDRESS$
command[check_s1]=/usr/local/groundwork/nagios/libexec/check_http -H
www.site1.com -I $HOSTADDRESS$
command[check_s2]=/usr/local/groundwork/nagios/libexec/check_http -H
www.site2.com -I $HOSTADDRESS$
The services.cfg has the following (will only show 1 for space)
define service {
service_description check_s1
use generic-service
hostgroup_name s1_WebServers
check_command check_s1!3!5
}
Now after the above setup and a restart, I have happy to see the
check_s1 listed but it's showing critical with the following error;
CRITICAL - Socket timeout after 10 seconds
At the command line check it does work;
./check_http -H www.site1.com -I 192.168.50.101
HTTP OK HTTP/1.1 200 OK - 14398 bytes in 0.090 seconds
|time=0.089949s;;;0.000000 size=14398B;;;0
I am looking through where people are increasing the timeout,
but the response time is not even a second, so there must be something
else I am missing. So I am looking forward to learning more, welcome
any ideas, suggestions, or anything else I should know about using
nagios under groundwork.
This is running under ubuntu-8.10 server, Program Version:3.0.6,
let me know what else I can or need to provide on this.
------------------------------------------------------------------------
------
Come build with us! The BlackBerry(R) Developer Conference in
SF, CA
is the only developer event you need to attend this year.
Jumpstart your
developing skills, take BlackBerry mobile applications to market
and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register
now!
http://p.sf.net/sfu/devconference
_______________________________________________
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
------------------------------------------------------------------------
------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and
stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
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
OOe. Gesundheits- und Spitals-AG
Techcenter, Hafenstrasse 47-51, 4020 Linz
DVR 2107870, ATU 51928204, Firmenbuchgericht: Landesgericht Linz, FN 210146 p
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091022/47e917d4/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
-------------- next part --------------
_______________________________________________
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