New Host Retrieving Local Stats

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
jroberts001
Posts: 2
Joined: Fri Apr 20, 2012 11:00 am

New Host Retrieving Local Stats

Post by jroberts001 »

Greetings,

I have created a new host config and it is reporting localhost stats. I have checked with check_nrpe and the host returns the NRPE Version. Below is my host definition, any insight to what I could be doing wrong is greatly appreciated.

Code: Select all

define host{
        use                     linux-server            ; Name of host template$
                                                        ; This host definition $
                                                        ; in (or inherited by) $
        host_name               Web1
        alias                   Web 01
        address                 XXX.XXX.35.208
        }
Jeffrey Roberts
wormfishin
Posts: 31
Joined: Tue Apr 10, 2012 8:11 am

Re: New Host Retrieving Local Stats

Post by wormfishin »

I'm not sure I understand, can you post your service definition as well?
jroberts001
Posts: 2
Joined: Fri Apr 20, 2012 11:00 am

Re: New Host Retrieving Local Stats

Post by jroberts001 »

Ok, I see what I am doing wrong.....

Code: Select all

define service{
        use                             generic-service         ; Name of service template to use
        host_name                       Web1
        service_description             Root Partition
        check_command                   check_local_disk!20%!10%!/
        }
however, when I change check_local_disk to check_disk I receive a configuration error, what should my check commands be to check the remote machine?

Code: Select all

        check_command                   check_local_disk!20%!10%!/
        check_command                   check_local_users!20!50
        check_command                   check_local_procs!250!400!RSZDT
        check_command                   check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
        check_command                   check_local_swap!20!10
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: New Host Retrieving Local Stats

Post by agriffin »

That depends on your command definitions. The check_command is not the same as the plugin's file name (there is command definition which is defined first and then used in service checks). Look through your command definitions and if you don't see one that looks applicable, you may have to write a new one. See the Nagios Core documentation here for more details about command definitions.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: New Host Retrieving Local Stats

Post by agriffin »

Your command will look something like this, although the details may vary:

Code: Select all

check_nrpe!check_disk!-a '-w 10% -c 20% -p /'
Locked