Nagios - 自定义报告生成

发布于 2024-08-27 00:05:57 字数 780 浏览 6 评论 0原文

我想在“Nagios-3.2.0”中生成自定义报告。我在“timeperiods.cfg”中定义了工作时间,如下所示:

'workhours' timeperiodDefinition

Define timeperiod {

timeperiod_name 0800-2000
alias       full time

monday      08:00-20:00
tuesday     08:00-20:00
wednesday   08:00-20:00 
thursday    08:00-20:00
friday      08:00-20:00
saturday    08:00-20:00
}

现在,如果我将“星期六”替换为“2010-03-27”或“3 月 27 日”,如下所示:

'工作时间的时间段定义

定义时间段 {

timeperiod_name 0800-2000
alias       full time

monday      08:00-20:00
tuesday     08:00-20:00
wednesday   08:00-20:00 
thursday    08:00-20:00
friday      08:00-20:00
2010-03-27      08:00-20:00
}

Nagios 未生成给定日期 (2010-03-27) 的报告

如何修改“timeperiods.cfg”以便生成给定日期的报告?

I want to generate a custom report in "Nagios-3.2.0". I have defined the work-hours in "timeperiods.cfg" as follows:

'workhours' timeperiod definition

define timeperiod {

timeperiod_name 0800-2000
alias       full time

monday      08:00-20:00
tuesday     08:00-20:00
wednesday   08:00-20:00 
thursday    08:00-20:00
friday      08:00-20:00
saturday    08:00-20:00
}

Now, if I replace "saturday" with "2010-03-27" or "march 27" as shown below:

'workhours' timeperiod definition

define timeperiod {

timeperiod_name 0800-2000
alias       full time

monday      08:00-20:00
tuesday     08:00-20:00
wednesday   08:00-20:00 
thursday    08:00-20:00
friday      08:00-20:00
2010-03-27      08:00-20:00
}

Nagios is not generating report for the given date (2010-03-27).

How can I modify "timeperiods.cfg" so that I can generate reports for the given dates ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

世界和平 2024-09-03 00:05:58

你评论过这个吗?
http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html# timeperiod

我认为您可能会幸运地尝试其他命名约定。

have you reviewed this?
http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#timeperiod

I think you might have some luck trying other naming conventions.

好倦 2024-09-03 00:05:58

尝试将 timeperiod_name 更改为非数字名称。
例如“八八”

Try changing the timeperiod_name to a non numneric name.
eg "eightoeight"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文