Linuxfabrik / monitoring-plugins

220+ check plugins for Icinga and other Nagios-compatible monitoring applications. Each plugin is a standalone command line tool (written in Python) that provides a specific type of check.
https://linuxfabrik.ch
The Unlicense
220 stars 51 forks source link

nginx-status: wrong perfdata #440

Closed NavidSassan closed 2 years ago

NavidSassan commented 3 years ago

In GitLab by @Gninieb on Oct 27, 2021, 18:24

applies to python 2 and 3 script

For the perfdata of nginx_connections_active it must be slit after colon and blank. Schema of Perfdata ist | 'label'=value[UOM];[warn];[crit];[min];[max]

nginx-status2 line 131

tmp, active_connections = result[0].strip().split(':')
tmp, active_connections = result[0].strip().split(': ')

line 155

perfdata += lib.base2.get_perfdata('nginx_connections_active', active_connections, None, None, None, 0, args.CRIT)
perfdata += lib.base2.get_perfdata('nginx_connections_active', active_connections, 'c', args.WARN, args.CRIT, None, None)

I think perfdata schema are the same at in nagios, icinga etc. see Performance Data Metrics Icinga

NavidSassan commented 3 years ago

In GitLab by @markuslf on Oct 27, 2021, 20:11

Here you can find our development guidelines, which are based on those of the Nagios team: https://git.linuxfabrik.ch/linuxfabrik/monitoring-plugins/-/blob/master/CONTRIBUTING.rst

NavidSassan commented 3 years ago

In GitLab by @markuslf on Oct 27, 2021, 20:17

Thanks for your feedback! :thumbsup:

NavidSassan commented 3 years ago

In GitLab by @markuslf on Oct 27, 2021, 20:18

mentioned in commit 10bb4b27a605bbee6420fe284003bea4f78c6fc2

NavidSassan commented 2 years ago

mentioned in commit 269b36c4380ca2ed5a3615b0accdab89136d4dfa