Nagios error with Check commands
Posted: Tue Nov 07, 2017 4:06 am
Hello people,
I'm trying to make a new installation for Nagios Core, well I installed on a Ubuntu Server 16.04.3, nagios actually is running, I used this tutorial to modify the host-groups
http://www.techthings.org/monitor-remot ... ng-nagios/
I installed nagios Core with NRPE and the nagios plugins.
The problem that I have actually is that check commands are not working properly.
I added the following on /usr/local/nagios/etc/objects/commands.cfg
# Check NRPE command
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
These are my nagios.cfg config
# OBJECT CONFIGURATION FILE(S)
# These are the object configuration files in which you define hosts,
# host groups, contacts, contact groups, services, etc.
# You can split your object definitions across several config files
# if you wish (as shown below), or keep them all in a single config file.
# You can specify individual object config files as shown below:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
# Definitions for monitoring the local (Linux) host
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
# Definitions for monitoring a Windows machine
#cfg_dir=/usr/local/nagios/etc/servers/
# Definitions for monitoring a router/switch
#cfg_file=/usr/local/nagios/etc/objects/switch.cfg
# Definitions for monitoring a network printer
#cfg_file=/usr/local/nagios/etc/objects/printer.cfg
# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:
cfg_dir=/usr/local/nagios/etc/servers
#cfg_dir=/usr/local/nagios/etc/printers
#cfg_dir=/usr/local/nagios/etc/switches
#cfg_dir=/usr/local/nagios/etc/routers
#Add below line
cfg_file=/usr/local/nagios/etc/objects/hostsgroup.cfg
I put the following on my /usr/local/nagios/etc/objects/hostsgroups.cfg
define hostgroup {
hostgroup_name servers
alias servers
members test,windows7
}
I installed the nsclient++ with the ip of the nagios server and with no password, and the first 2 option marked, but on the nagios interface, I have the following error message:
Can anyone help me?
Many thanks
Best regards
I'm trying to make a new installation for Nagios Core, well I installed on a Ubuntu Server 16.04.3, nagios actually is running, I used this tutorial to modify the host-groups
http://www.techthings.org/monitor-remot ... ng-nagios/
I installed nagios Core with NRPE and the nagios plugins.
The problem that I have actually is that check commands are not working properly.
I added the following on /usr/local/nagios/etc/objects/commands.cfg
# Check NRPE command
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
These are my nagios.cfg config
# OBJECT CONFIGURATION FILE(S)
# These are the object configuration files in which you define hosts,
# host groups, contacts, contact groups, services, etc.
# You can split your object definitions across several config files
# if you wish (as shown below), or keep them all in a single config file.
# You can specify individual object config files as shown below:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
# Definitions for monitoring the local (Linux) host
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
# Definitions for monitoring a Windows machine
#cfg_dir=/usr/local/nagios/etc/servers/
# Definitions for monitoring a router/switch
#cfg_file=/usr/local/nagios/etc/objects/switch.cfg
# Definitions for monitoring a network printer
#cfg_file=/usr/local/nagios/etc/objects/printer.cfg
# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:
cfg_dir=/usr/local/nagios/etc/servers
#cfg_dir=/usr/local/nagios/etc/printers
#cfg_dir=/usr/local/nagios/etc/switches
#cfg_dir=/usr/local/nagios/etc/routers
#Add below line
cfg_file=/usr/local/nagios/etc/objects/hostsgroup.cfg
I put the following on my /usr/local/nagios/etc/objects/hostsgroups.cfg
define hostgroup {
hostgroup_name servers
alias servers
members test,windows7
}
I installed the nsclient++ with the ip of the nagios server and with no password, and the first 2 option marked, but on the nagios interface, I have the following error message:
Can anyone help me?
Many thanks
Best regards