Nagios configs not reflecting in Nagios XI...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Nagios configs not reflecting in Nagios XI...

Post by JakeHatMacys »

I'm making changing in core configuration manager like adding a service to a host group or changing host groups on a server...

I apply the configuration and it comes back good, but then Nagios XI doesn't update unless I sudo restart that service from the CLI.

Any ideas how to trouble shoot this? I'm on the latest version fyi:

Your Nagios XI installation is up to date.

Latest Available Version: 5.4.9
Installed Version: 5.4.9
Last Update Check: 2017-09-15 15:06:53
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios configs not reflecting in Nagios XI...

Post by ssax »

Please run this tail command (and let it run):

Code: Select all

tail -F /usr/local/nagiosxi/var/cmdsubsys.log
Then try to apply configuration again and send us the full output of the tail command.

Thank you
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios configs not reflecting in Nagios XI...

Post by ssax »

May want to attach your /etc/sudoers file as well.

Thanks
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Nagios configs not reflecting in Nagios XI...

Post by JakeHatMacys »

Nevermind I guess patience is a virtue... after about 5 minutes XI updated.

Last part of the previous tail command was:
Stopping nagios:. done.
Starting nagios: done.
OUTPUT=Starting nagios: done.
RETURNCODE=0
.....................
PROCESSED 1 COMMANDS
But I'm used to it being a bit more responsive I guess.
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Nagios configs not reflecting in Nagios XI...

Post by JakeHatMacys »

ssax wrote:May want to attach your /etc/sudoers file as well.

Thanks
Actually I wanted to ask you guys if you had a list of essential Sudo commands / ACLs to get set up after installing nagios XI.

Through out the years after losing all root access it's been whack a mole type solutions and we're in a fairly good place...

But curious if you guys had a sudo / acl bible for the nagios user and everything. If not that'd be neat for new people installing the app!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios configs not reflecting in Nagios XI...

Post by ssax »

Ahh, do you have your DB offloaded to another server? When you apply config you should run a watch -n 1 ipcs -q to see if your kernel message queue stays high, my assumption is that it takes about 5 minutes as you're seeing.

To your other question, not really, the only thing we have is what is put into the /etc/sudoers file:

Code: Select all

User_Alias      NAGIOSXI=nagios
User_Alias              NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/backup_xi.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
Another one to note though is that you should not require a tty for the nagios user if you have requiretty set.

Let us know if you have any questions.

Thank you
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios configs not reflecting in Nagios XI...

Post by ssax »

Basically, what happens when you restart the nagios process (happens in the apply config) NDOUtils goes out to the DB and updates all of the objects in the system and it can take a while (like you are seeing) to work through all of them if you have a large DB and/or an offloaded DB with a lot of hosts/services.
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Nagios configs not reflecting in Nagios XI...

Post by JakeHatMacys »

ssax wrote:Basically, what happens when you restart the nagios process (happens in the apply config) NDOUtils goes out to the DB and updates all of the objects in the system and it can take a while (like you are seeing) to work through all of them if you have a large DB and/or an offloaded DB with a lot of hosts/services.
Yeah I'm currently trying to get a handle on file system size and my postgres DB that keeps blowing up to 40 gigs for reasons i'm not entirely aware of.

I do not want to keep any perfdata. Is there a way to turn off all perfdata storage and processing universally?

I've turned it off as far as I can tell on all my services but some of the host templates are blank in XI and it's hard to say what got what when it was bulk loaded in the past.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios configs not reflecting in Nagios XI...

Post by ssax »

You should be able to edit your /usr/local/nagios/etc/nagios.cfg file and set:

Code: Select all

process_performance_data=0
Then restart the nagios process:

Code: Select all

service nagios restart

Please send the output of this command so that we can see which table is taking up all the space in the postgresql DB:

Code: Select all

echo "SELECT relname AS objectname, relkind AS objecttype, reltuples, pg_size_pretty(relpages::bigint*8*1024) AS size FROM pg_class WHERE relpages >= 8 ORDER BY relpages DESC;" | psql nagiosxi nagiosxi
Thank you
Locked