Zabbix: monitor VPN LAN client pings

You can have the Zabbix agent ping a LAN device like a LGR or Jace out on the VPN that the Zabbix server itself can’t see.

On the WebCTRL server open the agent config file for editing; C:\Program Files\Zabbix Agent\zabbix_agentd.conf

Find the UserParameter section of the file and add the following line;

UserParameter=ping.host[*],ping $1 -n 1 |find "TTL=">NUL && echo 1 || echo 0

Restart the Zabbix Agent windows service.

In Zabbix web page for that host add a new item

  • Name of the device, eg; Ping LG1
  • Key with IP of thing being monitored; ping.host[192.168.101.101]
  • Under application I used status

  • Check Monitoring, Latest Data and filter for that host name and application Status. After a minute the name you entered should be listed and the last value indicates reachable (1) or unreachable (0), with a graph link to the right.
  • If the item isn’t listed go back to configuration, hosts and filter by the host name, and status application. The word status should be green on the far right for the item you entered, if not the info colum should contain a clue on what happened.
  • The Zabbix Agent log on the host may also contain some useful information.

Trigger

In the Zabbix web page select Configuration, hosts and select triggers for that host. Click new trigger top right

Fill in trigger info;

  • Name, descriptive name like; LG1 Down
  • Expression;
    • Item, use select button and find the item you made previously
    • Function; avg() Average value of a period T
    • Last of (T); 5 and change the dropdown to Count
    • Result; <  0.2

Review your severity and accept the new trigger