Skip to content

Nagios parser does not support ranges in performance data #4087

Closed
@danielnelson

Description

Bug report

The nagios parser does not support ranges in the performance data. Ranges are
used with the critical and warning fields, there is more detail in this documentation: https://nagios-plugins.org/doc/guidelines.html#AEN200

Relevant telegraf.conf:

[[inputs.exec]]
  commands = ["cat nagios"]
  data_format = "nagios"
$ cat nagios
OK: Load average: 0.00, 0.01, 0.05 | 'load1'=0.00;0:4;0:6;0; 'load5'=0.01;0:3;0:5;0; 'load15'=0.05;0:2;0:4;0;

System info:

Telegraf 1.6.1

Steps to reproduce:

  1. telegraf --input-filter exec --test

Expected behavior:

The range data should be encoded in some form, there are a few options:

Use _lt, _gt, _le, _ge as less than, greater than, less than or equal,
and greater than or equal:

> nagios_state_centreonplugins state=0i 1525116499000000000
> 'load1'_centreonplugins min=0,value=0,warning_lt=0,warning_gt=4,critical_lt=0,critical_gt=6 1525116499000000000
> 'load5'_centreonplugins min=0,value=0.01,warning_lt=0,warning_gt=3,critical_lt=0,critical_gt=5 1525116499000000000
> 'load15'_centreonplugins min=0,value=0.05,warning_lt=0,warning_gt=2,critical_lt=0,critical_gt=4 1525116499000000000

Put the range unaltered as a tag, this could be acceptable if the value changes infrequently and does not need graphed.

> nagios_state_centreonplugins state=0i 1525116499000000000
> 'load1'_centreonplugins,warning=0:4,critical=0:6 min=0,value=0 1525116499000000000
> 'load5'_centreonplugins,warning=0:3,critical=0:5 min=0,value=0.01 1525116499000000000
> 'load15'_centreonplugins,warning=0:2,critical=0:4 min=0,value=0.05 1525116499000000000

Actual behavior:

> nagios_state_centreonplugins state=0i 1525116499000000000
> 'load1'_centreonplugins min=0,value=0 1525116499000000000
> 'load5'_centreonplugins min=0,value=0.01 1525116499000000000
> 'load15'_centreonplugins min=0,value=0.05 1525116499000000000

Metadata

Assignees

No one assigned

    Labels

    bugunexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions