xi: support for service definitions (with "parents" attribut

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
User avatar
inversecow
Posts: 44
Joined: Wed Sep 25, 2019 4:17 pm

xi: support for service definitions (with "parents" attribut

Post by inversecow »

Ahoy folks,

Some of my users (Openshift team) are looking at how they run their service monitors.
Given the dynamic "ebb & flow" of hosts in their environment, they were asking after the notion of "parent/child" for service monitors.
Essentially the same sort of thing that is on offer from a HOST monitor perspective (EG: "manage parents" button).

Is this something that is / will be available within xi / CCM?
I see this is apparently supported via the nagios core offering, at some point in the 4.x release cycle.

https://assets.nagios.com/downloads/nag ... ml#service

Code: Select all

parents:
This directive is used to define a comma-delimited list of short names of the "parent" services for this particular service.
Parent services are typically other services that need to be available in order for a check of this service to occur.
For example, if a service checks the status of a disk using SSH, the disk check service would have the SSH service as a parent.
If the service has no parent services, simply omit the "parents" directive.
More complex service dependencies may be specified with service dependency objects.
They would much rather use this vs having to figure out the service dependency system (if possible).
Thoughts?

Signed,

- Rowan
“And who better understands the Unix-nature?” Master Foo asked.
“Is it he who writes the ten thousand lines, or he who, perceiving the emptiness of the task, gains merit by not coding?”
Master Foo - The ten thousand Lines
Unix Koans of Master Foo
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: xi: support for service definitions (with "parents" attr

Post by ssax »

Interesting, I didn't even know that existed for services. I have submitted a feature request to development requesting they add the Manage Parents button:

FR: xi - CCM - Edit Service - Add Manage Parents to the edit service page since Core 4 now supports it

I was able to set them up in /usr/local/nagios/etc/static but dev would need to add that functionality into the CCM to be able to do that through the CCM:

/usr/local/nagios/etc/static/testserviceparent.cfg:

Code: Select all

define host {
    host_name     testserviceparent
    use           linux-server
    alias         localhost
    address       127.0.0.1
    register      1
}


define service {
    host_name              testserviceparent
    service_description    Current Load
    use                    local-service
    check_command          check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
    register               1
}

define service {
    host_name              testserviceparent
    service_description    HTTP
    use                    local-service
    check_command          check_http
    register               1
}

define service {
    host_name              testserviceparent
    service_description    Current Users
    use                    local-service
    parents                HTTP
    check_command          check_local_users!20!50
    register               1
}
User avatar
inversecow
Posts: 44
Joined: Wed Sep 25, 2019 4:17 pm

Re: xi: support for service definitions (with "parents" attr

Post by inversecow »

Superb, and thanks for logging the FR on this matter.
Also thank you for the notes you posted below, will pass those along to my users.

Is there any good xi level references / docs for handling service dependencies?
I had a look but it all seems to map back to nagios (core) level stuff, which I have yet to get working in xi level dependencies configs.
“And who better understands the Unix-nature?” Master Foo asked.
“Is it he who writes the ten thousand lines, or he who, perceiving the emptiness of the task, gains merit by not coding?”
Master Foo - The ten thousand Lines
Unix Koans of Master Foo
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: xi: support for service definitions (with "parents" attr

Post by ssax »