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', 'hieshohdu4Ledoodav']' returned non-zero exit status 1 $ _
The check should capture output and include it in its output when a command fails.
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 localhost: 8086: Get http:// localhost: 8086/ping: dial tcp 127.0.0.1:8086: getsockopt: connection refused lib/nagios/ plugins/ check_influxdb. py", line 29, in <module> check_output( cmd) python3. 4/subprocess. py", line 620, in check_output ror(retcode, process.args, output=output) CalledProcessEr ror: Command '['influx', '-execute', 'show diagnostics', '-format', 'json', '-username', 'nagios', '-password', 'hieshohdu4Ledo odav']' returned non-zero exit status 1
Failed to connect to http://
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/
output = subprocess.
File "/usr/lib/
raise CalledProcessEr
subprocess.
$ _
The check should capture output and include it in its output when a command fails.