RADIUS

check_radius.pl

Description:

Plugin written in Perl using radclient and Status-Server packet from FreeRADIUS project. Performance data about elapsed time executing the query.

Current Version

Last Release Date

February 1, 2010

Compatible With


Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Project Files
Project Notes
Reviews (2) Add a Review
Very useful but some rough edges
by qha, May 31, 2012
Calling '/etc/init.d/radiusd restart' the first time I manage to supply all required options but hadn't configured my radius server well enough to permit the status-server request was rather excessive.

Also the plugin has a hard coded path to radclient that isn't where my distribution installed it.

I made some changes to make it easier to use, patchset pasted below, if you're responsible for this plugin and would like the patchset in a less likely to be mangled form please let me know!

---------------------- 80,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);

@@ -33,22 +42,27 @@ print $o_debug,
- 'H|hostname:s' => $host,
- 'P|port:i' => $port,
- 'w|warning:i' => $w,
- 'c|critical:i' => $c,
- 't|timeout:s' => $t,
- 'e|exec:s' => $exec,
- 's|secret:s' => $secret,
-
+ 'h|help' => $help,
+ 'd|debug' => $debug,
+ 'H|hostname:s' => $host,
+ 'P|port:i' => $port,
+ 'w|warning:i' => $w,
+ 'c|critical:i' => $c,
+ 't|timeout:s' => $t,
+ 'e|exec:s' => $exec,
+ 'r|radclient:s' => $radclient,
+ 's|secret:s' => $secret,
+
);

- usage() if (defined($o_help));
- $debug = 1 if (defined($o_debug));
- if ( $port !~ /^d+$/ or ($port 65535)) {
+ usage() if (defined($help));
+ if ( $port !~ /^d+$/ or ($port 65535)) {
print "nPlease insert an integer value between 1 and 65535n";
usage();
}
@@ -90,7 +101,11 @@ sub check_options () {
if ( $t !~ /^d+$/ or $t /dev/null 2>&1") != 0) {
+ print "n$radclient used for radclient not found.n";
+ usage();
+ }
if ( !defined($secret) ) {
print "nPlease supply the secret for $hostn";
usage();
@@ -122,7 +137,7 @@ print " | ";
print "'Response Time'=$elapsed;$w;$c;0;$tn";

if ( $? != 0 and defined($exec)) {
- print "DEBUG: radclient timeout: executing "$exec"n";
+ print "DEBUG: radclient timeout: executing "$exec"n" if $debug;
system("$exec 1>/dev/null 2>/dev/null");
}
Helpful? Yes  No 
Like this
by Doornenbal, May 31, 2011
It is just a pity the script doesn't check the availability of radclient. Was first mistaken with that! So check your requirements!
1 of 1 found this review helpful.
Helpful? Yes 1 No 0
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4 (2)
Favorites
0
Views
172,901