check_cluster config

Thomas Guyot-Sionnest dermoth at aei.ca
Tue Oct 2 00:31:47 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/10/07 09:49 AM, stephen wing wrote:
> Hi Thomas
> 	Thanks for the reply.
> In the check_service_cluster setup that you have described, what is the
> variable Shared_disk$ set to because the way that I am doing this is that I
> have setup a service for both server1 and server2 to search for the
> following filesystem :-
> /hcndata
> To do this I have the nrpe daemon running on both servers and a service
> running against both these servers as follows :-
> 
> define service {
> host_name                      hcntest
> service_description            /hcndata Free Space
> check_command                  check_nrpe!check_hcndata
> use                            generic-service
> max_check_attempts             3
> normal_check_interval          5
> retry_check_interval           1
> check_period                   24x7
> notification_interval          60
> notification_period            24x7
> notification_options           w,c,r
> contact_groups                 admins
> }


Then substitute "Shared_disk" with "/hcndata Free Space"

If you look the the command definition, what becomes the "-l" argument
is just a label (What will be printed in the service status). In the
example I wrote the label is the 3rd argument.

The other arguments are macro definitions used to fetch the status of
specific services on specific hosts
($SERVICESTATEID:host_name:service_description$). This will return the
numerical equivalent of the Nagios status (0=>OK, 1=>WARNING,
2=>CRITICAL, etc.).

check_cluster gets the status (passed to "-d") and send a critical alert
when more than 1 service is non-OK ("-c 1"). if you want to warn only
you can use "-w 1" instead of "-c 1"

you can run check_cluster yourself to see the results:

$ ./check_cluster -s -d 0,2 -l "Shared disk" -c 1
CLUSTER OK: Shared disk: 1 ok, 0 warning, 0 unknown, 1 critical
$ ./check_cluster -s -d 1,2 -l "Shared disk" -c 1
CLUSTER CRITICAL: Shared disk: 0 ok, 1 warning, 0 unknown, 1 critical


Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHAXVT6dZ+Kt5BchYRAkfBAKDZYQ0ctT3Z2H/yty/O8cdon/2qhgCg2iOD
zsLHjgJjtz6xE2lgFcrvG7o=
=MhOe
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list