Page 1 of 1
NagiosXI 5.5.9 - duplicate services ...
Posted: Fri Feb 01, 2019 2:22 am
by vishfx
Hi Nagios team,
In order to update setting of already existing service "serviceA" , if I drop a updated_host1_serviceA.cfg under import/ folder.
I notice duplicate serviceA being created in CCM->services
How can I avoid this and update the existing serviceA ?
Regards,
Vish.
Re: NagiosXI 5.5.9 - duplicate services ...
Posted: Fri Feb 01, 2019 1:40 pm
by lmiltchev
Are you using
the same config name and service description as the "original" service? Is the service added to a host only or to a
hostgroup? Services should not get duplicated, unless nagios "doesn't know" that this is the same, modified service, and "thinks" it's a new one.
Try the following:
# Copy the localhost.cfg to the import directory
Code: Select all
cp /usr/local/nagios/etc/services/localhost.cfg /usr/local/nagios/etc/import/
# Modify one of the services. For example, change the check_command of the "PING" service to this:
Code: Select all
check_command check_dummy!0!"test"
# Run reconfigure
Code: Select all
/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
Go to the CCM and check your services under localhost. Did PING service get duplicated, or just modified?
Re: NagiosXI 5.5.9 - duplicate services ...
Posted: Fri Feb 01, 2019 5:18 pm
by vishfx
I am using a different config name, but same hostname and same service description and same hostgroup as the "original".
Its a single config file with HOST & SERVICE related entries.
Regards,
Vish.
Re: NagiosXI 5.5.9 - duplicate services ...
Posted: Mon Feb 04, 2019 10:22 am
by lmiltchev
You need to be using the same config name, otherwise nagios will create a different service.
Re: NagiosXI 5.5.9 - duplicate services ...
Posted: Mon Feb 04, 2019 5:07 pm
by vishfx
Ok , Thanks.
Tried with same cfg name, it worked.
Regards,
Vish.
Re: NagiosXI 5.5.9 - duplicate services ...
Posted: Mon Feb 04, 2019 5:15 pm
by scottwilkerson
vishfx wrote:Ok , Thanks.
Tried with same cfg name, it worked.
Regards,
Vish.
Great!
Locking thread