Page 1 of 2

Not able to delete services under NagiosXI

Posted: Tue Apr 08, 2014 7:33 pm
by balothia
Hi,

Recently I added few production server to NagiosXI using NCPA agent. There are few Local Area Connection services added to host which actually dont exists on server. These services are coming unknown on NagiosXI, as they dont exists on server. When I tried to search these service in Nagios core config I am not able to find them. I also checked the service cfg file under /usr/local/nagios/etc/services/, these service dont exists there as well. How i can delete these services now.

Thanks,
Gautam

Re: Not able to delete services under NagiosXI

Posted: Wed Apr 09, 2014 9:16 am
by slansing
What host are these services under? Can you see the host's config file in:

Code: Select all

/usr/local/nagios/etc/hosts/

Re: Not able to delete services under NagiosXI

Posted: Wed Apr 09, 2014 8:51 pm
by balothia
Yes I can see the hosts file. Hosts is live and getting monitored for other services. PFA... but while adding the hosts through ncpa not sure from where the extra services are configured which dont exists on server at all. I have attached the screen shot FYR.

Code: Select all

[root@ hosts]# cat host1.cfg 
###############################################################################
#
# Host configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date:       2014-04-09 00:45:32
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND --- 
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define host {
        host_name                       host1
        use                             xiwizard_ncpa_host
        address                        x.x.x.x
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        contacts                        nagiosadmin
        notification_interval           60
        notification_period             xi_timeperiod_24x7
        notifications_enabled           0
        icon_image                      ncpa.png
        statusmap_image                 ncpa.png
        _xiwizard                       ncpa
        register                        1
        }

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################
[root@ hosts]# 

Thanks,
Gautam

Re: Not able to delete services under NagiosXI

Posted: Thu Apr 10, 2014 10:22 am
by lmiltchev
Go to the CCM->Services->select your host from the "Filter by Config Name" drop-down menu, select all of the services that you want to delete, then select "Delete" from the "With Checked" drop-down menu, and click on the "Go" button. Save and Apply Configuration.

Re: Not able to delete services under NagiosXI

Posted: Mon Apr 14, 2014 9:03 am
by balothia
Hi,

This is the actual problem because I dont see the services under CCM->Services->select your host from the "Filter by Config Name" drop-down menu. After this went to /usr/local/nagios/etc/services/ to see if they exists under this file but nothing on this as well.

Thanks,
Gautam

Re: Not able to delete services under NagiosXI

Posted: Mon Apr 14, 2014 9:31 am
by slansing
Are you looking for the host's name in (/usr/local/nagios/etc/services/), it wouldn't be under a service's name, all the service config files are named after their hosts in Nagios XI. By the looks of your last post, it seems as though the host's name where the ghost services are located under is (host1)?

Re: Not able to delete services under NagiosXI

Posted: Tue Apr 15, 2014 8:43 am
by balothia
Yes i am looking for hostname.cfg where hostname is the servername. I can see the hostname.cfg but cannot locate the unknown services in the cfg file. So the unknown services are not in .cfg file and is not under CCM. Do we have any sql query through which I can look into database, if something i can found there? This seems to very strange that i can see the services in NagiosXI console but cannot find them in CCM and .cfg file.

Thanks,
Gautam

Re: Not able to delete services under NagiosXI

Posted: Tue Apr 15, 2014 9:13 am
by scottwilkerson
In CCM -> Services search for

Code: Select all

Inbound Bandwidth on Local Area Connection 3
or

Code: Select all

Inbound Bandwidth on Local Area Connection_ 11
When you find the services, check to see if they have a hostgroup assigned. If so, the service will be added to EVERY host in the hostgroup.

If not, check to see if there are multiple hosts added.

Re: Not able to delete services under NagiosXI

Posted: Wed Apr 16, 2014 8:20 am
by balothia
Hi,

I did that already, When i search for services with the service-name in CCM->Services. I am not able to find the services for that host, i checked for the other host incase there are assignment for multiple host but there is no such issue. I am attaching the screen shot.

Thanks,
Gautam

Re: Not able to delete services under NagiosXI

Posted: Wed Apr 16, 2014 9:34 am
by slansing
What is the name of the host they are attached to that you want to remove them from, and what is the output of:

Code: Select all

grep -R 'Inbound Bandwidth on Local Area Connection 3' /usr/local/nagios/etc/services/
grep -R 'Inbound Bandwidth on Local Area Connection_ 11' /usr/local/nagios/etc/services/
Is it in the list of output?