Page 1 of 1

New Host Retrieving Local Stats

Posted: Fri Apr 20, 2012 11:14 am
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

Re: New Host Retrieving Local Stats

Posted: Fri Apr 20, 2012 12:02 pm
by wormfishin
I'm not sure I understand, can you post your service definition as well?

Re: New Host Retrieving Local Stats

Posted: Fri Apr 20, 2012 12:56 pm
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

Re: New Host Retrieving Local Stats

Posted: Fri Apr 20, 2012 1:27 pm
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.

Re: New Host Retrieving Local Stats

Posted: Fri Apr 20, 2012 1:29 pm
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 /'