how to monitor www.domain.com without host object

August Simonelli augusts at gmail.com
Thu Jan 24 04:12:06 CET 2008


Thanks everyone!

I really should have looked at the manual. The address directive in the host
definition is pretty clearly explained:

"This directive is used to define the address of the host. Normally, this is
an IP address, although it could really be anything you want (so long as it
can be used to check the status of the host). You can use a FQDN to identify
the host instead of an IP address, but if DNS services are not availble this
could cause problems. When used properly, the $HOSTADDRESS$ macro will
contain this address. Note: If you do not specify an address directive in a
host definition, the name of the host will be used as its address. A word of
caution about doing this, however - if DNS fails, most of your service
checks will fail because the plugins will be unable to resolve the host
name."

which is what you were all saying! darn manual! stupid reading!

thanks guys ... i owe ya!

august

On Jan 24, 2008 2:03 PM, Yost, Karl <Karl.Yost at iqor.com> wrote:

> You can put in a dns name for both the address and the hostname. I have
> done this for checking websites before
>
> ----- Original Message -----
> From: nagios-users-bounces at lists.sourceforge.net <
> nagios-users-bounces at lists.sourceforge.net>
> To: Brock Kuhse <brock at kuhsefamily.org>
> Cc: nagios-users at lists.sourceforge.net <nagios-users at lists.sourceforge.net
> >
> Sent: Wed Jan 23 21:53:34 2008
> Subject: Re: [Nagios-users] how to monitor www.domain.com without host
> object
>
> but the host has no ip. can i make a host entry without an ip? i only need
> th host entry so i can create a service (which requires a host, right?).
> then i http_check -I against a dns name?
>
> i'm guessing like this:
>
>
> define host{
>        use             generic-host            ; Inherit default values
> from a template
>        host_name               www.mysite.com          ; The name we're
> giving to this host
>        alias           Some Remote Host        ; A longer name associated
> with the host
>
>        address         192.168.1.50            ; IP address of the host
>        }
> address is bogus, i just want to be able to associate a service against
> this, i won't check it for anything. host_name is important because i need
> that DNS value for my http_check:
>
>
>
> define command{
>        name            check_http
>        command_name    check_http
>        command_line    $USER1$/check_http -I $HOSTNAME$
>        }
> and use the HOSTNAME macro (not address)
>
> then create the service:
>
>
> define service{
>        use             generic-service         ; Inherit default values
> from a template
>        host_name               www.myhost.com
>        service_description     HTTP
>        check_command   check_http
>        }
>
> my theory is that i then get a host called www.myhost.com and have a
> service being executed against that host that does an check_http and uses
> the domain name (which is also the hostname and pulled by a macro) rather
> than the IP (cause it doesn't exist)
>
> seems ok - but i think i'm making this harder than i should be :-)
>
> when you say "we simply create a host object with the hosted site's IP /
> DNS" what does that look like? is the dns name the alias?
>
> a good example of this is www.9news.com which is with akamai (not my site)
> if you dig it:
>
> [root at cottonwood cfgs]# dig www.9news.com
>
> ; <<>> DiG 9.3.3rc2 <<>> www.9news.com
> ;; global options:  printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59275
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 9, ADDITIONAL: 5
>
> ;; QUESTION SECTION:
> ;www.9news.com.                 IN      A
>
> ;; ANSWER SECTION:
> www.9news.com.          300     IN      CNAME
> www.9news.com.edgesuite.net.
> www.9news.com.edgesuite.net. 21600 IN   CNAME   a21.g.akamai.net <
> http://a21.g.akamai.net> .
> a21.g.akamai.net.       20      IN      A       210.9.72.174
> a21.g.akamai.net.       20      IN      A       210.9.72.176
>
> so to create a host to run the service check against is hard, cause the IP
> changes.
>
> august
>
>
> On Jan 24, 2008 1:25 PM, Brock Kuhse < brock at kuhsefamily.org> wrote:
>
>
>        Sorry for the top post – I haven't quite figured out how to get
> Outlook 2007 to behave properly when replying to HTML emails (switching to
> plain text after I hit "Reply" doesn't seem to quote the original properly).
>  I'm sure I'll figure it out.   Soon.
>
>
>
>        Anyway, we monitor plenty of clients for whom we track the status
> of their hosted sites in addition to their internal networks.  For the
> hosted sites, we simply create a host object with the hosted site's IP / DNS
> name and assign checks normally (check_http variations primarily).
>
>
>
>        -          Brock
>
>
>
>        From: nagios-users-bounces at lists.sourceforge.net [mailto:
> nagios-users-bounces at lists.sourceforge.net] On Behalf Of August Simonelli
>        Sent: Wednesday, January 23, 2008 6:23 PM
>        To: nagios-users at lists.sourceforge.net
>        Subject: [Nagios-users] how to monitor www.domain.com without host
> object
>
>
>
>        Hi Nagios-ers ...
>
>        I need a little help with some logic here.
>
>        In our network we have the usual set up:
>
>         web servers -> VIP -> Cache -> VIP
>
>        but then on top of the cache VIP we also use an external caching
> provider (no prizes for guessing who that is, akamai) this means all
> requests for www.mysite.com go to this external source via cname, which
> then gets assigned a round-robin'ed IP. so it changes a lot.
>
>        now, i want to monitor all kinds of page response times, error
> codes and such that i know check_http can do ...
>
>        and i can do that easily as a service definition for my web server
> host objects, or my vip host object or my squid host objects etc.
>
>        but ... and here's where i get confused ...
>
>        i have no host objects for the external caches, so what IP do i do
> my http_check tests against to ensure that i'm hitting our outermost layer
> as a user would?
>
>        put another way ... how would you all go about monitoring a website
> that isn't yours (say you wanted to monitor cnn.com for all these things,
> what ip would you run your checks against? can i create a host with a domain
> name only?
>
>        i'm sure this is easy and i'm just missing it ... so thanks for
> your gentle help! :-)
>
>        august
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080124/1b8e2c93/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- 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