Nagios error with Check commands

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
froometgn
Posts: 10
Joined: Fri Aug 25, 2017 1:41 am

Nagios error with Check commands

Post by froometgn »

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:
Windows7_error.JPG
Can anyone help me?

Many thanks
Best regards
dwasswa

Re: Nagios error with Check commands

Post by dwasswa »

Hi @froometgn,


Please attach the commands.cfg file on your nagios server and the nsclient.ini file on your windows host.

The nsclient.ini file contains configurations for the NSClient agent.

Please send me the file where you have your windows host defined e.g /usr/local/nagios/etc/objects/windows.cfg
kyang

Re: Nagios error with Check commands

Post by kyang »

Hey froometgn, just checking in to see if your issue is resolved?

Are we okay to close this thread? Or did you have any more questions?
Locked