【问题标题】:Error of the Zabbiks item when monitoring the ssl aws ALB监控 ssl aws ALB 时 Zabbiks 项的错误
【发布时间】:2020-07-22 07:43:53
【问题描述】:

有必要在 Zabbiks 的帮助下启用 AWS 中 ALB 的 SSL 计数许可证监控。 Zabbiks 无法识别物品

UserParameter = ssl.count, aws elbv2 describe-listener-certificates --listener-arn --profile ******** arn: aws: elasticloadbalancing: eu-central - ******* ****** 1dcfc52e | jq '.Certificates | . []. CertificateArn '| wc -l

zabbix 写

Value of type "string" is not suitable for value type "Numeric (unsigned)".Value "The config profile (****) could not be found0"

如果我将信息类型更改为文本,那么除了触发器之外一切正常,它应该返回 ALB 中有多少 SSL 许可证, zabbix_agentd -t ssl.count command ssl.count [t | 26] 的输出在控制台上一切正常,所有凭据都很好。

在宏中声明的zabbix中的ABL {$ HOST.NAME} main-devs - *******. Eu-central-1.elb.amazonaws.com

告诉我谁遇到了,会是什么?

【问题讨论】:

  • 这很奇怪:Value "The config profile (****) could not be found0"。您是否设置了没有| wc -l 的项目,然后在几分钟后添加了它?这可以解释为什么 zabbix_agentd -t 测试工作正常并返回 26
  • @SimoneZabberoni 不是在最后,我是一次性全部添加的

标签: amazon-web-services ssl zabbix


【解决方案1】:

问题在于您没有重定向标准错误,并且您的输出不是数字。由于它不是数字,因此在数字项中无效。

例子:

$ ls -l temp.sh nonexisting.sh
ls: cannot access nonexisting.sh: No such file or directory
-rw-r--r-- 1 myuser domain users 14918 Oct 15  2019 temp.sh

$ ls -l temp.sh nonexisting.sh | wc -l
ls: cannot access nonexisting.sh: No such file or directory
1

$ ls -l temp.sh nonexisting.sh 2>/dev/null | wc -l
1

使用您的代码:

UserParameter = ssl.count, aws elbv2 describe-listener-certificates --listener-arn --profile ******** arn: aws: elasticloadbalancing: eu-central - ******* ****** 1dcfc52e 2>/dev/null | jq '.Certificates | . []. CertificateArn '| wc -l

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-09-06
    • 2021-05-29
    • 2019-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-03
    • 1970-01-01
    相关资源
    最近更新 更多