Page 2 of 2

Re: Host vs Service check

Posted: Mon May 19, 2014 4:33 pm
by klee
Slasing, you're right, i could do that, but wouldn't because that would defeat the purpose of using the wizard.

I am aware that both host/service objects needs to exist for every definition... however, by default, the wizard usually configures it as one or the other, no?

What, I'm trying to find out is how to easily determine what type of check it was configured as (by default).

Thanks much,

klee

Re: Host vs Service check

Posted: Mon May 19, 2014 4:33 pm
by tmcdonald
If you view the host config in the CCM and it has a check_ping command assigned to it, then the ping check is on the host. If however you have a separate service with check_ping and that service is attached to the host, then the ping check is on the service. Have you used the CCM at all?

Re: Host vs Service check

Posted: Mon May 19, 2014 4:48 pm
by Box293
klee wrote:How is one to know "the ping test check is defined in the host objects configuration"?
All "checks" are perfomed by commands. To see this for a host:
  • Open Core Configuration Manager
    Under Monitoring click Hosts
    Click on localhost
    Here you will see Check command ... this is where the check command is defined .... but in this case it's BLANK!
    It's BLANK because the check command is defined in a template
    Soooo to see the template click the Manage Templates button
    We can see here the Assigned template is linux-server
    Click Close
    Click Abort
    On the left pane click Templates
    Click Host Templates
    Click linux-server
    Here you can see it is using the check command check-host-alive
    Which you can see underneath uses the plugin check_icmp
So that is how the host up or down state is determined.
klee wrote:One can interpret Ping as an service using the ICMP protocol.
Yes, you can also create a ping service. You'll notice when using the Windows Wizard one of the first services is ping. This is often created when you want to define service dependancies.
klee wrote:I am aware that both host/service objects needs to exist for every definition... however, by default, the wizard usually configures it as one or the other, no
As explained before, there is always a host object and it will have service objects. So the host object is a ping test within itself, but you can also create a ping service for that host. These are two different things, so it's not one or the other, it can be both.
klee wrote:how can one know when we're supposed to use host-specific/service specific macros, when we're not sure which is host and which is service?
I suggest you go to this documentation that explains macros:
http://nagios.sourceforge.net/docs/3_0/macros.html
klee wrote:if there's an easy way to tell what it was set up as by default.
If you want to see if a host or service object was created by a wizard:
  • Open Core Configuration Manager
    Under Monitoring click Hosts
    Click on one of the hosts
    Click the Misc Settings tab
    Click the Manage Variable Definitions button
    Here there will be a definition like _xiwizard
NOTE: If you copy a host or service object, this information will be copied with it ... so that kinda could be misleading.

Re: Host vs Service check

Posted: Mon May 19, 2014 5:10 pm
by klee
@tmcdonald:

My current ping polling setup (configured via Generic Network Device Wizard) pings seem to be set up in the service definition by default.

Service definition:
service_description ping
use xwizard_genericnetdevice_ping_service

Host definition:
check_command check-host-alive

Re: Host vs Service check

Posted: Mon May 19, 2014 5:26 pm
by klee
Thanks for all of the input.

I guess the answer is "there is no easy way"

I'll look very carefully at the host and service definitions.

Please kindly close thread.

Thanks,

-klee