zabbix_export:
  version: '6.4'
  template_groups:
    - uuid: 36bff6c29af64692839d077febfc7079
      name: 'Templates/Network devices'
  templates:
    - uuid: 9a45fadad3064f8989607f750a2ea65c
      template: 'Asus Router by Zabbix Agent'
      name: 'Asus Router by Zabbix Agent'
      description: |
        Asus WRT router template for Merlin firmware with Zabbix Agent passive
        
        by diasdm
        https://github.com/diasdmhub/Zabbix_Template_Asus_Merlin
      vendor:
        name: diasdmhub
        version: 6.4-10
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: cd3b753e97fa42c9ba91844d819d93a2
          name: 'Conmon Jitter'
          type: DEPENDENT
          key: conmon.jitter
          delay: '0'
          history: 30d
          value_type: FLOAT
          units: ms
          description: |
            Jitter time in ms.
            From Asus WRT Merlin "Conmon" script by Jackyaz (https://github.com/jackyaz).
          preprocessing:
            - type: REGEX
              parameters:
                - '(.*),(.*),(.*),(.*),(.*),(.*)'
                - \3
          master_item:
            key: 'vfs.file.contents[/jffs/addons/connmon.d/lastx.csv]'
          tags:
            - tag: Service
              value: conmon
        - uuid: 0a8ac8409114430498b1e011eaff09c3
          name: 'Conmon Line Quality'
          type: DEPENDENT
          key: conmon.linequality
          delay: '0'
          history: 30d
          value_type: FLOAT
          units: '%'
          description: |
            Line Quality in %.
            From Asus WRT Merlin "Conmon" script by Jackyaz (https://github.com/jackyaz).
          preprocessing:
            - type: REGEX
              parameters:
                - '(.*),(.*),(.*),(.*),(.*),(.*)'
                - \4
          master_item:
            key: 'vfs.file.contents[/jffs/addons/connmon.d/lastx.csv]'
          tags:
            - tag: Service
              value: conmon
          triggers:
            - uuid: 33119fe630c1424891e3e193c2a5c6b2
              expression: 'avg(/Asus Router by Zabbix Agent/conmon.linequality,#3)<={$CONMON.QUALITY.WARN}'
              name: 'Conmon reports low line quality'
              opdata: 'Quality: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'Last 3 values average from Conmon''s Line Quality is low.'
              manual_close: 'YES'
              tags:
                - tag: Conmon
                  value: quality
                - tag: Quality
                  value: low
        - uuid: a9a76933c35b47c3bdac6d88ee2df948
          name: 'Conmon Ping'
          type: DEPENDENT
          key: conmon.ping
          delay: '0'
          history: 30d
          value_type: FLOAT
          units: ms
          description: |
            Ping time in ms.
            From Asus WRT Merlin "Conmon" script by Jackyaz (https://github.com/jackyaz).
          preprocessing:
            - type: REGEX
              parameters:
                - '(.*),(.*),(.*),(.*),(.*),(.*)'
                - \2
          master_item:
            key: 'vfs.file.contents[/jffs/addons/connmon.d/lastx.csv]'
          tags:
            - tag: Service
              value: conmon
          triggers:
            - uuid: e0589b977f2e41b9a45586b3cca82a87
              expression: |
                trendavg(/Asus Router by Zabbix Agent/conmon.ping,1h:now/h)
                >
                baselinewma(/Asus Router by Zabbix Agent/conmon.ping,1h:now/h,"d",30) * 2
              name: 'Conmon abnormal Ping rise'
              opdata: 'Ping: {ITEM.LASTVALUE}'
              priority: WARNING
              description: 'Indicates that the previous hour average ping is higher than 2x the last 30d baseline'
              manual_close: 'YES'
              tags:
                - tag: Conmon
                  value: ping
                - tag: Ping
                  value: high
        - uuid: 0ad2f3df082d41c2bdc7ac8ec0806b2b
          name: 'DNS Service IPv6'
          key: 'net.dns[,{$DNSNAME},AAAA]'
          delay: 1h
          history: 7d
          tags:
            - tag: Service
              value: dns
          triggers:
            - uuid: 37f2cf87518d413fb99f3ac797316a50
              expression: 'last(/Asus Router by Zabbix Agent/net.dns[,{$DNSNAME},AAAA])=0'
              name: 'DNS Service IPv6 down'
              priority: HIGH
              tags:
                - tag: Dns
                  value: ipv6
        - uuid: 6d9670d186694979aef20c2d92ac363e
          name: 'DNS Service IPv4'
          key: 'net.dns[,{$DNSNAME},A]'
          delay: 1h
          history: 7d
          tags:
            - tag: Service
              value: dns
          triggers:
            - uuid: f953d14b608c4d7b957735e1aaf5ec9e
              expression: 'last(/Asus Router by Zabbix Agent/net.dns[,{$DNSNAME},A],#1)=0'
              name: 'DNS Service IPv4 down'
              priority: HIGH
              tags:
                - tag: Dns
                  value: ipv4
        - uuid: a3411c3f47ba453692e15d90308a49eb
          name: 'Web Performance'
          type: SIMPLE
          key: 'net.tcp.service.perf[{$WEB.PROTOCOL},,{$WEB.PORT}]'
          delay: 5m
          history: 7d
          value_type: FLOAT
          units: s
          description: 'Web service performance check.'
          tags:
            - tag: Service
              value: web
          triggers:
            - uuid: 9ef86d7126fb459cb1c2da8a95ce8249
              expression: 'max(/Asus Router by Zabbix Agent/net.tcp.service.perf[{$WEB.PROTOCOL},,{$WEB.PORT}],#3)=0'
              name: 'Web service is down'
              opdata: '{ITEM.LASTVALUE}'
              url: '{$HTTP.TYPE}://{HOST.DNS}:{$HTTP.STATUS.PORT}'
              priority: HIGH
              description: 'Check the router web UI'
              tags:
                - tag: Web
                  value: down
        - uuid: 6c1f4ef8dddb4e2f8e74b010e9adfc8c
          name: 'NTP Performance'
          type: SIMPLE
          key: 'net.udp.service.perf[ntp]'
          delay: 5m
          history: 1w
          value_type: FLOAT
          units: s
          description: |
            NTP service performance check.
            This is an internal check performed by the Server/Proxy, therefore, the NTP daemon must reply to the Server/Proxy requests. Remember to check your NTP server configuration to allow for such requests.
          tags:
            - tag: Service
              value: ntp
          triggers:
            - uuid: c56bb1450c6d45199de8e901142d393a
              expression: 'max(/Asus Router by Zabbix Agent/net.udp.service.perf[ntp],#3)=0'
              name: 'NTP service is down'
              opdata: '{ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'Check NTP service'
              tags:
                - tag: NTP
                  value: down
        - uuid: 9e98b33889e94e10b0ceef12f1dbd33d
          name: 'NTPMerlin Drift'
          type: DEPENDENT
          key: ntpmerlin.drift
          delay: '0'
          history: 30d
          value_type: FLOAT
          units: ppm
          description: |
            Drift in ppm.
            From Asus WRT Merlin's "NTPMerlin" script by Jackyaz (https://github.com/jackyaz).
          preprocessing:
            - type: REGEX
              parameters:
                - '(.*),(.*),(.*)'
                - \3
          master_item:
            key: 'vfs.file.contents[/opt/share/ntpmerlin.d/lastx.csv]'
          tags:
            - tag: Service
              value: ntpmerlin
        - uuid: fa32387a80d842b285badb0366bdbaf3
          name: 'NTPMerlin Offset'
          type: DEPENDENT
          key: ntpmerlin.offset
          delay: '0'
          history: 30d
          value_type: FLOAT
          units: ms
          description: |
            Offset time in ms.
            From Asus WRT Merlin's "NTPMerlin" script by Jackyaz (https://github.com/jackyaz).
          preprocessing:
            - type: REGEX
              parameters:
                - '(.*),(.*),(.*)'
                - \2
          master_item:
            key: 'vfs.file.contents[/opt/share/ntpmerlin.d/lastx.csv]'
          tags:
            - tag: Service
              value: ntpmerlin
        - uuid: e87e2eb398ee4421943c585340c17604
          name: 'System Firmware Version'
          type: DEPENDENT
          key: system.current.version
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'Indicates the devices current firmware version'
          inventory_link: SOFTWARE
          preprocessing:
            - type: REGEX
              parameters:
                - 'buildno=(.*)'
                - \1
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'system.run["nvram show | grep -E ''(^buildno=)|(^productid=)|(^webs_state_flag=)|(^webs_state_info=)''"]'
          tags:
            - tag: System
              value: version
        - uuid: 80af50e84b3349c49d82f952a03cabbd
          name: 'System Model'
          type: DEPENDENT
          key: system.model
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'Indicates the device model name'
          inventory_link: MODEL
          preprocessing:
            - type: REGEX
              parameters:
                - 'productid=(.*)'
                - \1
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'system.run["nvram show | grep -E ''(^buildno=)|(^productid=)|(^webs_state_flag=)|(^webs_state_info=)''"]'
          tags:
            - tag: System
              value: model
        - uuid: 8c98f68723e349e7a31cbb96f72afa79
          name: 'System Firmware New Version Info'
          type: DEPENDENT
          key: system.new.version
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'Indicates the devices new firmware version if available'
          preprocessing:
            - type: REGEX
              parameters:
                - 'webs_state_info=(.*)'
                - \1
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'system.run["nvram show | grep -E ''(^buildno=)|(^productid=)|(^webs_state_flag=)|(^webs_state_info=)''"]'
          tags:
            - tag: System
              value: version
        - uuid: 4bdcc08e02dc43d4a136dc2687668031
          name: 'System Firmware New Version Flag'
          type: DEPENDENT
          key: system.new.version.flag
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'Indicates the device has a new firmware version available'
          preprocessing:
            - type: REGEX
              parameters:
                - 'webs_state_flag=(.*)'
                - \1
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'system.run["nvram show | grep -E ''(^buildno=)|(^productid=)|(^webs_state_flag=)|(^webs_state_info=)''"]'
          tags:
            - tag: System
              value: version
          triggers:
            - uuid: fa05e37c3eb8482dac9242708b7ec5a5
              expression: 'last(/Asus Router by Zabbix Agent/system.new.version.flag,#1)=1'
              name: 'New Firmware Version Available'
              opdata: 'New version: {?last(//system.new.version)}'
              priority: INFO
              description: |
                Indicates that there is a new firmware version available
                The flag remains on until the device is updated
              manual_close: 'YES'
              tags:
                - tag: Version
                  value: new
        - uuid: 7a6ad841a5cf49f78e901449f466ce9e
          name: 'Internet IPv4'
          key: 'system.run["ip -4 addr show {$IF.INTERNET} | grep -m 1 inet | awk -F ''[ /]'' ''{print $6}''"]'
          delay: 10m
          history: 7d
          trends: '0'
          value_type: CHAR
          description: |
            Internet IPv4 address retrieved from {$IF.INTERNET} interface.
            If your router uses other internet interface, try changing your interface name at host macro settings.
          tags:
            - tag: System
              value: status
        - uuid: 3ffbed93af4d47f692e1a7b9587221bf
          name: 'Internet IPv6'
          key: 'system.run["ip -6 addr show {$IF.INTERNET} | grep -m 1 inet | awk -F ''[ /]'' ''{print $6}''"]'
          delay: 10m
          history: 7d
          trends: '0'
          value_type: CHAR
          description: |
            Internet IPv6 address retrieved from {$IF.INTERNET} interface.
            If your router uses other Internet interface, try changing your interface name at host macro settings.
          tags:
            - tag: System
              value: status
        - uuid: 7f8f22a2e3fd43b49328ce29d2b6378d
          name: 'System NVRAM'
          key: 'system.run["nvram show | grep -E ''(^buildno=)|(^productid=)|(^webs_state_flag=)|(^webs_state_info=)''"]'
          delay: 1d
          history: '0'
          trends: '0'
          value_type: TEXT
          description: 'Gathers firmware version data from the device'
          tags:
            - tag: System
              value: nvram
        - uuid: 3c24503adf2240f4a13cb2f06c5d91b4
          name: 'AdGuard Home Service Status'
          key: 'system.run[/opt/etc/init.d/S99AdGuardHome check]'
          delay: 3m
          history: 7d
          trends: '0'
          description: |
            AdGuard Home status
            1 - Alive
            0 - Dead
          valuemap:
            name: 'AdGuard Home Status'
          preprocessing:
            - type: REGEX
              parameters:
                - alive
                - '1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          tags:
            - tag: Service
              value: adguard
          triggers:
            - uuid: f2564318626546b08e3679bc775170d3
              expression: 'last(/Asus Router by Zabbix Agent/system.run[/opt/etc/init.d/S99AdGuardHome check])<>1'
              name: 'AdGuardHome Status Down'
              priority: HIGH
              description: 'AdGuardHome is not up'
              tags:
                - tag: Adguard
                  value: down
        - uuid: c33a9d75e1ca456282a25ef39a01505a
          name: 'Temperature Wireless 2.4GHz'
          key: 'system.run[wl -i {$IF.WLTEMP2} phy_tempsense | awk ''{print $1/2+20}'']'
          history: 7d
          value_type: FLOAT
          units: °C
          description: 'Wireless 2.4GHz Temperature'
          tags:
            - tag: System
              value: temperature
          triggers:
            - uuid: 1bb7f79e0bc5411188338d639bdb55cb
              expression: 'avg(/Asus Router by Zabbix Agent/system.run[wl -i {$IF.WLTEMP2} phy_tempsense | awk ''{print $1/2+20}''],#3)>=65'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'avg(/Asus Router by Zabbix Agent/system.run[wl -i {$IF.WLTEMP2} phy_tempsense | awk ''{print $1/2+20}''],#3)<64'
              name: 'Wireless 2.4GHz high temperature'
              opdata: '{ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'The last 3 values average indicate a Wireless 2.4Hz high temperature'
              tags:
                - tag: Temp
                  value: high
        - uuid: 29b922d4dbb34773b1bb083b582d9fcf
          name: 'Temperature Wireless 5.0GHz'
          key: 'system.run[wl -i {$IF.WLTEMP5} phy_tempsense | awk ''{print $1/2+20}'']'
          history: 7d
          value_type: FLOAT
          units: °C
          description: 'Wireless 5.0GHz Temperature'
          tags:
            - tag: System
              value: temperature
          triggers:
            - uuid: eef8812116bc4db1a47d88b438469248
              expression: 'avg(/Asus Router by Zabbix Agent/system.run[wl -i {$IF.WLTEMP5} phy_tempsense | awk ''{print $1/2+20}''],#3)>=65'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'avg(/Asus Router by Zabbix Agent/system.run[wl -i {$IF.WLTEMP5} phy_tempsense | awk ''{print $1/2+20}''],#3)<64'
              name: 'Wireless 5.0Hz high temperature'
              opdata: '{ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'The last 3 values average indicate a Wireless 5.0Hz high temperature'
              tags:
                - tag: Temp
                  value: high
        - uuid: ce4b84ae8d1e4c978f32b02d22729733
          name: 'Conmon CSV'
          key: 'vfs.file.contents[/jffs/addons/connmon.d/lastx.csv]'
          delay: 2m
          history: '0'
          trends: '0'
          value_type: CHAR
          description: |
            Monitoring from Asus WRT Merlin's "Conmon" script by Jackyaz (https://github.com/jackyaz), if you have installed it.
            Raw CSV data from latest ping test executed by Conmon.
            This item only collects the latest ping test result and saves it as a string.
            Dependent items that process this data.
            It is recommended that you change the update interval at host-level to match your Conmon's scheduled ping test frequency.
            
            Storage location for stats and config:
            If using the JFFS partiton, the key file path is /jffs/addons/connmon.d/lastx.csv
            If using the USB drive, the key file path is /opt/share/connmon.d/lastx.csv
          preprocessing:
            - type: DISCARD_UNCHANGED
              parameters:
                - ''
            - type: REGEX
              parameters:
                - '(.*)'
                - \1
          tags:
            - tag: Service
              value: conmon
        - uuid: ba360a5b01f04392b35ea29530ac64da
          name: 'NTPMerlin CSV'
          key: 'vfs.file.contents[/opt/share/ntpmerlin.d/lastx.csv]'
          history: '0'
          trends: '0'
          value_type: CHAR
          description: |
            Monitoring from Asus WRT Merlin's "NTPMerlin" script by Jackyaz (https://github.com/jackyaz), if you have installed it.
            Raw CSV data from latest NTP test executed by NTPMerlin.
            This item only collects the latest NTP result and saves it as a string.
            Dependent items that process this data.
            It is suggested to change your update interval at host level to reflect your NTPMerlin's scheduled test frequency.
            
            Storage location for stats and config:
            If using the JFFS partiton, the key file path is /jffs/addons/ntpmerlin.d/lastx.csv
            If using the USB drive, the key file path is /opt/share/ntpmerlin.d/lastx.csv
          preprocessing:
            - type: DISCARD_UNCHANGED
              parameters:
                - ''
            - type: REGEX
              parameters:
                - '(.*)'
                - \1
          tags:
            - tag: Service
              value: ntpmerlin
        - uuid: aad726a3badf463e9e7e803deb722469
          name: 'Temperature CPU'
          key: 'vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp]'
          history: 7d
          value_type: FLOAT
          units: °C
          description: 'CPU Temperature'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: System
              value: temperature
          triggers:
            - uuid: 1532c93cd5e04be2bc10b6e257baeed4
              expression: 'last(/Asus Router by Zabbix Agent/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)>={$CPU.HIGH.TEMP}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'last(/Asus Router by Zabbix Agent/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)<{$CPU.HIGH.TEMP}-1'
              name: 'CPU High temperature'
              opdata: '{ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'High CPU temperature'
              tags:
                - tag: Temp
                  value: high
            - uuid: abe5df46aff848b983fe2b84d9d4dc43
              expression: 'last(/Asus Router by Zabbix Agent/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)>={$CPU.TOP.TEMP}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'last(/Asus Router by Zabbix Agent/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)<{$CPU.TOP.TEMP}-1'
              name: 'CPU High temperature ALERT'
              opdata: '{ITEM.LASTVALUE}'
              priority: HIGH
              description: 'High CPU temperature'
              dependencies:
                - name: 'CPU High temperature'
                  expression: 'last(/Asus Router by Zabbix Agent/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)>={$CPU.HIGH.TEMP}'
                  recovery_expression: 'last(/Asus Router by Zabbix Agent/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)<{$CPU.HIGH.TEMP}-1'
              tags:
                - tag: Temp
                  value: high
        - uuid: 1aef4186cdfb4b2182316a6603f42e79
          name: 'Memory WebUI Free'
          key: 'vm.memory.size[free]'
          delay: 2m
          history: 7d
          units: B
          description: |
            Free memory in Bytes.
            Zabbix agent usually collects RAM information from /proc/meminfo
          tags:
            - tag: System
              value: memory
        - uuid: ff45b751f7164c61be8b91810737fdf9
          name: 'Memory WebUI Used'
          type: CALCULATED
          key: 'vm.memory.size[webui,used]'
          delay: 2m
          history: 7d
          units: B
          params: |
            last(//vm.memory.size[])-
            last(//vm.memory.size[free])
          description: |
            Used memory in Bytes.
            Webui used = Webui total - Webui free
          tags:
            - tag: System
              value: memory
        - uuid: 60f0691f70bc438bbb23e508756c66a4
          name: 'Memory WebUI Total'
          key: 'vm.memory.size[]'
          delay: 1h
          history: 7d
          units: B
          description: |
            Total memory in Bytes displayed in WEB UI.
            AsusWRT WebUI collects RAM information from /proc/meminfo and rounds up the Total amount of RAM to the nearest power of two.
            Check if your router's real total memory is this items value captured by the agent.
            If not, try adjusting in the preprocessing tab.
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var size = [4,8,16,32,64,128,256,512,1024];
                  var memSize = 0;
                  for (var i = 0; i <= 8; i++){
                  	memSize = size[i] * 1024 * 1024
                  	if(memSize > value){
                  		return memSize;
                  		break;
                  	}
                  }
          tags:
            - tag: System
              value: memory
      httptests:
        - uuid: 2bf717f343f14c799e2225342acb86f0
          name: 'WEB UI Scenario'
          delay: 5m
          agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36'
          steps:
            - name: 'WEB UI Main Login'
              url: '{$WEB.PROTOCOL}://{HOST.CONN}:{$WEB.PORT}/'
              retrieve_mode: BOTH
              timeout: 5s
          tags:
            - tag: Service
              value: web
      tags:
        - tag: Agent
          value: passive
        - tag: Router
          value: Asus
      macros:
        - macro: '{$CONMON.QUALITY.WARN}'
          value: '90'
          description: 'Warn value in % for Conmon Line Quality trigger'
        - macro: '{$CPU.HIGH.TEMP}'
          value: '79'
          description: 'High temperature threshold in °C'
        - macro: '{$CPU.TOP.TEMP}'
          value: '82'
          description: 'Higher temperature threshold in °C'
        - macro: '{$DNSNAME}'
          description: 'Desired domain name to query with "net.dns" key'
        - macro: '{$IF.INTERNET}'
          value: ppp0
          description: 'Internet connected interface. Change at host level if it is different for your device'
        - macro: '{$IF.WLTEMP2}'
          value: eth5
          description: '2.4GHz wireless interface for temperature sensor. Check your router''s interface'
        - macro: '{$IF.WLTEMP5}'
          value: eth6
          description: '5GHz wireless interface for temperature sensor. Check your router''s interface'
        - macro: '{$NET.IF.IFNAME.NOT_MATCHES}'
          value: '(^Software Loopback Interface|^NULL[0-9.]*$|^[Ll]o[0-9.]*$|^[Ss]ystem$|^Nu[0-9.]*$|^veth[0-9a-z]+$|docker[0-9]+|br-[a-z0-9]{12}|dpsta|spu_[du]s_dummy|sit0|ifb[0-9]|imq[0-9]|ip6(gre|tnl)0)'
          description: 'This macro is used in linux network discovery. Filters out loopbacks, nulls, docker veth links and docker0 bridge by default'
        - macro: '{$VFS.DEV.DEVNAME.NOT_MATCHES}'
          value: '^(mtdblock[0-9]*|loop[0-9]*|sd[a-z][0-9]+|nbd[0-9]+|sr[0-9]+|fd[0-9]+|dm-[0-9]+|ram[0-9]+|ploop[a-z0-9]+|md[0-9]*|hcp[0-9]*|zram[0-9]*)'
          description: 'This macro is used in block devices discovery. Can be overridden on the host or linked at template level'
        - macro: '{$WEB.PORT}'
          value: '80'
          description: 'Define here your host HTTP/HTTPS port'
        - macro: '{$WEB.PROTOCOL}'
          value: http
          description: 'Web protocol, HTTP or HTTPS, to monitor by TCP'
      valuemaps:
        - uuid: da77ad3731ad4a12b4306061a598a064
          name: 'AdGuard Home Status'
          mappings:
            - value: '1'
              newvalue: Alive
            - value: '0'
              newvalue: Dead
    - uuid: a753ba48a2384cd4aa2e287065eee6f1
      template: 'Asus Router by Zabbix Agent active'
      name: 'Asus Router by Zabbix Agent active'
      description: |
        Asus WRT router template for Merlin firmware with Zabbix Agent active
        
        by diasdm
        https://github.com/diasdmhub/Zabbix_Template_Asus_Merlin
      vendor:
        name: diasdmhub
        version: 6.4-10
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 5aa01d76ed634550be7e9d0f521f8eb6
          name: 'Conmon Jitter'
          type: DEPENDENT
          key: conmon.jitter
          delay: '0'
          history: 30d
          value_type: FLOAT
          units: ms
          description: |
            Jitter time in ms.
            From Asus WRT Merlin "Conmon" script by Jackyaz (https://github.com/jackyaz).
          preprocessing:
            - type: REGEX
              parameters:
                - '(.*),(.*),(.*),(.*),(.*),(.*)'
                - \3
          master_item:
            key: 'vfs.file.contents[/jffs/addons/connmon.d/lastx.csv]'
          tags:
            - tag: Service
              value: conmon
        - uuid: 750a0a1bbfba48b9a5b0de445d8ea3d8
          name: 'Conmon Line Quality'
          type: DEPENDENT
          key: conmon.linequality
          delay: '0'
          history: 30d
          value_type: FLOAT
          units: '%'
          description: |
            Line Quality in %.
            From Asus WRT Merlin "Conmon" script by Jackyaz (https://github.com/jackyaz).
          preprocessing:
            - type: REGEX
              parameters:
                - '(.*),(.*),(.*),(.*),(.*),(.*)'
                - \4
          master_item:
            key: 'vfs.file.contents[/jffs/addons/connmon.d/lastx.csv]'
          tags:
            - tag: Service
              value: conmon
          triggers:
            - uuid: ebbb571aefbb41adbaac93534d3e6e55
              expression: 'avg(/Asus Router by Zabbix Agent active/conmon.linequality,#3)<={$CONMON.QUALITY.WARN}'
              name: 'Conmon reports low line quality'
              opdata: 'Quality: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'Last 3 values average from Conmon''s Line Quality is low.'
              manual_close: 'YES'
              tags:
                - tag: Conmon
                  value: quality
                - tag: Quality
                  value: low
        - uuid: 8651451fa9ad4733ba8e870ec069cc2f
          name: 'Conmon Ping'
          type: DEPENDENT
          key: conmon.ping
          delay: '0'
          history: 30d
          value_type: FLOAT
          units: ms
          description: |
            Ping time in ms.
            From Asus WRT Merlin "Conmon" script by Jackyaz (https://github.com/jackyaz).
          preprocessing:
            - type: REGEX
              parameters:
                - '(.*),(.*),(.*),(.*),(.*),(.*)'
                - \2
          master_item:
            key: 'vfs.file.contents[/jffs/addons/connmon.d/lastx.csv]'
          tags:
            - tag: Service
              value: conmon
          triggers:
            - uuid: 0e9be7e0e68d419b9429e8d127bf8df7
              expression: |
                trendavg(/Asus Router by Zabbix Agent active/conmon.ping,1h:now/h)
                >
                baselinewma(/Asus Router by Zabbix Agent active/conmon.ping,1h:now/h,"d",30) * 2
              name: 'Conmon abnormal Ping rise'
              opdata: 'Ping: {ITEM.LASTVALUE}'
              priority: WARNING
              description: 'Indicates that the previous hour average ping is higher than 2x the last 30d baseline'
              manual_close: 'YES'
              tags:
                - tag: Conmon
                  value: ping
                - tag: Ping
                  value: high
        - uuid: bfcb690adc064518ba377c2310373d20
          name: 'DNS Service IPv6'
          type: ZABBIX_ACTIVE
          key: 'net.dns[,{$DNSNAME},AAAA]'
          delay: 1h
          history: 7d
          tags:
            - tag: Service
              value: dns
          triggers:
            - uuid: 3024548d29a744f28d2ce0e71c1db64d
              expression: 'last(/Asus Router by Zabbix Agent active/net.dns[,{$DNSNAME},AAAA])=0'
              name: 'DNS Service IPv6 down'
              priority: HIGH
              tags:
                - tag: Dns
                  value: ipv6
        - uuid: 992e0134f5744e2fb3f3ec0b81af9363
          name: 'DNS Service IPv4'
          type: ZABBIX_ACTIVE
          key: 'net.dns[,{$DNSNAME},A]'
          delay: 1h
          history: 7d
          tags:
            - tag: Service
              value: dns
          triggers:
            - uuid: 90a57c199b0d4ecb84181ba6b4f1213a
              expression: 'last(/Asus Router by Zabbix Agent active/net.dns[,{$DNSNAME},A],#1)=0'
              name: 'DNS Service IPv4 down'
              priority: HIGH
              tags:
                - tag: Dns
                  value: ipv4
        - uuid: 7b401e9d9999430ba1e98042a6bcc132
          name: 'Web Performance'
          type: SIMPLE
          key: 'net.tcp.service.perf[{$WEB.PROTOCOL},,{$WEB.PORT}]'
          delay: 5m
          history: 7d
          value_type: FLOAT
          units: s
          description: |
            Web service performance check
            The Web UI must be available for the Zabbix Server to reach it
          tags:
            - tag: Service
              value: web
          triggers:
            - uuid: 721c1daee911419a929c5dc6d54f2201
              expression: 'max(/Asus Router by Zabbix Agent active/net.tcp.service.perf[{$WEB.PROTOCOL},,{$WEB.PORT}],#3)=0'
              name: 'Web service is down'
              opdata: '{ITEM.LASTVALUE}'
              url: '{$HTTP.TYPE}://{HOST.DNS}:{$HTTP.STATUS.PORT}'
              priority: HIGH
              description: 'Check the router web UI'
              tags:
                - tag: Web
                  value: down
        - uuid: 63fe1c8edc35497080b2a5e1069b2fc4
          name: 'NTP Performance'
          type: ZABBIX_ACTIVE
          key: 'net.udp.service.perf[ntp]'
          delay: 5m
          history: 1w
          value_type: FLOAT
          units: s
          description: |
            NTP service performance check.
            This is an internal check performed by the agent, therefore, the NTP deamon must reply to localhost requests. Remember to check your NTP server configuration to allow for local requests.
          tags:
            - tag: Service
              value: ntp
          triggers:
            - uuid: d8ce40943d6741b79e9c41e490b5733d
              expression: 'max(/Asus Router by Zabbix Agent active/net.udp.service.perf[ntp],#3)=0'
              name: 'NTP service is down'
              opdata: '{ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'Check NTP service'
              tags:
                - tag: NTP
                  value: down
        - uuid: 4215e159281149388e9c2a9311267ba8
          name: 'NTPMerlin Drift'
          type: DEPENDENT
          key: ntpmerlin.drift
          delay: '0'
          history: 30d
          value_type: FLOAT
          units: ppm
          description: |
            Drift in ppm.
            From Asus WRT Merlin's "NTPMerlin" script by Jackyaz (https://github.com/jackyaz).
          preprocessing:
            - type: REGEX
              parameters:
                - '(.*),(.*),(.*)'
                - \3
          master_item:
            key: 'vfs.file.contents[/opt/share/ntpmerlin.d/lastx.csv]'
          tags:
            - tag: Service
              value: ntpmerlin
        - uuid: 207f515e55a944d9a9813e6fe0f53336
          name: 'NTPMerlin Offset'
          type: DEPENDENT
          key: ntpmerlin.offset
          delay: '0'
          history: 30d
          value_type: FLOAT
          units: ms
          description: |
            Offset time in ms.
            From Asus WRT Merlin's "NTPMerlin" script by Jackyaz (https://github.com/jackyaz).
          preprocessing:
            - type: REGEX
              parameters:
                - '(.*),(.*),(.*)'
                - \2
          master_item:
            key: 'vfs.file.contents[/opt/share/ntpmerlin.d/lastx.csv]'
          tags:
            - tag: Service
              value: ntpmerlin
        - uuid: 2ea42eeaa6304d9eae5565c787153a28
          name: 'System Firmware Version'
          type: DEPENDENT
          key: system.current.version
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'Indicates the devices current firmware version'
          inventory_link: SOFTWARE
          preprocessing:
            - type: REGEX
              parameters:
                - 'buildno=(.*)'
                - \1
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'system.run["nvram show | grep -E ''(^buildno=)|(^productid=)|(^webs_state_flag=)|(^webs_state_info=)''"]'
          tags:
            - tag: System
              value: version
        - uuid: a40b4ba64e5a46ce83107027aad4dac2
          name: 'System Model'
          type: DEPENDENT
          key: system.model
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'Indicates the device model name'
          inventory_link: MODEL
          preprocessing:
            - type: REGEX
              parameters:
                - 'productid=(.*)'
                - \1
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'system.run["nvram show | grep -E ''(^buildno=)|(^productid=)|(^webs_state_flag=)|(^webs_state_info=)''"]'
          tags:
            - tag: System
              value: model
        - uuid: d2a34991fc894cf99cf0cf199483a460
          name: 'System Firmware New Version Info'
          type: DEPENDENT
          key: system.new.version
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'Indicates the devices new firmware version if available'
          preprocessing:
            - type: REGEX
              parameters:
                - 'webs_state_info=(.*)'
                - \1
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'system.run["nvram show | grep -E ''(^buildno=)|(^productid=)|(^webs_state_flag=)|(^webs_state_info=)''"]'
          tags:
            - tag: System
              value: version
        - uuid: 7f21852036f146dc9e02881f0a8a4405
          name: 'System Firmware New Version Flag'
          type: DEPENDENT
          key: system.new.version.flag
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'Indicates the device has a new firmware version available'
          preprocessing:
            - type: REGEX
              parameters:
                - 'webs_state_flag=(.*)'
                - \1
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'system.run["nvram show | grep -E ''(^buildno=)|(^productid=)|(^webs_state_flag=)|(^webs_state_info=)''"]'
          tags:
            - tag: System
              value: version
          triggers:
            - uuid: 22bbb138812743f5b2d4eb18c20ce4a8
              expression: 'last(/Asus Router by Zabbix Agent active/system.new.version.flag,#1)=1'
              name: 'New Firmware Version Available'
              opdata: 'New version: {?last(//system.new.version)}'
              priority: INFO
              description: |
                Indicates that there is a new firmware version available
                The flag remains on until the device is updated
              manual_close: 'YES'
              tags:
                - tag: Version
                  value: new
        - uuid: a893da90f405427eb51f31dcb28fbe78
          name: 'Internet IPv4'
          type: ZABBIX_ACTIVE
          key: 'system.run["ip -4 addr show {$IF.INTERNET} | grep -m 1 inet | awk -F ''[ /]'' ''{print $6}''"]'
          delay: 10m
          history: 7d
          trends: '0'
          value_type: CHAR
          description: |
            Internet IPv4 address retrieved from {$IF.INTERNET} interface.
            If your router uses other internet interface, try changing your interface name at host macro settings.
          tags:
            - tag: System
              value: status
        - uuid: 7b41c692c3ea4ff1955f5c80830ac6d0
          name: 'Internet IPv6'
          type: ZABBIX_ACTIVE
          key: 'system.run["ip -6 addr show {$IF.INTERNET} | grep -m 1 inet | awk -F ''[ /]'' ''{print $6}''"]'
          delay: 10m
          history: 7d
          trends: '0'
          value_type: CHAR
          description: |
            Internet IPv6 address retrieved from {$IF.INTERNET} interface.
            If your router uses other Internet interface, try changing your interface name at host macro settings.
          tags:
            - tag: System
              value: status
        - uuid: 02ab85bab27b4529b79e55552af59eb1
          name: 'System NVRAM'
          type: ZABBIX_ACTIVE
          key: 'system.run["nvram show | grep -E ''(^buildno=)|(^productid=)|(^webs_state_flag=)|(^webs_state_info=)''"]'
          delay: 1d
          history: '0'
          trends: '0'
          value_type: TEXT
          description: 'Gathers firmware version data from the device'
          tags:
            - tag: System
              value: nvram
        - uuid: e535687f0afc4fb285dbf7eb3d4ffb61
          name: 'AdGuard Home Status'
          type: ZABBIX_ACTIVE
          key: 'system.run[/opt/etc/init.d/S99AdGuardHome check]'
          delay: 3m
          history: 7d
          trends: '0'
          description: |
            AdGuard Home status
            1 - Alive
            0 - Dead
          valuemap:
            name: 'AdGuard Home Status'
          preprocessing:
            - type: REGEX
              parameters:
                - alive
                - '1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          tags:
            - tag: Service
              value: adguard
          triggers:
            - uuid: dc27a4efbc51480c9ea4bb09f7d5fffe
              expression: 'last(/Asus Router by Zabbix Agent active/system.run[/opt/etc/init.d/S99AdGuardHome check])<>1'
              name: 'AdGuardHome Status Down'
              priority: HIGH
              description: 'AdGuardHome is not up'
              tags:
                - tag: Adguard
                  value: down
        - uuid: 3fa4dc04e432440eb57b3368c54fd94d
          name: 'Temperature Wireless 2.4GHz'
          type: ZABBIX_ACTIVE
          key: 'system.run[wl -i {$IF.WLTEMP2} phy_tempsense | awk ''{print $1/2+20}'']'
          history: 7d
          value_type: FLOAT
          units: °C
          description: 'Wireless 2.4GHz Temperature'
          tags:
            - tag: System
              value: temperature
          triggers:
            - uuid: 116846fa071348b887268d29b5d5660c
              expression: 'avg(/Asus Router by Zabbix Agent active/system.run[wl -i {$IF.WLTEMP2} phy_tempsense | awk ''{print $1/2+20}''],#3)>=65'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'avg(/Asus Router by Zabbix Agent active/system.run[wl -i {$IF.WLTEMP2} phy_tempsense | awk ''{print $1/2+20}''],#3)<64'
              name: 'Wireless 2.4GHz high temperature'
              opdata: '{ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'The last 3 values average indicate a Wireless 2.4Hz high temperature'
              tags:
                - tag: Temp
                  value: high
        - uuid: 2ca001e52fcd4247b6177d43a15b5110
          name: 'Temperature Wireless 5.0GHz'
          type: ZABBIX_ACTIVE
          key: 'system.run[wl -i {$IF.WLTEMP5} phy_tempsense | awk ''{print $1/2+20}'']'
          history: 7d
          value_type: FLOAT
          units: °C
          description: 'Wireless 5.0GHz Temperature'
          tags:
            - tag: System
              value: temperature
          triggers:
            - uuid: 7bea7a95fc044b3ead6d7f795c89dd30
              expression: 'avg(/Asus Router by Zabbix Agent active/system.run[wl -i {$IF.WLTEMP5} phy_tempsense | awk ''{print $1/2+20}''],#3)>=65'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'avg(/Asus Router by Zabbix Agent active/system.run[wl -i {$IF.WLTEMP5} phy_tempsense | awk ''{print $1/2+20}''],#3)<64'
              name: 'Wireless 5.0Hz high temperature'
              opdata: '{ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'The last 3 values average indicate a Wireless 5.0Hz high temperature'
              tags:
                - tag: Temp
                  value: high
        - uuid: eea58a2ef3b14ea8afa9b097ac1dba13
          name: 'Conmon CSV'
          type: ZABBIX_ACTIVE
          key: 'vfs.file.contents[/jffs/addons/connmon.d/lastx.csv]'
          delay: 2m
          history: '0'
          trends: '0'
          value_type: CHAR
          description: |
            Monitoring from Asus WRT Merlin's "Conmon" script by Jackyaz (https://github.com/jackyaz), if you have installed it.
            Raw CSV data from latest ping test executed by Conmon.
            This item only collects the latest ping test result and saves it as a string.
            Dependent items that process this data.
            It is recommended that you change the update interval at host-level to match your Conmon's scheduled ping test frequency.
            
            Storage location for stats and config:
            If using the JFFS partiton, the key file path is /jffs/addons/connmon.d/lastx.csv
            If using the USB drive, the key file path is /opt/share/connmon.d/lastx.csv
          preprocessing:
            - type: DISCARD_UNCHANGED
              parameters:
                - ''
            - type: REGEX
              parameters:
                - '(.*)'
                - \1
          tags:
            - tag: Service
              value: conmon
        - uuid: 75ff47f3a86b4c618cf0d13f1480ee13
          name: 'NTPMerlin CSV'
          type: ZABBIX_ACTIVE
          key: 'vfs.file.contents[/opt/share/ntpmerlin.d/lastx.csv]'
          delay: 10m
          history: '0'
          trends: '0'
          value_type: CHAR
          description: |
            Monitoring from Asus WRT Merlin's "NTPMerlin" script by Jackyaz (https://github.com/jackyaz), if you have installed it.
            Raw CSV data from latest NTP test executed by NTPMerlin.
            This item only collects the latest NTP result and saves it as a string.
            Dependent items that process this data.
            It is suggested to change your update interval at host level to reflect your NTPMerlin's scheduled test frequency.
            
            Storage location for stats and config:
            If using the JFFS partiton, the key file path is /jffs/addons/ntpmerlin.d/lastx.csv
            If using the USB drive, the key file path is /opt/share/ntpmerlin.d/lastx.csv
          preprocessing:
            - type: DISCARD_UNCHANGED
              parameters:
                - ''
            - type: REGEX
              parameters:
                - '(.*)'
                - \1
          tags:
            - tag: Service
              value: ntpmerlin
        - uuid: a5f2c61693624c469351d21f4b8aea52
          name: 'Temperature CPU'
          type: ZABBIX_ACTIVE
          key: 'vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp]'
          history: 7d
          value_type: FLOAT
          units: °C
          description: 'CPU Temperature'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: System
              value: temperature
          triggers:
            - uuid: ab6a6ec44981457c87da97255bc05b49
              expression: 'last(/Asus Router by Zabbix Agent active/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)>={$CPU.HIGH.TEMP}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'last(/Asus Router by Zabbix Agent active/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)<{$CPU.HIGH.TEMP}-1'
              name: 'CPU High temperature'
              opdata: '{ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'High CPU temperature'
              tags:
                - tag: Temp
                  value: high
            - uuid: 69866916452f4b0099da37711c33183d
              expression: 'last(/Asus Router by Zabbix Agent active/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)>={$CPU.TOP.TEMP}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'last(/Asus Router by Zabbix Agent active/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)<{$CPU.TOP.TEMP}-1'
              name: 'CPU High temperature ALERT'
              opdata: '{ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'High CPU temperature'
              dependencies:
                - name: 'CPU High temperature'
                  expression: 'last(/Asus Router by Zabbix Agent active/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)>={$CPU.HIGH.TEMP}'
                  recovery_expression: 'last(/Asus Router by Zabbix Agent active/vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp],#1)<{$CPU.HIGH.TEMP}-1'
              tags:
                - tag: Temp
                  value: high
        - uuid: 44984c84c0bc4392b630624ffe56108d
          name: 'Memory WebUI Free'
          type: ZABBIX_ACTIVE
          key: 'vm.memory.size[free]'
          delay: 2m
          history: 7d
          units: B
          description: |
            Free memory in Bytes.
            Zabbix agent usually collects RAM information from /proc/meminfo
          tags:
            - tag: System
              value: memory
        - uuid: f908b415bef24a59a371b6685f604f15
          name: 'Memory WebUI Used'
          type: CALCULATED
          key: 'vm.memory.size[webui,used]'
          delay: 2m
          history: 7d
          units: B
          params: |
            last(//vm.memory.size[])-
            last(//vm.memory.size[free])
          description: |
            Used memory in Bytes.
            Webui used = Webui total - Webui free
          tags:
            - tag: System
              value: memory
        - uuid: a56b1fe8fb6642a28ab0da7b3b07ec6a
          name: 'Memory WebUI Total'
          type: ZABBIX_ACTIVE
          key: 'vm.memory.size[]'
          delay: 1h
          history: 7d
          units: B
          description: |
            Total memory in Bytes displayed in WEB UI.
            AsusWRT WebUI collects RAM information from /proc/meminfo and rounds up the Total amount of RAM to the nearest power of two.
            Check if your router's real total memory is this items value captured by the agent.
            If not, try adjusting in the preprocessing tab.
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var size = [4,8,16,32,64,128,256,512,1024];
                  var memSize = 0;
                  for (var i = 0; i <= 8; i++){
                  	memSize = size[i] * 1024 * 1024
                  	if(memSize > value){
                  		return memSize;
                  		break;
                  	}
                  }
          tags:
            - tag: System
              value: memory
      httptests:
        - uuid: bb2303db628b49beb96427d5dd8f3fdf
          name: 'WEB UI Scenario'
          delay: 5m
          agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36'
          steps:
            - name: 'WEB UI HTTPS'
              url: '{$WEB.PROTOCOL}://{HOST.CONN}:{$WEB.PORT}/'
              retrieve_mode: BOTH
              timeout: 5s
          tags:
            - tag: Service
              value: web
      tags:
        - tag: Agent
          value: active
        - tag: Router
          value: Asus
      macros:
        - macro: '{$CONMON.QUALITY.WARN}'
          value: '90'
          description: 'Warn value in % for Conmon Line Quality trigger'
        - macro: '{$CPU.HIGH.TEMP}'
          value: '79'
          description: 'High temperature threshold in °C'
        - macro: '{$CPU.TOP.TEMP}'
          value: '82'
          description: 'Higher temperature threshold in °C'
        - macro: '{$DNSNAME}'
          description: 'Desired domain name to query with "net.dns" key'
        - macro: '{$IF.INTERNET}'
          value: ppp0
          description: 'Internet connected interface. Change at host level if it is different for your device'
        - macro: '{$IF.WLTEMP2}'
          value: eth5
          description: '2.4GHz wireless interface for temperature sensor. Check your router''s interface'
        - macro: '{$IF.WLTEMP5}'
          value: eth6
          description: '5GHz wireless interface for temperature sensor. Check your router''s interface'
        - macro: '{$NET.IF.IFNAME.NOT_MATCHES}'
          value: '(^Software Loopback Interface|^NULL[0-9.]*$|^[Ll]o[0-9.]*$|^[Ss]ystem$|^Nu[0-9.]*$|^veth[0-9a-z]+$|docker[0-9]+|br-[a-z0-9]{12}|dpsta|spu_[du]s_dummy|sit0|ifb[0-9]|imq[0-9]|ip6(gre|tnl)0)'
          description: 'This macro is used in linux network discovery. Filters out loopbacks, nulls, docker veth links and docker0 bridge by default'
        - macro: '{$VFS.DEV.DEVNAME.NOT_MATCHES}'
          value: '^(mtdblock[0-9]*|loop[0-9]*|sd[a-z][0-9]+|nbd[0-9]+|sr[0-9]+|fd[0-9]+|dm-[0-9]+|ram[0-9]+|ploop[a-z0-9]+|md[0-9]*|hcp[0-9]*|zram[0-9]*)'
          description: 'This macro is used in block devices discovery. Can be overridden on the host or linked at template level'
        - macro: '{$WEB.PORT}'
          value: '80'
          description: 'Define here your host HTTP/HTTPS port'
        - macro: '{$WEB.PROTOCOL}'
          value: http
          description: 'Web protocol, HTTP or HTTPS, to monitor by TCP'
      valuemaps:
        - uuid: c9564c9238fd46cf861565893890c3c1
          name: 'AdGuard Home Status'
          mappings:
            - value: '1'
              newvalue: Alive
            - value: '0'
              newvalue: Dead
  graphs:
    - uuid: f3e317eb7bf54e77919e6012d56d5283
      name: 'Conmon Response Time'
      show_triggers: 'NO'
      ymin_type_1: FIXED
      graph_items:
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: 2E1D1A
          item:
            host: 'Asus Router by Zabbix Agent'
            key: conmon.ping
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: F7941D
          item:
            host: 'Asus Router by Zabbix Agent'
            key: conmon.jitter
        - sortorder: '3'
          drawtype: BOLD_LINE
          color: 90A4AE
          yaxisside: RIGHT
          item:
            host: 'Asus Router by Zabbix Agent'
            key: conmon.linequality
    - uuid: 87a938942484491fb5dda678cf07b22e
      name: 'Conmon Response Time'
      show_triggers: 'NO'
      ymin_type_1: FIXED
      graph_items:
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: 2E1D1A
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: conmon.ping
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: F7941D
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: conmon.jitter
        - sortorder: '3'
          drawtype: BOLD_LINE
          color: 90A4AE
          yaxisside: RIGHT
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: conmon.linequality
    - uuid: 51cfee3fe40049f7b0e24ded8b48bace
      name: 'Memory WEBUI'
      ymin_type_1: FIXED
      ymax_type_1: ITEM
      ymax_item_1:
        host: 'Asus Router by Zabbix Agent'
        key: 'vm.memory.size[]'
      graph_items:
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: FB8C00
          item:
            host: 'Asus Router by Zabbix Agent'
            key: 'vm.memory.size[webui,used]'
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: 2774A4
          item:
            host: 'Asus Router by Zabbix Agent'
            key: 'vm.memory.size[free]'
        - sortorder: '3'
          color: FF0000
          item:
            host: 'Asus Router by Zabbix Agent'
            key: 'vm.memory.size[]'
    - uuid: fe0004e0f94345dea27aabaa3d846914
      name: 'Memory WEBUI'
      ymin_type_1: FIXED
      ymax_type_1: ITEM
      ymax_item_1:
        host: 'Asus Router by Zabbix Agent active'
        key: 'vm.memory.size[]'
      graph_items:
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: FB8C00
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: 'vm.memory.size[webui,used]'
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: 2774A4
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: 'vm.memory.size[free]'
        - sortorder: '3'
          color: FF0000
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: 'vm.memory.size[]'
    - uuid: e5f8d985414b493a95b662da1826bdd3
      name: NTPMerlin
      show_triggers: 'NO'
      graph_items:
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: 0D47A1
          yaxisside: RIGHT
          item:
            host: 'Asus Router by Zabbix Agent'
            key: ntpmerlin.drift
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: BF360C
          item:
            host: 'Asus Router by Zabbix Agent'
            key: ntpmerlin.offset
    - uuid: 6377cf1f85df4db5828ea082d069397b
      name: NTPMerlin
      show_triggers: 'NO'
      graph_items:
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: 0D47A1
          yaxisside: RIGHT
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: ntpmerlin.drift
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: BF360C
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: ntpmerlin.offset
    - uuid: a35a4273696c498b89e05a047a978fba
      name: Temperature
      ymin_type_1: FIXED
      graph_items:
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: B71C1C
          item:
            host: 'Asus Router by Zabbix Agent'
            key: 'vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp]'
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: A1887F
          item:
            host: 'Asus Router by Zabbix Agent'
            key: 'system.run[wl -i {$IF.WLTEMP2} phy_tempsense | awk ''{print $1/2+20}'']'
        - sortorder: '3'
          drawtype: BOLD_LINE
          color: 2774A4
          item:
            host: 'Asus Router by Zabbix Agent'
            key: 'system.run[wl -i {$IF.WLTEMP5} phy_tempsense | awk ''{print $1/2+20}'']'
    - uuid: c908963d765f4692877d62c617259bfe
      name: Temperature
      ymin_type_1: FIXED
      graph_items:
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: B71C1C
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: 'vfs.file.contents[/sys/devices/virtual/thermal/thermal_zone0/temp]'
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: A1887F
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: 'system.run[wl -i {$IF.WLTEMP2} phy_tempsense | awk ''{print $1/2+20}'']'
        - sortorder: '3'
          drawtype: BOLD_LINE
          color: 2774A4
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: 'system.run[wl -i {$IF.WLTEMP5} phy_tempsense | awk ''{print $1/2+20}'']'
    - uuid: 8f04d82df77444929df9b72e4b62d61f
      name: 'WEB x NTP Perfomance'
      show_work_period: 'NO'
      ymin_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 0080FF
          item:
            host: 'Asus Router by Zabbix Agent'
            key: 'net.tcp.service.perf[{$WEB.PROTOCOL},,{$WEB.PORT}]'
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: '3E2723'
          item:
            host: 'Asus Router by Zabbix Agent'
            key: 'net.udp.service.perf[ntp]'
    - uuid: 7104bbdf49c74c0db915f8f425edeb95
      name: 'WEB x NTP Perfomance'
      show_work_period: 'NO'
      ymin_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 0080FF
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: 'net.tcp.service.perf[{$WEB.PROTOCOL},,{$WEB.PORT}]'
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: '3E2723'
          item:
            host: 'Asus Router by Zabbix Agent active'
            key: 'net.udp.service.perf[ntp]'
