简体   繁体   English

Munin-如何从插件返回未知值

[英]Munin - how to return unknown value from plugin

I want my munin plugin to report unknown values if the value can't be reported. 我希望我的munin插件能够报告未知值(如果无法报告该值)。 What do I have to return? 我要退还什么?

  • "nan" “南”
  • "-nan" “ -nan”
  • nothing at all, just skip returning a value 什么都没有,只是跳过返回值
  • "unknown" “未知”
  • ...? ...?

Nothing works for me. 什么都不适合我。

Background: ntp_offset plugin fails if ntp is not running at all. 背景:如果ntp根本没有运行,则ntp_offset插件将失败。 I want to return unknown value and send an alert message. 我想返回未知值并发送警报消息。

I think the correct value to return is "U". 我认为要返回的正确值是“ U”。

This is briefly mentioned without explanation in the documentation: 简要提到了这一点,但没有在文档中进行解释:

http://munin.readthedocs.org/en/latest/reference/plugin.html#plugin-reference http://munin.readthedocs.org/en/latest/reference/plugin.html#plugin-reference

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM