@cryptotaxi247 / netdata-1 / commits / 60a3beeb7

renumbered error codes.

Chris committed Feb 21, 2018 at 16:38 UTC 60a3beeb7027725afa3e7bf58d138b882d4efd68
2 files changed +7 -4
python.d/portcheck.chart.py
+6 -3
@@ -24,9 +24,12 @@ CHARTS = {
24 ]}
25 }
26
27 -CONNECTION_FAILED = 1
28 -CONNECTION_TIMED_OUT = 2
29 -SOCKET_FAILED = 3
27 +# The higher the error code, the "more severe" it is.
28 +# We use steps of 5, which allows future fine-grained error codes, should we need it (fill the blanks where
29 +# appropriate).
30 +CONNECTION_FAILED = 5
31 +CONNECTION_TIMED_OUT = 10
32 +SOCKET_FAILED = 15
33
34 TCP_DIMENSION_CONNECT_PREFIX = 'tcp_connect_'
35 TCP_DIMENSION_ERROR_PREFIX = 'tcp_error_'
web/dashboard_info.js
+1 -1
@@ -1735,7 +1735,7 @@ netdataDashboard.context = {
1735 'portcheck.error': {
1736 valueRange: "[0, 3]",
1737 info: 'The <code>Error</code> is returned by the plugin when it could not connect to the host/port. It is one of: ' +
1738 - '<code>0</code> (connection successful), <code>1</code> (port closed), <code>2</code> (host or port timeout), <code>3</code> (hostname lookup failed). ' +
1738 + '<code>0</code> (connection successful), <code>5</code> (port closed), <code>10</code> (host or port timeout), <code>15</code> (hostname lookup failed). ' +
1739 'The error code is most useful for 3rd-party apps and alarms.'
1740 },
1741