Page 1 of 1

nagios wont monitor the service groups i have defined

Posted: Mon Nov 12, 2018 6:30 am
by sampan1
I configured the server file to add a host however after adding the configs I tried to monitor the groups I defined on the web console but it didn't show.
I ran the 'systemctl status nagios -l' command. Below is the output

Code: Select all


 systemctl status nagios -l
● nagios.service - Nagios Core 4.4.2
   Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-11-12 12:56:42 GMT; 3min 26s ago
     Docs: https://www.nagios.org/documentation
  Process: 7112 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
  Process: 7110 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
 Main PID: 7114 (nagios)
   CGroup: /system.slice/nagios.service
           ├─7114 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
           ├─7115 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
           ├─7117 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
           ├─7118 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
           ├─7119 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
           └─7120 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

Nov 12 12:59:01 localhost.localdomain nagios[7114]: wproc:   early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
Nov 12 12:59:01 localhost.localdomain nagios[7114]: wproc:   stderr line 01: /bin/sh: /bin/mail: No such file or directory
Nov 12 12:59:01 localhost.localdomain nagios[7114]: wproc:   stderr line 02: /usr/bin/printf: write error: Broken pipe
Nov 12 12:59:11 localhost.localdomain nagios[7114]: SERVICE ALERT: MobileIronDMZ;Total Processes;CRITICAL;SOFT;1;(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_nrpe, ...) failed. errno is 2: No such file or directory
Nov 12 13:00:01 localhost.localdomain nagios[7114]: SERVICE NOTIFICATION: nagiosadmin;HPBrocade781;Current Users;CRITICAL;notify-service-by-email;(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_nrpe, ...) failed. errno is 2: No such file or directory
Nov 12 13:00:01 localhost.localdomain nagios[7114]: wproc: NOTIFY job 4 from worker Core Worker 7117 is a non-check helper but exited with return code 127
Nov 12 13:00:01 localhost.localdomain nagios[7114]: wproc:   host=HPBrocade781; service=Current Users; contact=nagiosadmin
Nov 12 13:00:01 localhost.localdomain nagios[7114]: wproc:   early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
Nov 12 13:00:01 localhost.localdomain nagios[7114]: wproc:   stderr line 01: /bin/sh: /bin/mail: No such file or directory
Nov 12 13:00:01 localhost.localdomain nagios[7114]: wproc:   stderr line 02: /usr/bin/printf: write error: Broken pipe



Re: nagios wont monitor the service groups i have defined

Posted: Mon Nov 12, 2018 1:08 pm
by benjaminsmith
Hi @ampan1

Did you restart Nagios after after adding the host/services to your configuration?

Code: Select all

service nagios stop
service nagios start
You may have an error in your notification command. Are you receiving notifications? Try running the following to check for configuration errors:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Re: nagios wont monitor the service groups i have defined

Posted: Tue Nov 13, 2018 3:43 am
by sampan1
I couldn't find a solution before so I just reinstalled nagios and its back to square one now, can anyone help me monitor a Linux or windows host on nagios please?

Re: nagios wont monitor the service groups i have defined

Posted: Tue Nov 13, 2018 3:48 am
by sampan1
can anyone help to monitor a Linux or windows host please using nrpe???

Re: nagios wont monitor the service groups i have defined

Posted: Tue Nov 13, 2018 12:09 pm
by benjaminsmith
There are few options for monitoring agents. You can use NRPE to monitor Linux and NSClient++ to monitor Windows systems.

However, we also have our own cross platform monitoring agent called NCPA (Nagios Cross Platform Monitoring Agent) that you can use for both Linux and Windows.

NCPA Downloads:
https://www.nagios.org/ncpa/#downloads
NCPA Documentation:
https://www.nagios.org/ncpa/#docs

To get started with NRPE on Linux, see:
https://assets.nagios.com/downloads/nag ... _Agent.pdf
Monitoring Hosts with NRPE:
https://assets.nagios.com/downloads/nag ... g_NRPE.pdf

Let me know if you have any other questions.