Esta web utiliza cookies, puedes ver nuestra política de cookies, aquí Si continuas navegando estás aceptándola

Monitorizar controladoras de disco Adaptec mediante Zabbix


Nos bajamos la herramienta propietaria de Adaptec:

https://www.adaptec.com/en-us/speed/raid/storage_manager/arcconf_v1_4_20859_zip.php

Descomprimimos la tool y copiamos los ficheros al path del sistema:

mkdir adaptec
mv arcconf_v1_4_20859.zip adaptec/
cd adaptec/
unzip arcconf_v1_4_20859.zip
cp linux_x64/cmdline/arcconf /usr/sbin/
chmod 700 /usr/sbin/arcconf

Configuramos la parte del cliente de zabbix:

vi /etc/zabbix/conf.d/adaptec.conf
UserParameter=adaptec.status,/var/lib/zabbix/externalscripts/adaptec_status.sh

Programamos el script de chequeo de la controladora y los discos:

vi /var/lib/zabbix/externalscripts/adaptec_status.sh
#! /bin/bash
# Failed
failed=$(/usr/sbin/arcconf GETCONFIG 1 | grep "Logical devices" | awk -F "/" '{print $4}')
# Degraded
degraded=$(/usr/sbin/arcconf GETCONFIG 1 | grep "Logical devices" | awk -F "/" '{print $5}')
# Status
status=$(/usr/sbin/arcconf GETCONFIG 1 | grep "Controller Status"|grep -vc Optimal)

if [ $failed -ne 0 ] || [ $degraded -ne 0 ] || [ $status -eq 1 ]; then
    zabbix_sender -z ZBXSERVER_IP/ZBX_PROXY_IP -s SERVER_NAME -k adaptec.status -o 1
else
    zabbix_sender -z ZBXSERVER_IP/ZBX_PROXY_IP -s SERVER_NAME -k adaptec.status -o 0
fi
chmod 700 /etc/zabbix/adaptec_status.sh

Reiniciamos el zabbix-agent:

/etc/init.d/zabbix-agentd restart

Creamos el template en la interfaz web de zabbix:

Configuration -> Templates -> Create Template
AdaptecStatus
Add
Aplications -> Create aplication
AdaptecStatus
Items -> Create item
Name: AdaptecStatus
Type: Zabbix trapper
Key: adaptec.status
Type of information: Numeric unsigned
Triggers -> Create trigger
Name:
AdaptecStatus Fail
Expression:
{AdaptecStatus:adaptec.status.last()}=1

Probamos manualmente el trigger:

zabbix_sender -z ZBX_SERVER_IP/ZBX_PROXY_IP -s SERVER_NAME -k adaptec.status -o 1

Autor: Kr0m -- 29/04/2016 07:04:41