nagios check error reporting is poor

Bug #1783923 reported by Paul Collins
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
InfluxDB Charm
New
Undecided
Unassigned

Bug Description

I just got an alert for "CRITICAL: Exception while attempting to check InfluxDB".

This turned out to be because:

$ sudo -u nagios /usr/local/lib/nagios/plugins/check_influxdb.py
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: getsockopt: connection refused
Please check your connection settings and ensure 'influxd' is running.
CRITICAL: Exception while attempting to check InfluxDB
Traceback (most recent call last):
  File "/usr/local/lib/nagios/plugins/check_influxdb.py", line 29, in <module>
    output = subprocess.check_output(cmd)
  File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['influx', '-execute', 'show diagnostics', '-format', 'json', '-username', 'nagios', '-password', 'REDACTED']' returned non-zero exit status 1
$ _

The check should capture output and include it in its output when a command fails.

Revision history for this message
Paul Collins (pjdc) wrote :

Yes, I've changed the password I leaked in the original description.

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.