如何在 Nagios 中的 Nagiosgraph 中设置对数缩放?

How to set logarithmic scaling in Nagiosgraph within Nagios?

我有图表,我有数据,但我需要对数尺度的数据,因为我们要从几十到 20 万个项目,几乎无法识别变化。

我没有看到 where/how 编辑正确的配置文件以使这组 rrd 图达到对数刻度的 运行。

Nagiosgraph 是 rrdgraph 的包装器,反过来使用它自己的配置文件。我发现 rrdopts.conf 可能是进行此更改的最佳位置。只需添加服务名称,并包含 -o 标志(或 --logarithmic)注意其他服务如何定义 rrdgraph 选项。

# rrd options for nagiosgraph
#
# This file contains per-service options for rrdgraph.  The format is
#   service=options
# where the options are standard rrdgraph command-line options.  For example:
#   PING=-X 0
#   Load=-u 105 -l 0
# The options will be applied to each graph matching the indicated service.
# See rrdgraph for details about the options.

# keep the ups plots in reasonable ranges
ups-load=-u 105 -l 0 -r
ups-charge=-u 105 -l 0 -r
ups-temp=-u 45 -l 20 -r
# memory counts are computer K not metric K, and always greater than 0
mem=-l 0 -b 1024
# do alternative autoscaling on the ntp graphs
ntp=-A
# cpu is always [0-100]
cpu=-u 100 -l 0 -r
# My custom check command needs logarithmic scaling -o option
My_Custom_Service_Check_Command=-o