2014R2.3 update problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
uidaho
Posts: 89
Joined: Tue Feb 12, 2013 11:58 am

2014R2.3 update problem

Post by uidaho »

I am having problems with the 2014R2.3 update. I am able to successfully update. After the update I am unable to use CCM to make configuration changes or even reapply the existing configuration. I receive the following error:

Error: Invalid max_attempts, check_interval, retry_interval, or notification_interval value for service 'SERVICE' on host 'SERVER'
Error: Could not register service (config file '/usr/local/nagios/etc/services/SERVICE.cfg', starting on line 16)

I have tried the update on multiple servers and have had the same problem. The SERVICE and SERVER are different on each and do not appear to be related.

Steps to reproduce:
Apply current configuration in CCM, verify that it applies correctly.
Update. (From 2014R1.5 to 2014R2.3)
Apply configuration again, without making changes.
Fails (Only one error is produced which appears at the bottom of the page. This does not produce the full “View a snapshot of this configuration error” log.)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: 2014R2.3 update problem

Post by tmcdonald »

Please run the following as root and show us the output:

Code: Select all

cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh | tail -30
Former Nagios employee
uidaho
Posts: 89
Joined: Tue Feb 12, 2013 11:58 am

Re: 2014R2.3 update problem

Post by uidaho »

--2015-01-12 16:15:50-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ânagiosql.loginâ

[ <=> ] 10,399 --.-K/s in 0.01s

2015-01-12 16:15:51 (941 KB/s) - ânagiosql.loginâ

--2015-01-12 16:15:51-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ânagiosql.loginâ

[ <=> ] 10,399 --.-K/s in 0.01s

2015-01-12 16:15:51 (1013 KB/s) - ânagiosql.loginâ

--2015-01-12 16:15:51-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ânagiosql.export.monitoringâ

[ <=> ] 13,255 30.9K/s in 0.4s

2015-01-12 16:15:52 (30.9 KB/s) - ânagiosql.export.monitoringâ

Warning: Host 'HOST1' has no default contacts or contactgroups defined!
Warning: Host 'HOST2' has no default contacts or contactgroups defined!
Warning: Host 'HOST3' has no default contacts or contactgroups defined!
Warning: Host 'HOST4' has no default contacts or contactgroups defined!
Checked 23 hosts.
Checked 11 host groups.
Checked 1 service groups.
Checked 25 contacts.
Checked 14 contact groups.
Checked 127 commands.
Checked 36 time periods.
Checked 0 host escalations.
Checked 2 service escalations.
Checking for circular paths...
Checked 23 hosts
Checked 67 service dependencies
Checked 0 host dependencies
Checked 36 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 102
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: 2014R2.3 update problem

Post by lmiltchev »

Do you see any errors when you run the Write Config Tool? Can you show us the output?

CCM->Write Config Files->Write->Verify
Be sure to check out our Knowledgebase for helpful articles and solutions!
uidaho
Posts: 89
Joined: Tue Feb 12, 2013 11:58 am

Re: 2014R2.3 update problem

Post by uidaho »

Write host configurations ...
Host configuration files successfully written!

Write service configurations ...
Service configuration files successfully written!

Configuration file: hostgroups.cfg successfully written!
Configuration file: servicegroups.cfg successfully written!
Configuration file: hosttemplates.cfg successfully written!
Configuration file: servicetemplates.cfg successfully written!
Configuration file: timeperiods.cfg successfully written!
Configuration file: commands.cfg successfully written!
Configuration file: contacts.cfg successfully written!
Configuration file: contactgroups.cfg successfully written!
Configuration file: contacttemplates.cfg successfully written!
Configuration file: servicedependencies.cfg successfully written!
Configuration file: hostdependencies.cfg successfully written!
Configuration file: serviceescalations.cfg successfully written!
Configuration file: hostescalations.cfg successfully written!
Configuration file: serviceextinfo.cfg successfully written!
Configuration file: hostextinfo.cfg successfully written!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: 2014R2.3 update problem

Post by abrist »

Alright. Lets delete all the config files, and retry a write out.

Code: Select all

CCM->Delete->Write->Verify.
If all is well, run the following from the cli:

Code: Select all

cd /usr/local/nagiosxi/scripts/; ./reconfigure_nagios.sh
And then if that succeeds, run "apply config" from the UI.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
uidaho
Posts: 89
Joined: Tue Feb 12, 2013 11:58 am

Re: 2014R2.3 update problem

Post by uidaho »

I have followed these steps, nothing has changed. Everything is successful until applying configuration when I get the same error that I have posted.
Error: Invalid max_attempts, check_interval, retry_interval, or notification_interval value for service 'SERVICE' on host 'SERVER'
Error: Could not register service (config file '/usr/local/nagios/etc/services/SERVICE.cfg', starting on line 16)
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: 2014R2.3 update problem

Post by Box293 »

Please post the output of these commands:

Code: Select all

cat /etc/sudoers

visudo -c -f /etc/sudoers

ls -al /etc/sudoers.d/

cat /etc/sudoers.d/*

cat restart_nagios_with_export.sh | grep service
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
uidaho
Posts: 89
Joined: Tue Feb 12, 2013 11:58 am

Re: 2014R2.3 update problem

Post by uidaho »

[root@SERVER ~]# cat /etc/sudoers
# This file is managed by Chef.
# Do NOT modify this file directly.

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification


# User privilege specification
root ALL=(ALL) ALL

##############################
# UI BASE Section
##############################

# All application data is now kept in sudoers.d files

# Enable include dir. It expects a # before the line.

#includedir /etc/sudoers.d

## END. Must have trailing new line to not break sudoers file##





[root@SERVER ~]# visudo -c -f /etc/sudoers
/etc/sudoers: parsed OK
/etc/sudoers.d/application: parsed OK
/etc/sudoers.d/remoteAdmin: parsed OK
/etc/sudoers.d/unixteam: parsed OK





[root@SERVER ~]# ls -al /etc/sudoers.d
total 28
drwxr-x---. 2 root root 4096 Jan 12 15:49 .
drwxr-xr-x. 126 root root 12288 Jan 14 10:40 ..
-r--r----- 1 root root 2746 Jan 12 15:49 application
-r--r----- 1 root root 102 Jul 22 11:33 remoteAdmin
-r--r----- 1 root root 132 Jul 22 11:33 unixteam





[root@SERVER ~]# cat /etc/sudoers.d/*
# Let systems team do stuff as Nagios user
%ITS-SYSTEMS ALL=(nagios) ALL
%its_netteam_staff ALL=(nagios) ALL
%Sys-Nagios-Sudoers ALL = (nagios) ALL


#%ITS-SYSTEMS ALL = NAGIOS_MGMT
%Sys-Nagios-Sudoers ALL = NAGIOS_MGMT


Cmnd_Alias NAGIOS_MGMT=/usr/local/nagiosxi/scripts/backup_xi.sh,\
/usr/local/nagiosxi/scripts/restore_xi.sh,\
/bin/rm -rf /tmp/xi*.tar.gz, /bin/rm -rf /tmp/nagios*,\
/bin/rm -rf /tmp/Nagios*,\
/tmp/nagiosxi/upgrade,\
/usr/bin/tail * /var/log/httpd/*,\
/usr/bin/tail /var/log/httpd/*,\
/tmp/NagiosXI-FixPerms.sh,\
/bin/chmod +x /tmp/NagiosXI-FixPerms.sh,\
/usr/bin/chef-client,\
/usr/local/nagiosxi/scripts/restore_xi.sh *,\
/usr/local/scripts/UI-xiupgrade.sh,\
/usr/local/nagiosxi/scripts/reconfigure_nagios.sh



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/nmap *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.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/nmap *
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart


# required for nagios service checks from other monitor servers
nagios ALL=(ALL) NOPASSWD:/usr/local/nagios/libexec/check_init_service
nagios ALL=(ALL) NOPASSWD:/usr/local/nagios/libexec/check_openmanage --omreport /opt/dell/srvadmin/oma/bin/omreport *
nagios ALL=(ALL) NOPASSWD:/usr/local/nagios/libexec/check_powerpath

Defaults:nagios !requiretty
# This file is managed by Chef.
# Do NOT modify this file directly.

remoteAdmin ALL=(root) NOPASSWD:ALL

# This file is managed by Chef.
# Do NOT modify this file directly.

%ITS_UnixTeam ALL=(root) ALL

Defaults:%ITS_UnixTeam !lecture





[root@SERVER ~]# cat /usr/local/nagiosxi/scripts/restart_nagios_with_export.sh | grep service
sudo ./manage_services.sh restart nagios
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: 2014R2.3 update problem

Post by Box293 »

Thanks for that, I think I've found the problem:

At the command line type:

Code: Select all

visduo
This opens the vi editor for the sudoers file

Press i on the keyboard

Change this:

Code: Select all

#includedir /etc/sudoers.d
To this:

Code: Select all

# includedir /etc/sudoers.d
Press the Escape key
Type :wq and press Enter

Now try Applying Configuation in CCM
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked