Monitorizar servicio Freeradius

Ejemplo de monitorización del servicio freeradius.

Servidores nagios:

213.190.0.6
213.190.0.226

Servidores freeradius:

83.150.207.254
213.190.0.28
213.190.0.226
213.190.0.229
213.190.0.242

.6 y .226

aptitude install radiusclient1

cd /etc/radiusclient
vi servers

83.150.207.254                                 nagiospass
213.190.0.28                                     nagiospass
213.190.0.226                                   nagiospass
213.190.0.229                                   nagiospass
213.190.0.242                                   nagiospass

cd /etc/nagios3/conf.d/
vi services.cfg

#######################################################################################
#######################       Chequeo de freeradius         ###########################
#######################################################################################

# check that freeradius services are running
define service{
        host_name                       go-cacti-interxion
        service_description             FreeRadius
        check_command                   check_radius!1645!10!nagios@seasuntel@xdsl!nagiosp
        use                             generic-service         ; Name of service template to use
        notification_interval           0
}

# check that freeradius services are running
define service{
        host_name                       go-martin
        service_description             FreeRadius
        check_command                   check_radius!1812!10!nagios@seasuntel@xdsl!nagiosp
        use                             generic-service         ; Name of service template to use
        notification_interval           0
}

# check that freeradius services are running
define service{
        host_name                       go-radius2-quioscos-vm
        service_description             FreeRadius
        check_command                   check_radius!1812!10!nagios@seasuntel@xdsl!nagiosp
        use                             generic-service         ; Name of service template to use
        notification_interval           0
}

# check that freeradius services are running
define service{
        host_name                       go-wispavila-vm
        service_description             FreeRadius
        check_command                   check_radius!1812!10!nagios@seasuntel@xdsl!nagiosp
        use                             generic-service         ; Name of service template to use
        notification_interval           0
}

# check that freeradius services are running
define service{
        host_name                       aviles-kodos
        service_description             FreeRadius
        check_command                   check_radius!1812!10!nagios@seasuntel@xdsl!nagiosp
        use                             generic-service         ; Name of service template to use
        notification_interval           0
}

cd /etc/nagios-plugins/config/
vi radius.cfg

# 'check_radius' command definition
define command{
        command_name    check_radius
        command_line    /usr/lib/nagios/plugins/check_radius -F /etc/radiusclient/radiusclient.conf -H '$HOSTADDRESS$' -P '$ARG1$' -t '$ARG2$' -u '$ARG3$' -p '$ARG4$'
        }

ll radius.cfg
-rw-r--r-- 1 root root 267 Jul 15 10:40 radius.cfg

/etc/init.d/freeradius restart
/etc/init.d/nagios3 restart

.254, .28, .226, .229 y .242

cd /etc/freeradius/
vi proxy.conf

realm seasuntel@xdsl {
        authhost        = LOCAL
        accthost        = LOCAL
        nostrip
}

vi users

### Nagios ###

nagios@seasuntel@xdsl Cleartext-Password := "nagiosp"

##################################################################

vi clients.conf

#
## Nagios
#

client 213.190.0.226 {
        secret = nagiospass
        shorname = zupernagios-213.190.0.226
}

client 213.190.0.6 {
        secret = nagiospass
        shortname = zupernagios-213.190.0.6
}

cd /etc/shorewall
vi rules

#
# Accept nagios de la 213.190.0.6 para peticiones de test al servicio Radius
#
ACCEPT  eth0:213.190.0.6/32    $FW     udp     1645 # Puerto que corresponda
ACCEPT  eth0:213.190.0.226/32  $FW     udp     1645 # Puerto que corresponda

/etc/init.d/freeradius restart
/etc/init.d/shorewall restart

« Linux | Nagios 3

Si no se indica lo contrario, el contenido de esta página se ofrece bajo Creative Commons Attribution-ShareAlike 3.0 License