Not able to delete services under NagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
balothia
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Not able to delete services under NagiosXI

Post 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
You do not have the required permissions to view the files attached to this post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Not able to delete services under NagiosXI

Post 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/
balothia
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Not able to delete services under NagiosXI

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Not able to delete services under NagiosXI

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
balothia
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Not able to delete services under NagiosXI

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Not able to delete services under NagiosXI

Post 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)?
balothia
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Not able to delete services under NagiosXI

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Not able to delete services under NagiosXI

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
balothia
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Not able to delete services under NagiosXI

Post 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
You do not have the required permissions to view the files attached to this post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Not able to delete services under NagiosXI

Post 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?
Locked