Page 1 of 1

Database Issue

Posted: Fri Feb 10, 2017 2:05 pm
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.

Re: Database Issue

Posted: Fri Feb 10, 2017 2:34 pm
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.

Re: Database Issue

Posted: Fri Feb 10, 2017 2:59 pm
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.

Re: Database Issue

Posted: Fri Feb 10, 2017 3:24 pm
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?

Re: Database Issue

Posted: Fri Feb 10, 2017 3:40 pm
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"

Re: Database Issue

Posted: Mon Feb 13, 2017 11:26 am
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?

Re: Database Issue

Posted: Mon Feb 13, 2017 1:48 pm
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.

Re: Database Issue

Posted: Mon Feb 13, 2017 2:51 pm
by taandrews
Nevermind I fixed it. Thx

Re: Database Issue

Posted: Mon Feb 13, 2017 4:19 pm
by dwhitfield
It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!