【问题标题】:User macros in Zabbix trapper name & keyZabbix 陷阱名称和密钥中的用户宏
【发布时间】:2015-01-17 10:24:05
【问题描述】:

我无法在模板化的 zabbix trappers 的名称和密钥中添加用户自定义宏,出现此错误:

Invalid key "nginx_50x_error-{$MACROS}" for item "Nginx: nginx 50x errors on {$MACROS}" on "Template_app_nginx": incorrect syntax near "{$MACROS}".

如何在模板化的 zabbix 陷阱中使用自定义主机宏? Tnx。

【问题讨论】:

  • 任何胶水或一些有用的链接?..

标签: templates macros zabbix


【解决方案1】:

文档:https://www.zabbix.com/documentation/2.4/manual/appendix/macros/supported_by_location

项目键中不允许使用宏;这就是“无效密钥”错误的原因:

nginx_50x_error-{$MACROS}

幸运的是,项目关键参数中允许使用宏(项目关键参数 - 第 7 列) - 这将是您的解决方案:

nginx_50x_error[{$MACROS}]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多