Zabbix Unified Script Monitoring mode

Source: Internet
Author: User

A few weeks of Zabbix after the use of some experience, temporarily recorded here

    1. Simple command monitoring, directly configure the Userparameter parameters, to apply to classify the Conf file, the configuration of different applications written in different conf files, and put it into a unified configuration introduction directory, each modification will be restarted zabbix-agent Configuration file Modification Unified Configuration Method Reference SVN (this way the file check out will overwrite the Linux system file permissions and owners, each update to modify permissions, etc.), use salt in the Salt-master file directory into SVN and after the update with salt cp.get_ File mode is configured on each server (this way does not overwrite permissions and owners).
    2. Script monitoring, the original script corresponding to the configuration of the parameter implementation, but feel this way more complicated. You can extract the parameter commonality and use the Userparameter configuration with parameters to implement the one key for all feature. such as configuration:
      userparameter=script.run[*],/var/lib/zabbix/$1 $2 $3

      The prerequisite is to configure the executable permissions of the script. The way to note the script uniform path, permissions and so on.

    3. It is often encountered in JSON form from HTTP to take monitoring data, which is implemented in the form of intermediate files. There are JSON fetch scripts, as well as JSON content extraction scripts, the different monitoring requirements generally require a separate JSON fetch script, originally extracted from the JSON content is also corresponding to have multiple, now feel the use of unified JSON file attributes to extract the script is more reasonable. The intermediate file is named programmatically, with minimal fixed constants. In addition, the error log is logged in the JSON fetch script.
    4. Zabbix Alarm Information Format personalization, the solution being used is to label the trigger name (using predefined global macros for labels), the labels differentiate between different templates (tags are filtered when the script is used to send messages).
    5. As mentioned above, since the sending of information using a script, it is entirely possible to do the message at the script level of information format to organize the package. This approach is also the next step to refactor the goal.

Zabbix Unified Script Monitoring mode

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.