check_radius
Rabbie Zalaf
ZalafR at Leadingedgegroup.com.au
Mon Mar 8 04:05:55 CET 2004
Hi All,
This is my first post so my appologies if I state anything stupid.
I wrote the following script and placed it into libexec.
#!/bin/bash
PREFIX=/usr/bin
set `$PREFIX/radpwtst -trace 4 $USER1$/check_radius -s $1 -secret $2 -noacct
-auth_port $3 -user $4 -password $5 -called_station_id $6 | tail -1`
if [ $1 = OK ] ; then
echo "OK"
else
echo "CRITICAL - No reply"
fi
Basically it sends a RADIUS authentication request to a radius server and
will either come back with OK or No reply... I have tested the script and it
works perfectly, but when I Integrate it with nagios, like this:
define service{
use generic-service ; Name of
service template to use
host_name x.x.x.x
service_description RADIUS
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 120
notification_period 24x7
notification_options u,c,r
check_command
check_radius!mysecret!1645!username!password!0198xxxxxx
}
My web interface in nagios shows a green light and says that everything is
ok... even when the response is CRITICAL...
How do I make nagios alarm when the script returns a CRITICAL error?
Thanks in advance for any help you may offer.
Rabbie Zalaf
Network Consultant
Leading Edge Internet
02 9497 4024
http://www.leadingedgeinternet.net.au
<http://www.leadingedgeinternet.net.au>
-----BEGIN GEEK CODE BLOCK-----
VERSION: 3.1
GIT d++ s:>s-:- a22 C++++ L U+++
P+ L+++>$L+++++ E--- W+++ w-- M--
t+++ G++
-----END GEEK CODE BLOCK-----
This document together with any attachments is confidential and is intended
for the named recipient only. It can not be copied, disclosed, passed on or
duplicated in any way shape or form, without the prior permission of the
author. If you are not the intended recipient please contact the author
immediately and destroy the message. All parties acknowledge that any breach
of confidence or disclosures made by any party, (including their employees,
agents and contracted service providers such as solicitors, accountants,
auditors and others), which may result in a commercial loss to Leading Edge
Group, may result in Leading Edge Group exercising such rights as are
available to them in connection with that loss.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040308/4de04d2f/attachment.html>
More information about the Users
mailing list