Page 2 of 4
Re: Rename the service problem
Posted: Thu Feb 26, 2015 9:55 pm
by phyo
Are you sure I can run the following commands?
Code: Select all
rm -f /usr/local/nagios/etc/hosts/*.*
rm -f /usr/local/nagios/etc/services/*.*
Re: Rename the service problem
Posted: Thu Feb 26, 2015 9:59 pm
by Box293
Yes, when you Apply Configuration they will be recreated from the database.
In the latest versions of XI there is a Delete button so you can do this in the GUI.
The whole point is to delete any ghost configuration files.
Re: Rename the service problem
Posted: Thu Feb 26, 2015 10:18 pm
by phyo
Box293 wrote:Open an ssh session to nagios XI and execute these commands:
Code: Select all
rm -f /usr/local/nagios/etc/hosts/*.*
rm -f /usr/local/nagios/etc/services/*.*
Go into CCM
Quick Tools > Apply Configuration
Click the Apply Configuration button
Are they gone now?
I already tried. still there.
Re: Rename the service problem
Posted: Thu Feb 26, 2015 10:22 pm
by Box293
Interesting.
What happens when you run these commands:
Code: Select all
cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
Re: Rename the service problem
Posted: Fri Feb 27, 2015 12:54 am
by phyo
Code: Select all
Running pre-flight check on configuration data...
Checking objects...
Checked 555 services.
Checked 45 hosts.
Checked 8 host groups.
Checked 2 service groups.
Checked 15 contacts.
Checked 4 contact groups.
Checked 148 commands.
Checked 18 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 45 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 18 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...done.
Stopping nagios: .done.
Starting nagios: done.
Here is the status.
But after apply the configuration, old services and host are still there.
Re: Rename the service problem
Posted: Fri Feb 27, 2015 8:47 am
by lmiltchev
Hm-m, seemingly, your configuration applies but no changes take place (deleted hosts/services are not removed). You already tried deleting all of the configs in the "hosts" and "services" directories in order to eliminate a possible "ghost" issue but this didn't fix the problem so I suspect there must be a permissions issue.
Run the following command from the CLI:
Code: Select all
/usr/local/nagiosxi/scripts/reset_config_perms
then go to the CCM and delete the "problem" hosts/services. Next run the Write Config Tool and check the output for errors. BTW, you don't have any configs in the "static" directory, do you?
If the issue is still present after performing the above steps, I would recommend opening a new email ticket in our system by emailing us your profile to
[email protected].
Admin->System Profile->Download Profile
Re: Rename the service problem
Posted: Sun Mar 01, 2015 8:49 pm
by phyo
Code: Select all
/usr/local/nagiosxi/scripts/reset_config_perms
I run this command and write the config. But the problem can't fix.
Code: Select all
BTW, you don't have any configs in the "static" directory, do you?
There are 3 files at /usr/local/nagios/etc/static/ folder.
Code: Select all
[root@nagios01 static]# pwd
/usr/local/nagios/etc/static
[root@nagios01 static]# ls
xiobjects.cfg xitemplates.cfg xitest.cfg
[root@nagios01 static]#
Code: Select all
If the issue is still present after performing the above steps, I would recommend opening a new email ticket in our system by emailing us your profile to [email protected].
This need the maintenance license. Right? currently we don't have the maintenance license.
Re: Rename the service problem
Posted: Mon Mar 02, 2015 11:57 am
by abrist
phyo wrote:This need the maintenance license. Right? currently we don't have the maintenance license.
Yes, this does require a maintenance/support "license".
I noticed your hosts are grey - is this intended? I ask because that is a sign of db table issues or failed queries. What is the output of:
Code: Select all
grep query /var/log/messages | tail
And:
Re: Rename the service problem
Posted: Mon Mar 02, 2015 8:39 pm
by phyo
The output of
grep query /var/log/messages | tail
Code: Select all
[root@nagios01 /]# grep query /var/log/messages | tail
Mar 2 16:06:22 nagios01 nagios: qh: core query handler registered
Mar 2 16:06:22 nagios01 nagios: wproc: Successfully registered manager as @wproc with query handler
Mar 2 17:56:01 nagios01 nagios: qh: core query handler registered
Mar 2 17:56:01 nagios01 nagios: wproc: Successfully registered manager as @wproc with query handler
Mar 2 17:56:45 nagios01 nagios: qh: core query handler registered
Mar 2 17:56:45 nagios01 nagios: wproc: Successfully registered manager as @wproc with query handler
Mar 2 23:46:58 nagios01 nagios: qh: core query handler registered
Mar 2 23:46:58 nagios01 nagios: wproc: Successfully registered manager as @wproc with query handler
Mar 2 23:48:17 nagios01 nagios: qh: core query handler registered
Mar 2 23:48:17 nagios01 nagios: wproc: Successfully registered manager as @wproc with query handler
[root@nagios01 /]#
The output of
tail -10 /var/log/mysql
Code: Select all
[root@nagios01 /]# tail -10 /var/log/mysql
tail: cannot open `/var/log/mysql' for reading: No such file or directory
[root@nagios01 /]#
Re: Rename the service problem
Posted: Tue Mar 03, 2015 10:22 am
by lmiltchev
phyo, I believe Andy meant:
I am sorry about that! Can you show us the output of the command above?