Zabbix Combat-Simple tutorial-macro variable

Source: Internet
Author: User

I. Overview

Zabbix supports many macros that are used in various situations. A macro is a variable that is identified by the following special syntax: macro

Using macros effectively saves you time and makes Zabbix more efficient.

In a typical use, a macro can be used in a template. Therefore, the template's trigger may be named ' {host.name} ' mysql{#MYSQLPORT} port is down, please check! ”。

When this template is applied to the host (the Dragon is in the Sky roledb-192.168.1.100), and when the trigger is displayed on the Monitoring page, the name of the trigger resolves to "the Dragon's mysql3306 port on the day roledb-192.168.1.100 has been down, please pay attention to see!" ”。

Second, the use of scene 1, macro priority
    • Host macro
      • Set up directly on the host
    • The macro that the host template defines, and if there are multiple templates, the higher the precedence of the macro (template).
      • Set up on a template
    • Global macro
2. Examples of use of macros
    • The majority of LLD
      1, for example, when monitoring MySQL multi-instance, we are not sure how many instances of MySQL how many ports, so only through a variable to represent, the macro, it will be the only choice.

    • Used in the host

When we are monitoring the host, different hosts may have different parameters (such as different passwords, ports), then you need to set the macro variable for a single host. Because the macros on the host have the highest precedence.

Third, the supported macros

Zabbix Combat-Simple tutorial-macro variable

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.