Configure plugin to monitor

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
kshkaran2k
Posts: 1
Joined: Sat Jan 25, 2020 6:45 am

Configure plugin to monitor

Post by kshkaran2k »

Hi,

I am new to the Nagios tool. Having Nagios core(v4.4.3) along with NRPE(v3.4.1).

I would like to monitor the check_disk plugin of host machine in the Nagios server, but it is giving error. Below is the configuration added in the host-file.

Code: Select all

define service {
      host_name                       system005
      service_description             Check Disk
      check_command                   check_disk
      max_check_attempts              2
      check_interval                  2
      retry_interval                  2
      check_period                    24x7
      check_freshness                 1
      notification_interval           2
      notification_period             24x7
      notifications_enabled           1
      register                        1
}
After adding the configuration, i am restarting the nagios server. It is throwing an error as

Code: Select all

user01@server001:/usr/local/nagios/etc$ sudo service nagios restart
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
response of systemctl status nagios.service

Code: Select all

● nagios.service - Nagios Core 4.4.3
   Loaded: loaded (/lib/systemd/system/nagios.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-02-05 16:59:32 IST; 20s ago
     Docs: https://www.nagios.org/documentation
  Process: 17093 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
  Process: 17088 ExecStop=/bin/kill -s TERM ${MAINPID} (code=exited, status=0/SUCCESS)
  Process: 24921 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
  Process: 17097 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)
 Main PID: 24923 (code=exited, status=0/SUCCESS)

Feb 05 16:59:32 server001 nagios[17097]:      Check your configuration file(s) to ensure that they contain valid
Feb 05 16:59:32 server001 nagios[17097]:      directives and data definitions.  If you are upgrading from a previous
Feb 05 16:59:32 server001 nagios[17097]:      version of Nagios, you should be aware that some variables/definitions
Feb 05 16:59:32 server001 nagios[17097]:      may have been removed or modified in this version.  Make sure to read
Feb 05 16:59:32 server001 nagios[17097]:      the HTML documentation regarding the config files, as well as the
Feb 05 16:59:32 server001 nagios[17097]:      'Whats New' section to find out what has changed.
Feb 05 16:59:32 server001 systemd[1]: nagios.service: Control process exited, code=exited status=1
Feb 05 16:59:32 server001 systemd[1]: Failed to start Nagios Core 4.4.3.
Feb 05 16:59:32 server001 systemd[1]: nagios.service: Unit entered failed state.
Feb 05 16:59:32 server001 systemd[1]: nagios.service: Failed with result 'exit-code'.
Please let me know if you need anything else from my side.
Thank you in advanced.

Regards,
Kaushik Karan
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Configure plugin to monitor

Post by Box293 »

Can you please execute the following command on the Nagios server:

Code: Select all

/usr/local/nagios/bin/nagios -vvv /usr/local/nagios/etc/nagios.cfg
What output does it generate?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked