Service Configuration

Derek Olsen derek.olsen at qsent.com
Wed Sep 6 01:20:51 CEST 2006


  Tim.
  Let's say you have 20 application servers and you want to monitor the 
tim_http service on each one.
  The nagios way is to include each of the 20 application servers into 
what's referred to as a hostgroup and then when you define your service 
instead of referencing a host reference a hostgroup.  For this example 
we'll assume all 20 applications servers have been setup and have host 
names that start with tim (ie: tim01, tim02, tim03, etc).

 In your hostgroups file you would have this entry

define hostgroup {
        hostgroup_name  tim-servers              # Name is  arbitrary 
and up to you
        alias          The Tim servers                # Ditto on alias
        members        tim.*                            # Now we have an 
hostgroup which contains all the timXX hosts
}


  In my services file I would have this entry (I'm assuming you'll have 
a service template called service-template

  define service {
        use                                       service-template
        hostgroup_name                    tim-servers                    
# Name of hostgroup from above example
        service_description                Http Services on the Tim Farm
        contact_groups                      tim
        check_command                   check_tim_servers          # 
This command is defined in the checkcommands.cfg file
}


      So for situations where you have more than 1 host which needs to 
have a service checked hostgroups are the simple way to manage the 
services so you dont have to repeat the service over and over for each 
host.   Once you setup a few the light bulb will go off.

    Anyhoo hope this helps.
    Deet.


Tim Pushor wrote:

>Hi All,
>
>Newb question alert.
>
>I've used other systems in the past and am trying to wrap my head around 
>configuring Nagios.
>
>I have an array of application servers that I'd like to monitor. To 
>begin with, a simple HTTP check to each will do. I have the hosts 
>configured (they do nothing, I now know why), and want to configure the 
>services. Now in my mind, I'd define one service (tim_http for example) 
>and 'apply' it to each of the servers.
>
>Now looking at the service configuration, there is a place in there for 
>'host'. Does this mean that I have to define one service per host? So if 
>I add 10 appservers I'd have 10 defined services all doing the same thing?
>
>I must be wrong - can someone please provide a clue-by-four?
>
>Thanks!
>Tim
>
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>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
>  
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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