Archive for the ‘Work’ Category

Nagios SunRay Plugin

Wednesday, March 4th, 2009

I was looking around for a nagios plugin to monitor our sunray servers where I work and I couldn’t find any. So I cooked my own. check_sunray

It’s basically just a wrapper around utwho.

The mandatory arguments for the plugin are -w and -c. -w is the warning threshold for the amount of sunray sessions and -c is the critical threshold for the amount of sunray sessions.

By default it counts all logged-in sunray sessions(but not necessarily active), i.e. the output of utwho with no arguments, with the -o option it only counts active sunray sessions(eq to utwho -c) and -a counts all sessions, even non logged-in ones (eq to utwho -a)

I use nrpe to monitor my remote sunray servers so this is the definition in nrpe.conf:

command[check_sunray]=/opt/csw/libexec/nagios-plugins/check_sunray -w 10 -c 20 -o

This will raise a warning alert if the amount of active sunray sessions goes over 10 and a critical alert if the amount of active sunray sessions goes over 20.

This has only been tested with SRSS 4.1 on solaris but im pretty sure it’ll work with linux SRSS.

If anyone has any other ideas on how to monitor a sunray server leave me a comment.


Copyright © 2018 All Rights Reserved.
No computers were harmed in the 0.083 seconds it took to produce this page.

dmarkey.com