I have added a few individual services and hosts with Wizard and the work OK. But when I try to use "Windows SNMP" wizard, no matter what config I use there is an error when "checking configuration".
If I check "Test Check Command" in each invididual SNMP they works OK.
Read main config file okay...
Error: Command name of command line is NULL
Error: Could not register command (config file [b]'/usr/local/nagios/etc/commands.cfg', starting on line 291[/b])
Error processing object config files!
***> One or more problems was encountered while processing the config files...
System:
Nagios XI Version : 2014R2.7
localhost.localdomain 2.6.32-573.3.1.el6.x86_64 x86_64
CentOS release 6.7 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.46 Safari/537.36
Server Name: 172.26.xxx.xxx
Server Address: 172.26.xxx.xxx
Server Port: 80
Date/Time
PHP Timezone: Atlantic/Canary
PHP Time: Mon, 24 Aug 2015 10:06:48 +0100
System Time: Mon, 24 Aug 2015 10:06:48 +0100
Nagios XI Data
License ends in:
Days left in Trial: 51
nagios (pid 29605) is running...
NPCD running (pid 1356).
ndo2db (pid 1435) is running...
CPU Load 15: 0.09
Total Hosts: 29
Total Services: 37
Function 'get_base_uri' returns: http://172.26.xxx.xxx/nagiosxi/
Function 'get_base_url' returns: http://172.26.xxx.xxx/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://172.26.xxx.xxx/nagiosxi/includes/components/profile/profile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
* If I run: ./reconfigure_nagios.sh same error shows up.
* I removed "sudo" from /usr/local/nagiosxi/scripts/restart_nagios_with_export.sh in line: sudo $BASEDIR/manage_services.sh restart nagios
* I have installed Centos 6.7 basic Server and Nagios manual installation with no problems at all.
You do not have the required permissions to view the files attached to this post.
Reading configuration data...
Read main config file okay...
Error: Could not find any host matching '172.26.50.3' (config file '/usr/local/nagios/etc/services/172.26.50.3.cfg', starting on line 80)
Error: Failed to expand host list '172.26.50.3' for service 'TeamViewer 10' (/usr/local/nagios/etc/services/172.26.50.3.cfg:80)
Error processing object config files!
###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.3.3
# Date: 2015-08-17 16:55:23
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define service {
host_name 172.26.50.3
service_description Ping
use xiwizard_windowsserver_ping_service
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 0
_xiwizard windowssnmp
register 1
}
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
myuser ALL=(ALL) ALL
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
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
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.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
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
[root@localhost etc]# chage -l nagios
Last password change : Aug 14, 2015
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
[root@localhost etc]# grep nag /etc/passwd
nagios:x:501:100::/home/nagios:/bin/bash
[root@localhost etc]# grep nag /etc/group
nagios:x:501:nagios,apache
nagcmd:x:502:nagios,apache
[root@localhost etc]#
I put "sudo" again in that file and same error happens.
I restored a previous snapshot backup and same error happens.
BUT I tried to restore first bakcup in history and it worked.
I added the "Windows SNMP" with a few services and they worked.