pfsense-zabbix/template_pfsense_active_ips...

301 lines
13 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<date>2021-07-12T10:36:28Z</date>
<groups>
<group>
<name>Templates/Network Devices</name>
</group>
</groups>
<templates>
<template>
<template>Template pfSense Active IPsec</template>
<name>pfSense Active: IPsec</name>
<description>Extension for pfSense Active Template.&#13;
Monitor IPsec VPN.&#13;
&#13;
Requires pfsense_zbx.php installed to pfSense Box.&#13;
Version 1.0.2&#13;
&#13;
https://github.com/rbicelli/pfsense-zabbix-template</description>
<groups>
<group>
<name>Templates/Network Devices</name>
</group>
</groups>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
<discovery_rules>
<discovery_rule>
<name>IPsec Phase 1 Discovery</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.discovery[ipsec_ph1]</key>
<delay>20m</delay>
<description>Discovery of IPsec Phase 1</description>
<item_prototypes>
<item_prototype>
<name>IPsec Tunnel {#IKEID} {#NAME} Tunnel Enabled</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.value[ipsec_ph1,{#IKEID},disabled]</key>
<delay>2m</delay>
<description>IPsec Phase 1 Tunnel Mode</description>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
<valuemap>
<name>pfSense IPsec Enabled</name>
</valuemap>
</item_prototype>
<item_prototype>
<name>IPsec Tunnel {#IKEID} {#NAME} IKE Type</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.value[ipsec_ph1,{#IKEID},iketype]</key>
<delay>10m</delay>
<description>IPsec Phase 1 IKE Type</description>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
<valuemap>
<name>pfSense IPsec IKE Type</name>
</valuemap>
</item_prototype>
<item_prototype>
<name>IPsec Tunnel {#IKEID} {#NAME} Tunnel Mode</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.value[ipsec_ph1,{#IKEID},mode]</key>
<delay>10m</delay>
<description>IPsec Phase 1 Tunnel Mode</description>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
<valuemap>
<name>pfSense IPsec Tunnel Mode</name>
</valuemap>
</item_prototype>
<item_prototype>
<name>IPsec Tunnel {#IKEID} {#NAME} Protocol</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.value[ipsec_ph1,{#IKEID},protocol]</key>
<delay>10m</delay>
<description>IPsec Phase 1 Protocol</description>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
<valuemap>
<name>pfSense IPsec Protocol</name>
</valuemap>
</item_prototype>
<item_prototype>
<name>IPsec Tunnel {#IKEID} {#NAME} Remote Gateway</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.value[ipsec_ph1,{#IKEID},remote-gateway]</key>
<delay>10m</delay>
<trends>0</trends>
<value_type>TEXT</value_type>
<description>IPsec Phase 1 Remote Gateway</description>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
</item_prototype>
<item_prototype>
<name>IPsec Tunnel {#IKEID} {#NAME} Phase 1 Status</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.value[ipsec_ph1,{#IKEID},status]</key>
<description>IPsec Phase 1 Tunnel Mode</description>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
<valuemap>
<name>pfSense IPsec Phase 1 Status</name>
</valuemap>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Template pfSense Active IPsec:pfsense.value[ipsec_ph1,{#IKEID},disabled].last()}=0 and {Template pfSense Active IPsec:pfsense.value[ipsec_ph1,{#IKEID},status].last()}&lt;&gt;1 and {Template pfSense Active IPsec:pfsense.value[ipsec_ph1,{#IKEID},status].last()}&lt;10</expression>
<name>IPsec Tunnel {#IKEID} ({#NAME}) Not Connected</name>
<priority>HIGH</priority>
<description>IPsec Phase 1 is not connected.</description>
</trigger_prototype>
</trigger_prototypes>
</discovery_rule>
<discovery_rule>
<name>IPsec Phase 2 Discovery</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.discovery[ipsec_ph2]</key>
<delay>20m</delay>
<description>Discovery of IPsec Phase 2</description>
<item_prototypes>
<item_prototype>
<name>IPsec Tunnel {#IKEID}.{#REQID} {#NAME} Phase 2 Enabled</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.value[ipsec_ph2,{#UNIQID},disabled]</key>
<delay>2m</delay>
<description>IPsec Tunnel Phase 2 Protocol</description>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
<valuemap>
<name>pfSense IPsec Enabled</name>
</valuemap>
</item_prototype>
<item_prototype>
<name>IPsec Tunnel {#IKEID}.{#REQID} {#NAME} Phase 2 Life Time</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.value[ipsec_ph2,{#UNIQID},lifetime]</key>
<delay>10m</delay>
<units>s</units>
<description>IPsec Tunnel Phase 2 Life Time</description>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
</item_prototype>
<item_prototype>
<name>IPsec Tunnel {#IKEID}.{#REQID} {#NAME} Phase 2 Mode</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.value[ipsec_ph2,{#UNIQID},mode]</key>
<delay>10m</delay>
<description>IPsec Tunnel Phase 2 Mode</description>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
</item_prototype>
<item_prototype>
<name>IPsec Tunnel {#IKEID}.{#REQID} {#NAME} Phase 2 Protocol</name>
<type>ZABBIX_ACTIVE</type>
<key>pfsense.value[ipsec_ph2,{#UNIQID},protocol]</key>
<delay>10m</delay>
<description>IPsec Tunnel Phase 2 Protocol</description>
<applications>
<application>
<name>IPsec</name>
</application>
</applications>
<valuemap>
<name>pfSense IPsec Phase 2 Protocol</name>
</valuemap>
</item_prototype>
</item_prototypes>
</discovery_rule>
</discovery_rules>
</template>
</templates>
<value_maps>
<value_map>
<name>pfSense IPsec Enabled</name>
<mappings>
<mapping>
<value>0</value>
<newvalue>Yes</newvalue>
</mapping>
<mapping>
<value>1</value>
<newvalue>No</newvalue>
</mapping>
</mappings>
</value_map>
<value_map>
<name>pfSense IPsec IKE Type</name>
<mappings>
<mapping>
<value>0</value>
<newvalue>Auto</newvalue>
</mapping>
<mapping>
<value>1</value>
<newvalue>IKE v1</newvalue>
</mapping>
<mapping>
<value>2</value>
<newvalue>IKE v2</newvalue>
</mapping>
</mappings>
</value_map>
<value_map>
<name>pfSense IPsec Phase 1 Status</name>
<mappings>
<mapping>
<value>0</value>
<newvalue>Down</newvalue>
</mapping>
<mapping>
<value>1</value>
<newvalue>Established</newvalue>
</mapping>
<mapping>
<value>2</value>
<newvalue>Connecting</newvalue>
</mapping>
<mapping>
<value>10</value>
<newvalue>Down on CARP Secondary</newvalue>
</mapping>
</mappings>
</value_map>
<value_map>
<name>pfSense IPsec Phase 2 Protocol</name>
<mappings>
<mapping>
<value>1</value>
<newvalue>ESP</newvalue>
</mapping>
<mapping>
<value>2</value>
<newvalue>AH</newvalue>
</mapping>
</mappings>
</value_map>
<value_map>
<name>pfSense IPsec Protocol</name>
<mappings>
<mapping>
<value>0</value>
<newvalue>Dual Stack (IPv4 &amp; IPv6)</newvalue>
</mapping>
<mapping>
<value>1</value>
<newvalue>IPv4</newvalue>
</mapping>
<mapping>
<value>2</value>
<newvalue>IPv6</newvalue>
</mapping>
</mappings>
</value_map>
<value_map>
<name>pfSense IPsec Tunnel Mode</name>
<mappings>
<mapping>
<value>0</value>
<newvalue>Main</newvalue>
</mapping>
<mapping>
<value>1</value>
<newvalue>Aggressive</newvalue>
</mapping>
</mappings>
</value_map>
</value_maps>
</zabbix_export>