Database Issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Database Issue

Post by taandrews »

I have a service that is not in the GUI but I assume it is in the DB. I deleted it from the GUI but the file is still in /usr/local/nagios/etc/services. Even when I delete the file and restart nagios, it gets recreated.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Database Issue

Post by dwhitfield »

Did you delete it from the CCM? Did you apply config after deleting? What version of XI is this? What version of the CCM?

Are you getting alerts from the service? With this one, I'm just trying to figure out the scope of the issue.
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: Database Issue

Post by taandrews »

I deleted it in CCM first, them applid the config. I am using XI 5.2.0. Not sure how to verify the CCM very but if its the Core version then it is 4.1.1. No alerts for this server because it was never added properly. I went thru the wizard to add the host using the Linux Server wizard. I then added a service while in the wizard. The service was never properly added via the wizard because it failed when the wizard tried to complete. I could see the service in CCM and this is when I deleted it.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Database Issue

Post by mcapra »

Can you try doing a delete/write/verify/restart from the Core Config Manager and see if that knocks it out?
2017_02_10_14_19_36_Nagios_XI_Nagios_Core_Config_Manager.png
If it doesn't, can you share the path + name + contents of the configuration file that keeps regenerating?
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: Database Issue

Post by taandrews »

I meant to say that my reply. I tried those steps and it didnt work. This server is sandboxed, so I cant provide the actual file. The server keeps creating a file names Rsyslog.cfg in /usr/local/nagios/etc/services. The content of this file is ( I had to hand type this):

define service (
service_description rsyslog
check_command check_nrpe!rsyslog_status!rsyslogd!!!!!
register 1
)

The error states:
"Error: Service has no hosts and/or service description"
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Database Issue

Post by rkennedy »

Is everything in SQL running properly? It sounds like something may be still sticking in the database.

Are you able to find the service in the CCM at all? grep -R 'rsyslog' /usr/local/nagios/etc/ will show you any files that contain it, and then you can use the CCM to narrow it down further.

Lastly, what version of XI are you running?
Former Nagios Employee
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: Database Issue

Post by taandrews »

I am using XI 5.2.0. Not sure how to verify the CCM very but if its the Core version then it is 4.1.1.
No alerts. The system created a file by the with the the name of the service that I want to monitor, not the name of the hosts. I tried removing it via CCM but the file is still there. Even if I delete it, then restart nagios, it gets recreated.
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: Database Issue

Post by taandrews »

Nevermind I fixed it. Thx
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Database Issue

Post by dwhitfield »

It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!
Locked