1

Since I asked this question already on askubuntu but nobody answered for a week perhaps here somebody knows the answere (https://askubuntu.com/questions/462162/nagios-plugin-check-radius-missing-in-ubuntu-14-04).

I recently updated our Nagios-Server from Ubuntu LTS 12.04.04 to 14.04 - despite I know that this migration is not supported.

Everything works fine but our Radius-Check fails... and now I know why: the executable "check_radius" is missing in /usr/lib/nagios/plugins - it seems to have been deinstalled during upgrade.

Does anybody know why, how to get it back or to replace it?

Since it´s an UDP-Protocol I can´t do a port check.

content of /usr/lib/nagios/plugins:

check_apt       check_dns       check_icmp          check_log          check_nt        check_procs          check_spop   negate
check_breeze    check_dummy     check_ide_smart     check_mailq        check_ntp       check_real           check_ssh    urlize
check_by_ssh    check_file_age  check_ifoperstatus  check_mrtg         check_ntp_peer  check_rpc            check_ssmtp  utils.pm
check_clamd     check_flexlm    check_ifstatus      check_mrtgtraf     check_ntp_time  check_rta_multi      check_swap   utils.sh
check_cluster   check_fping     check_imap          check_mysql        check_nwstat    check_sensors        check_tcp
check_dbi       check_ftp       check_ircd          check_mysql_query  check_oracle    check_simap          check_time
check_dhcp      check_game      check_jabber        check_nagios       check_overcr    check_smb            check_udp
check_dig       check_host      check_ldap          check_nntp         check_pgsql     check_smb_shares.pl  check_ups
check_disk      check_hpjd      check_ldaps         check_nntps        check_ping      check_smtp           check_users
check_disk_smb  check_http      check_load          check_nrpe         check_pop       check_snmp           check_wave
cljk
  • 225
  • 1
  • 10

2 Answers2

2

Download it from here: nagios exchange

You can get a lot of other plugins from there aswell.

Depending on your nagios setup you might need to make the file executable for the nagios daemon user.

As you found out this seems be a bug:

Launchpad Bugreport

Dennis Nolte
  • 2,881
  • 4
  • 27
  • 37
  • Thanks - didn´t know that I could download it so simple. I already checked the changelog but didn´t find anything .... but some seconds ago I found submission "e5fc80f" where simply stands "- check_radius". I´ll write an email to the committer... – cljk May 14 '14 at 07:30
  • @cljk you should check what you download though, allways be suspicious of unknown code. – Dennis Nolte May 14 '14 at 07:37
  • 1
    Okay, after ~1h of searching I found out there´s already filed a bug report for it: https://bugs.launchpad.net/ubuntu/+source/nagios-plugins/+bug/1275495 - existing in precise (http://packages.ubuntu.com/de/precise/amd64/nagios-plugins-standard/filelist) missing in trusty (http://packages.ubuntu.com/de/trusty/amd64/nagios-plugins-standard/filelist) – cljk May 14 '14 at 08:06
  • added the info to the answer, just in case someone is refering to this. – Dennis Nolte May 14 '14 at 08:12
-1

I used this script

  • "https://gist.github.com/djjudas21/cd1e7bfee44fb879855d#file-check_radius_status-pl"

but still obtaining this message in nagios (UNKNOWN - Could not interrogate RADIUS server status). The Sample response as shown in the script is different

-Sample response

  • Received response ID 183, code 2, length = 344

  • FreeRADIUS-Total-Access-Requests = 517

  • FreeRADIUS-Total-Access-Accepts = 1047

-Real sample response

  • Received Access-Accept Id 162 from 192.168.255.10:18121 to 0.0.0.0:0 length 344

  • FreeRADIUS-Total-Access-Requests = 3191

  • FreeRADIUS-Total-Access-Accepts = 353

So I modified the perl script like this and it works fine. I am not an expert in perl but here are the changes I made.

  • my $return = /bin/echo "Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = 7" | /usr/bin/radclient $ip:$port status $secret -x ;

..........

  • my @lines = split /\n/, $return;
  • my $message = shift(@lines);
  • my $message1 = shift(@lines);
  • my $message2 = shift(@lines);
  • $message2 = shift(@lines);
  • if ($message2 && $message2 =~ m/^Received Access-Accept Id/) {

.....

......

  • if ($line =~ m/=/ && $line !~ m/^Received Access-Accept Id/) {

Don't forget to activate the status site on the radius server by making a link or copying sites-available/status to sites-enabled

Best regards