no host or service notification commands defined!
Re: no host or service notification commands defined!
Not that I am aware of, How would I verify
Re: no host or service notification commands defined!
You can look in the file below for db_host and determine if it's pointing to the localhost or to another server.
Or grab it with:
Code: Select all
/usr/local/nagios/etc/ndo2db.cfgCode: Select all
cat /usr/local/nagios/etc/ndo2db.cfg | grep db_hostRe: no host or service notification commands defined!
Could you run the following and post back the results?
Code: Select all
cat /etc/sudoers
ll /etc/sudoers.d/
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: no host or service notification commands defined!
[root@localhost ~]# cat /etc/sudoers
[root@localhost ~]# ll /etc/sudoers.d/
ls: /etc/sudoers.d/: No such file or directory
You have new mail in /var/spool/mail/root
[root@localhost ~]#
Code: Select all
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##
## This file must be edited with the 'visudo' command.
## Host Aliases
## Groups of machines. You may prefer to use hostnames (perhap using
## wildcards for entire domains) or IP addresses instead.
# Host_Alias FILESERVERS = fs1, fs2
# Host_Alias MAILSERVERS = smtp, smtp2
## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
## rather than USERALIAS
# User_Alias ADMINS = jsmith, mikem
## Command Aliases
## These are groups of related commands...
## Networking
Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool
## Installation and management of software
Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum
## Services
Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig
## Updating the locate database
Cmnd_Alias LOCATE = /usr/bin/updatedb
## Storage
Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount
## Delegating permissions
Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp
## Processes
Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall
## Drivers
Cmnd_Alias DRIVERS = /sbin/modprobe
# Defaults specification
#
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
# You have to run "ssh -t hostname sudo <cmd>".
#
#############################Defaults requiretty
Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
_XKB_CHARSET XAUTHORITY"
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
####################################################################
####################################################################
# Nagios Core
# NDO2DB
# PNP
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 *ls: /etc/sudoers.d/: No such file or directory
You have new mail in /var/spool/mail/root
[root@localhost ~]#
Re: no host or service notification commands defined!
Could you run this command and then try to apply the configuration and post the results back?
Code: Select all
tail -f /usr/local/nagiosxi/var/cmdsubsys.logBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: no host or service notification commands defined!
The same error continues to display after Apply Configuration
Re: no host or service notification commands defined!
Can you run this and post the output back here.
Code: Select all
cat /etc/sudoers
cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: no host or service notification commands defined!
[root@localhost ~]# cat /etc/sudoers
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##
## This file must be edited with the 'visudo' command.
## Host Aliases
## Groups of machines. You may prefer to use hostnames (perhap using
## wildcards for entire domains) or IP addresses instead.
# Host_Alias FILESERVERS = fs1, fs2
# Host_Alias MAILSERVERS = smtp, smtp2
## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
## rather than USERALIAS
# User_Alias ADMINS = jsmith, mikem
## Command Aliases
## These are groups of related commands...
## Networking
Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool
## Installation and management of software
Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum
## Services
Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig
## Updating the locate database
Cmnd_Alias LOCATE = /usr/bin/updatedb
## Storage
Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount
## Delegating permissions
Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp
## Processes
Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall
## Drivers
Cmnd_Alias DRIVERS = /sbin/modprobe
# Defaults specification
#
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
# You have to run "ssh -t hostname sudo <cmd>".
#
#############################Defaults requiretty
Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
_XKB_CHARSET XAUTHORITY"
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
####################################################################
####################################################################
# Nagios Core
# NDO2DB
# PNP
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 scripts]# ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=cat99man' -O nagiosql.login--2015-03-06 15:22:46-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
[ <=> ] 10,611 --.-K/s in 0s
2015-03-06 15:22:47 (122 MB/s) - `nagiosql.login' saved [10611]
LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL:
(
)
SETUID ROOT OK
RESETTING PERMS
URL:
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=cat99man' -O nagiosql.login--2015-03-06 15:22:52-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
[ <=> ] 10,611 --.-K/s in 0.02s
2015-03-06 15:22:53 (500 KB/s) - `nagiosql.login' saved [10611]
LOGIN SUCCESSFUL!
URL:
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2015-03-06 15:22:53--
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.export.monitoring'
[ <=> ] 13,501 5.10K/s in 2.6s
2015-03-06 15:22:57 (5.10 KB/s) - `nagiosql.export.monitoring' saved [13501]
WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'FC Training Room Fibre Uplink GE' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 898)
Warning: Duplicate definition found for service 'FC Training Rm Wireless Access Point APTR swx-0/40' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 862)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/8' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 808)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/7' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 772)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/6' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 736)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/5' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 700)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/4' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 664)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/3' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 628)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/19' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 538)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/18' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 502)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/17' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 466)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/16' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 430)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/15' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 394)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/14' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 358)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/13' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 322)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/11' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 268)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 232)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen VDI swx-0/27' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 196)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen VDI swx-0/26' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 160)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen VDI swx-0/25' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 124)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen VDI swx-0/23' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 88)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen VDI swx-0/22' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 52)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen Back Wall Polycom swx-0/34' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 16)
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 1925 services.
Checked 174 hosts.
Checked 8 host groups.
Checked 9 service groups.
Checked 8 contacts.
Checked 2 contact groups.
Checked 121 commands.
Checked 22 time periods.
Checked 0 host escalations.
Checked 6 service escalations.
Checking for circular paths...
Checked 174 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 22 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
>>> /etc/sudoers: syntax error near line 97 <<<
>>> /etc/sudoers: syntax error near line 98 <<<
>>> /etc/sudoers: syntax error near line 100 <<<
>>> /etc/sudoers: syntax error near line 102 <<<
sudo: parse error in /etc/sudoers near line 97
sudo: no valid sudoers sources found, quitting
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##
## This file must be edited with the 'visudo' command.
## Host Aliases
## Groups of machines. You may prefer to use hostnames (perhap using
## wildcards for entire domains) or IP addresses instead.
# Host_Alias FILESERVERS = fs1, fs2
# Host_Alias MAILSERVERS = smtp, smtp2
## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
## rather than USERALIAS
# User_Alias ADMINS = jsmith, mikem
## Command Aliases
## These are groups of related commands...
## Networking
Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool
## Installation and management of software
Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum
## Services
Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig
## Updating the locate database
Cmnd_Alias LOCATE = /usr/bin/updatedb
## Storage
Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount
## Delegating permissions
Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp
## Processes
Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall
## Drivers
Cmnd_Alias DRIVERS = /sbin/modprobe
# Defaults specification
#
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
# You have to run "ssh -t hostname sudo <cmd>".
#
#############################Defaults requiretty
Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
_XKB_CHARSET XAUTHORITY"
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
####################################################################
####################################################################
# Nagios Core
# NDO2DB
# PNP
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 scripts]# ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=cat99man' -O nagiosql.login--2015-03-06 15:22:46-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
[ <=> ] 10,611 --.-K/s in 0s
2015-03-06 15:22:47 (122 MB/s) - `nagiosql.login' saved [10611]
LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL:
(
)
SETUID ROOT OK
RESETTING PERMS
URL:
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=cat99man' -O nagiosql.login--2015-03-06 15:22:52-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
[ <=> ] 10,611 --.-K/s in 0.02s
2015-03-06 15:22:53 (500 KB/s) - `nagiosql.login' saved [10611]
LOGIN SUCCESSFUL!
URL:
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2015-03-06 15:22:53--
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.export.monitoring'
[ <=> ] 13,501 5.10K/s in 2.6s
2015-03-06 15:22:57 (5.10 KB/s) - `nagiosql.export.monitoring' saved [13501]
WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'FC Training Room Fibre Uplink GE' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 898)
Warning: Duplicate definition found for service 'FC Training Rm Wireless Access Point APTR swx-0/40' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 862)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/8' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 808)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/7' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 772)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/6' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 736)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/5' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 700)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/4' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 664)
Warning: Duplicate definition found for service 'FC Training Rm Windows VDI swx-0/3' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 628)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/19' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 538)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/18' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 502)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/17' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 466)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/16' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 430)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/15' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 394)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/14' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 358)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/13' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 322)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI swx-0/11' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 268)
Warning: Duplicate definition found for service 'FC Training Rm Middle VDI' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 232)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen VDI swx-0/27' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 196)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen VDI swx-0/26' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 160)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen VDI swx-0/25' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 124)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen VDI swx-0/23' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 88)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen VDI swx-0/22' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 52)
Warning: Duplicate definition found for service 'FC Training Rm Kitchen Back Wall Polycom swx-0/34' on host 'FC_TrainingRmSwitchA' (config file '/usr/local/nagios/etc/services/FC_TrainingRmSwitchA.cfg', starting on line 16)
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 1925 services.
Checked 174 hosts.
Checked 8 host groups.
Checked 9 service groups.
Checked 8 contacts.
Checked 2 contact groups.
Checked 121 commands.
Checked 22 time periods.
Checked 0 host escalations.
Checked 6 service escalations.
Checking for circular paths...
Checked 174 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 22 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
>>> /etc/sudoers: syntax error near line 97 <<<
>>> /etc/sudoers: syntax error near line 98 <<<
>>> /etc/sudoers: syntax error near line 100 <<<
>>> /etc/sudoers: syntax error near line 102 <<<
sudo: parse error in /etc/sudoers near line 97
sudo: no valid sudoers sources found, quitting
Re: no host or service notification commands defined!
Forums forced me to truncate the number of URLs to 10