Unable to add a host to any service with CCM

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Nightfly
Posts: 1
Joined: Mon Mar 14, 2022 2:17 pm

Unable to add a host to any service with CCM

Post by Nightfly »

Hi,
On my monitoring server is running Nagios XI 5.8.8.

I'm trying to add some hosts to any service, but I get this error:

Error: Service has no hosts and/or service_description

Looking at the original service config file through CCM, I cannot see the host_name entry.

For example:

Code: Select all

define service {
    service_description      Port 1 Bandwidth
    use                      xiwizard_switch_port_bandwidth_service
    check_command            check_xi_service_mrtgtraf!192.168.2.1_1.rrd!500,500!800,800!M
    max_check_attempts       5
    check_interval           5
    retry_interval           1
    check_period             xi_timeperiod_24x7
    notification_interval    60
    notification_period      xi_timeperiod_24x7
    notifications_enabled    0
    _xiwizard                switch
    register                 1
}
but when I click to edit, I can see all hosts associated with (see all screenshots attached).

Anyway, if I try to add/remove some hosts and then click on "Save", nothing changes, the config file is still whitout the host_name entry.

In addittion, I saw and followed this thread:

https://support.nagios.com/forum/viewto ... 7&start=10

But my sqlmode is configured well:

+-------------------+
| @@GLOBAL.sql_mode |
+-------------------+
| |
+-------------------+

and when I run /usr/local/nagiosxi/scripts/repair_databases.sh no error is displayed (everything looks ok).

Please help.

Thanks.
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Unable to add a host to any service with CCM

Post by pbroste »

Hello @Nightfly

Thanks for reaching out, and apologize for the delay in following up.

To start we want to go through the database repair and Core reindex.

To run through the database repair.

/usr/local/nagiosxi/scripts/repair_databases.sh

Reindex the Core Configuration Manager (CCM) configs

rm -rf /usr/local/nagios/etc/import/*

1: Command list all running /bin/nagios -> ps -aux | grep -E '/bin/nagios'
2: Command -> killall -9 nagios (or pkill nagios)
3: Command check to see if /bin/nagios processes are stopped
4: Restart nagios.service by Command: systemctl restart nagios
5: Head over to the Nagios XI web console \n\n> Core Configuration Manager (CCM) \n\n> Config File Management \n\n> \n\n> \n\n>
6: Core Configuration Manager (CCM) \n\n> Under Quick Tools \n\n> "Apply Configuration"
7: Restart nagios.service by Command: systemctl restart nagios
systemctl restart nagios

Verify that the host and services look good in pre-flight with no errors in core by:


/usr/local/nagios/bin/nagios -vvv /usr/local/nagios/etc/nagios.cfg


Please PM your updated system profile for us to review.

To send us your system profile.

Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and send via ticket on our new Answer Hub


Thanks,
Perry
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Unable to add a host to any service with CCM

Post by pbroste »

We're moving to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.
Locked