Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-8073

Change Ping/SSH templates to use macros

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 6.2.3
    • Templates (T)
    • None

      Hello,

      We've recently started using zabbix and have found some inconsistency's for when a macro vs hardcoded values are used in triggers in the base templates.
      The two we've run across so far are in the ping and ssh templates.
      For examples
      The trigger Unavailable by ICMP ping in the icmp ping template uses the below expression:

      max(/ICMP Ping/icmpping,#3)=0

      The trigger SSH service is down on {HOST.NAME} uses the below express:

      max(/SSH Service/net.tcp.service[ssh],#3)=0

      Now this causes some problems when you want to template out some standard tests like ssh and ping. where all machines must follow the baseline templates values, or they end up with duplicate triggers per host to change the values, or you end up with a nonstandard custom base template.

      If we compare it to the trigger Zabbix agent is not available in the template Linux by Zabbix agent
      The express used is:

      max(/Linux by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0

      Instead of having a hardcoded number of times it fails before alerting it is instead changed to a macro that can be more easily overwritten on a host by host basis without having to duplicate triggers or duplicate templates.

      The proposed changes to the two mentioned triggers above would be:
      Change icmp ping to use a macro i.e.

      max(/ICMP Ping/icmpping,{$PING.TIMEOUT})=0

      With PING.TIMEOUT equaling #3 in the macro

      Change ssh to use a macro i.e.

      max(/SSH Service/net.tcp.service[ssh],{$SSH.TIMEOUT})=0

      With SSH.TIMEOUT equaling #3 in the macro

      This would help keep changes to templates as minimal as possible while allow more flexibility per host without causing duplications in triggers or templates.

            zit Zabbix Integration Team
            weiers Tim Weiers
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: