Problem to import service dependencies

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
123456
Posts: 7
Joined: Thu Oct 19, 2017 8:30 am

Re: Problem to import service dependencies

Post by 123456 »

I had the same idea at the beginning of this issue (Nagios XI 5.4.0 or 5.4.2 ?, I do not remember). Yes, to be honest I didn't repeat the test with the latest version (5.4.10). OK, let's do it:
1) CCM -> Advanced -> Service Dependencies -> Add New
# I selected some there available values
Config Name -> my_test_service_dependency
hook -> Inherit from parents (hooked by default)
Manage Host Groups -> linux-servers
Manage Services -> PING
Manage Service Dependencies -> HTTP
Execution failure criteria -> Warning, Critical, Unreachable
Notification failure criteria -> Warning, Critical, Unreachable
Service Dependency Period -> 24x7
hook -> Active (hooked by default)
2) Save
3) Click on the Apply Configuration button
# The new Service Dependency is created w/o any error. Till now everything is OK. But it is already known from my older posts.
4) View the config:

Code: Select all

define servicedependency {
    #    config_name    my_test_service_dependency
        dependent_service_description         HTTP
        hostgroup_name                        linux-servers
        service_description                   PING
        inherits_parent                       1
        execution_failure_criteria            w,u,c,
        notification_failure_criteria         w,u,c,
        dependency_period                     24x7

}
# That's correct, I set it in the step 1. Let's continue...

5) I created a new file:
/usr/local/nagios/etc/cfg/CIM/servicedependencies/my_test_service_dependency.cfg (its properties: Group nagios, Owner apache, 0664)
6) Copy the code and paste it to the new file and save
7) Delete already created Service Dependency (my_test_service_dependency)
8) Click on the Apply Configuration button (no error)
9) Import the new cfg file (CCM -> Tools -> Import Config Files)
# I selected the created cfg file (/usr/local/nagios/etc/cfg/CIM/servicedependencies/my_test_service_dependency.cfg)
10) Error
# see the attached screenshot - import_error.jpg (it is the same error which I described on 24th Oct)
11) Click on the Apply Configuration button
Configuration verification failed.
Error: Impossible service dependency definition
12) View the config:

Code: Select all

define servicedependency {
    #    config_name    my_test_service_dependency
        inherits_parent                       1
        execution_failure_criteria            w,u,c,
        notification_failure_criteria         w,u,c,

}   
The above steps mean that the behaviour is the same.

Maybe one additional note:
- Nagios XI was always downloaded from https://www.nagios.com/downloads/nagios-xi/vmware/ as ESX/vSphere OVA image (ESX/vSphere)
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Problem to import service dependencies

Post by npolovenko »

@123456, Thanks for the detailed report! I downloaded the same release you have but i couldn't replicate the issue still :(
There are few things:
1.

Code: Select all

Service Dependency Period -> 24x7
Please chnage to:

Code: Select all

xi_timeperiod_24x7
2. You have to select either Dependent Host Group or Dependent Hosts. But you can't only select Service dependencies.
That is because Nagios XI needs to know which hosts have the dependent service(HTTP).

Please make changes and try to reimport the config.

Code: Select all

define servicedependency {
    #    config_name    my_test_service_dependency
       dependent_hostgroup_name               paste the dependent hostgroup here
        dependent_service_description         HTTP
        hostgroup_name                        linux-servers
        service_description                   PING
        inherits_parent                       1
        execution_failure_criteria            w,u,c,
        notification_failure_criteria         w,u,c,
        dependency_period                     xi_timeperiod_24x7

}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
123456
Posts: 7
Joined: Thu Oct 19, 2017 8:30 am

Re: Problem to import service dependencies

Post by 123456 »

@npolovenko, after your last post I am completely confused. You wrote "I downloaded the same release you have but i couldn't replicate the issue still " and therefore I decided to do it from scratch again.
1) Deploy OVA file (nagiosxi-5.4.10-64.ova)
2) Start the new VM
3) From vSphere Client Concole I set IP address, Subnet and Gateway (system-config-network)
4) Start IE
5) Type in IE address bar IP address of VM
6) Logon to Nagios XI
# of course a password for nagiosadmin was set before
# The Nagios is now newly installed (w/o any additional apps, files, folders,...) only IP address is set (step 3)
7) Copy my_test_service_dependency.cfg to /usr/local/nagios/etc/cfg/CIM/servicedependencies/ (change access right and user and group assignment)

Code: Select all

define servicedependency {
    #    config_name    my_test_service_dependency
        dependent_service_description         HTTP
        hostgroup_name                        linux-servers
        service_description                   PING
        inherits_parent                       1
        execution_failure_criteria            w,u,c,
        notification_failure_criteria         w,u,c,
        dependency_period                     xi_timeperiod_24x7
}
# I modified "dependency_period" only compared to my earlier published service dependency.
8) Import the cfg file (CCM -> Tools -> Import Config Files)
# I selected the cfg file (/usr/local/nagios/etc/cfg/CIM/servicedependencies/my_test_service_dependency.cfg)
9) Error

What is wrong? You have no problems but I was never successful with this.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Problem to import service dependencies

Post by npolovenko »

@123456, I don't see either dependent_hostgroup_name or dependent_host_name in your command definition. I did have that in my command below ;)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked