Ad Widget

Collapse

Check tunX device / perhaps with external ping

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Beam
    Junior Member
    • May 2007
    • 12

    #1

    Check tunX device / perhaps with external ping

    Hi,

    i want to check the availibilty of some tun devices, e.g. tun0,tun1, tun2, tun3 on a server, where no zabbix_agentd could be running. My first thought was an external check. So i created the /etc/zabbix/externalscripts directory and the following line in /etc/zabbix/zabbix_server.conf:

    Code:
    ExternalScripts=/etc/zabbix/externalscripts/
    Then i restarted the zabbix server and create the following script check_ping.sh (works fine in console):

    Code:
    #!/bin/bash
    #$1 = hostname, can be ignored
    #$2 = target
    date >> /tmp/check_ping.log
    echo `fping $2 | grep alive -c`
    The 4th line is only to check if the script is executed. The rights for the script are 777.

    In the webui i created an item with type "external check" and key check_ping.sh[10.0.0.5].

    It shows External check [check_ping.sh[10.13.50.200]] is not supported, same in the server log.

    I've read about a patch for external scripts, is it neccesary with the debian testing package? Its 1.4.1.

    Maybe there is a better solution? One solution is to create a host with the IP of the interface, but i think thats not arranged well.
Working...