Add documentation
Chris committed
Feb 20, 2018 at 12:16 UTC
ac73ac540c6f4f3e6dcaeb547db5061ce003ba8e
2 files changed
+46
conf.d/python.d/portcheck.conf
python.d/README.md
+46
@@ -1546,6 +1546,52 @@ Without configuration, module attempts to connect to `http://localhost/status`
1546
1547
---
1548
1549
+# portcheck
1550
+
1551
+Module monitors one or more remote ports per host.
1552
+
1553
+Following charts are drawn per host:
1554
+
1555
+1. **Latency** ms
1556
+ * For each port: TCP socket opening and closing time when connecting.
1557
+ Displays latency in 0.1 ms resolution and 0.1ms will be the minimum.
1558
+ If it is 0.0ms, the connection failed (useful for API)
1559
+
1560
+2. **Error code** int
1561
+ * For each port: One of:
1562
+ - 0: Connection successful
1563
+ - -1: Could not create socket (dns name not resolved?)
1564
+ - -2: Connection refused (port not listening or blocked)
1565
+ - -3: Connection timed out (host unreachable?)
1566
+
1567
+
1568
+### configuration
1569
+
1570
+```yaml
1571
+server:
1572
+ host: 'dns or ip'
1573
+ ports:
1574
+ - 22
1575
+ timeout: 3
1576
+ update_every: 1
1577
+```
1578
+
1579
+`timeout` and `update_every` are optional with default `3` and `netdata-default (=1)`
1580
+ (seconds) respectively.
1581
+
1582
+### notes
1583
+
1584
+ * The error code chart is intended for health check or for access via API.
1585
+ * A system/service/firewall might block netdata's access if a portscan or
1586
+ similar is detected.
1587
+ * Each port check is executed in sequence. E.g. if port 22 times out after 3s and
1588
+ port 80 takes 200ms, the whole check requires 3.2 seconds. You may want
1589
+ to decrease the `timeout` and/or increase `update_every` in order to get
1590
+ regular results (e.g. `'update_every' = 'number-of-ports-to-check' * 'timeout'`
1591
+ will result in regular, though longer intervals.
1592
+
1593
+---
1594
+
1595
# postfix
1596
1597
Simple module executing `postfix -p` to grab postfix queue.