fix links in go.d.plugin (#17108)
Ilya Mashchenko committed
Mar 5, 2024 at 17:37 UTC
f517f5a2820e35e90ecae6b8ae9f0a251061f1cb
17 files changed
+149
-133
src/go/collectors/go.d.plugin/README.md
+88
-88
@@ -1,7 +1,7 @@
1
<!--
2
title: go.d.plugin
3
description: "go.d.plugin is an external plugin for Netdata, responsible for running individual data collectors written in Go."
4
-custom_edit_url: https://github.com/netdata/go.d.plugin/edit/master/README.md
4
+custom_edit_url: "https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/README.md"
5
sidebar_label: "go.d.plugin"
6
learn_status: "Published"
7
learn_topic_type: "Tasks"
@@ -17,8 +17,8 @@ collection modules written in `go`.
17
1. It runs as an independent process (`ps fax` shows it).
18
2. It is started and stopped automatically by Netdata.
19
3. It communicates with Netdata via a unidirectional pipe (sending data to the Netdata daemon).
20
-4. Supports any number of data collection [modules](https://github.com/netdata/go.d.plugin/tree/master/modules).
21
-5. Allows each [module](https://github.com/netdata/go.d.plugin/tree/master/modules) to have any number of data
20
+4. Supports any number of data collection [modules](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules).
21
+5. Allows each [module](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules) to have any number of data
22
collection jobs.
23
24
## Bug reports, feature requests, and questions
@@ -40,94 +40,94 @@ the [official installation method](https://github.com/netdata/netdata/blob/maste
40
No further action required. If you have used a different installation method and need to set the capabilities manually,
41
see the appropriate collector readme.
42
43
-| Capability | Required by |
44
-|:--------------------|:----------------------------------------------------------------------------------------:|
45
-| CAP_NET_RAW | [Ping](https://github.com/netdata/go.d.plugin/tree/master/modules/ping#readme) |
46
-| CAP_NET_ADMIN | [Wireguard](https://github.com/netdata/go.d.plugin/tree/master/modules/wireguard#readme) |
47
-| CAP_DAC_READ_SEARCH | [Filecheck](https://github.com/netdata/go.d.plugin/tree/master/modules/filecheck#readme) |
43
+| Capability | Required by |
44
+|:--------------------|:------------------------------------------------------------------------------------------------------------------:|
45
+| CAP_NET_RAW | [Ping](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/ping#readme) |
46
+| CAP_NET_ADMIN | [Wireguard](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/wireguard#readme) |
47
+| CAP_DAC_READ_SEARCH | [Filecheck](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/filecheck#readme) |
48
49
## Available modules
50
51
-| Name | Monitors |
52
-|:----------------------------------------------------------------------------------------------------|:-----------------------------:|
53
-| [activemq](https://github.com/netdata/go.d.plugin/tree/master/modules/activemq) | ActiveMQ |
54
-| [apache](https://github.com/netdata/go.d.plugin/tree/master/modules/apache) | Apache |
55
-| [bind](https://github.com/netdata/go.d.plugin/tree/master/modules/bind) | ISC Bind |
56
-| [cassandra](https://github.com/netdata/go.d.plugin/tree/master/modules/cassandra) | Cassandra |
57
-| [chrony](https://github.com/netdata/go.d.plugin/tree/master/modules/chrony) | Chrony |
58
-| [cockroachdb](https://github.com/netdata/go.d.plugin/tree/master/modules/cockroachdb) | CockroachDB |
59
-| [consul](https://github.com/netdata/go.d.plugin/tree/master/modules/consul) | Consul |
60
-| [coredns](https://github.com/netdata/go.d.plugin/tree/master/modules/coredns) | CoreDNS |
61
-| [couchbase](https://github.com/netdata/go.d.plugin/tree/master/modules/couchbase) | Couchbase |
62
-| [couchdb](https://github.com/netdata/go.d.plugin/tree/master/modules/couchdb) | CouchDB |
63
-| [dnsdist](https://github.com/netdata/go.d.plugin/tree/master/modules/dnsdist) | Dnsdist |
64
-| [dnsmasq](https://github.com/netdata/go.d.plugin/tree/master/modules/dnsmasq) | Dnsmasq DNS Forwarder |
65
-| [dnsmasq_dhcp](https://github.com/netdata/go.d.plugin/tree/master/modules/dnsmasq_dhcp) | Dnsmasq DHCP |
66
-| [dns_query](https://github.com/netdata/go.d.plugin/tree/master/modules/dnsquery) | DNS Query RTT |
67
-| [docker](https://github.com/netdata/go.d.plugin/tree/master/modules/docker) | Docker Engine |
68
-| [docker_engine](https://github.com/netdata/go.d.plugin/tree/master/modules/docker_engine) | Docker Engine |
69
-| [dockerhub](https://github.com/netdata/go.d.plugin/tree/master/modules/dockerhub) | Docker Hub |
70
-| [elasticsearch](https://github.com/netdata/go.d.plugin/tree/master/modules/elasticsearch) | Elasticsearch/OpenSearch |
71
-| [energid](https://github.com/netdata/go.d.plugin/tree/master/modules/energid) | Energi Core |
72
-| [envoy](https://github.com/netdata/go.d.plugin/tree/master/modules/envoy) | Envoy |
73
-| [example](https://github.com/netdata/go.d.plugin/tree/master/modules/example) | - |
74
-| [filecheck](https://github.com/netdata/go.d.plugin/tree/master/modules/filecheck) | Files and Directories |
75
-| [fluentd](https://github.com/netdata/go.d.plugin/tree/master/modules/fluentd) | Fluentd |
76
-| [freeradius](https://github.com/netdata/go.d.plugin/tree/master/modules/freeradius) | FreeRADIUS |
77
-| [haproxy](https://github.com/netdata/go.d.plugin/tree/master/modules/haproxy) | HAProxy |
78
-| [hdfs](https://github.com/netdata/go.d.plugin/tree/master/modules/hdfs) | HDFS |
79
-| [httpcheck](https://github.com/netdata/go.d.plugin/tree/master/modules/httpcheck) | Any HTTP Endpoint |
80
-| [isc_dhcpd](https://github.com/netdata/go.d.plugin/tree/master/modules/isc_dhcpd) | ISC DHCP |
81
-| [k8s_kubelet](https://github.com/netdata/go.d.plugin/tree/master/modules/k8s_kubelet) | Kubelet |
82
-| [k8s_kubeproxy](https://github.com/netdata/go.d.plugin/tree/master/modules/k8s_kubeproxy) | Kube-proxy |
83
-| [k8s_state](https://github.com/netdata/go.d.plugin/tree/master/modules/k8s_state) | Kubernetes cluster state |
84
-| [lighttpd](https://github.com/netdata/go.d.plugin/tree/master/modules/lighttpd) | Lighttpd |
85
-| [logind](https://github.com/netdata/go.d.plugin/tree/master/modules/logind) | systemd-logind |
86
-| [logstash](https://github.com/netdata/go.d.plugin/tree/master/modules/logstash) | Logstash |
87
-| [mongoDB](https://github.com/netdata/go.d.plugin/tree/master/modules/mongodb) | MongoDB |
88
-| [mysql](https://github.com/netdata/go.d.plugin/tree/master/modules/mysql) | MySQL |
89
-| [nginx](https://github.com/netdata/go.d.plugin/tree/master/modules/nginx) | NGINX |
90
-| [nginxplus](https://github.com/netdata/go.d.plugin/tree/master/modules/nginxplus) | NGINX Plus |
91
-| [nginxvts](https://github.com/netdata/go.d.plugin/tree/master/modules/nginxvts) | NGINX VTS |
92
-| [ntpd](https://github.com/netdata/go.d.plugin/tree/master/modules/ntpd) | NTP daemon |
93
-| [nvme](https://github.com/netdata/go.d.plugin/tree/master/modules/nvme) | NVMe devices |
94
-| [openvpn](https://github.com/netdata/go.d.plugin/tree/master/modules/openvpn) | OpenVPN |
95
-| [openvpn_status_log](https://github.com/netdata/go.d.plugin/tree/master/modules/openvpn_status_log) | OpenVPN |
96
-| [pgbouncer](https://github.com/netdata/go.d.plugin/tree/master/modules/pgbouncer) | PgBouncer |
97
-| [phpdaemon](https://github.com/netdata/go.d.plugin/tree/master/modules/phpdaemon) | phpDaemon |
98
-| [phpfpm](https://github.com/netdata/go.d.plugin/tree/master/modules/phpfpm) | PHP-FPM |
99
-| [pihole](https://github.com/netdata/go.d.plugin/tree/master/modules/pihole) | Pi-hole |
100
-| [pika](https://github.com/netdata/go.d.plugin/tree/master/modules/pika) | Pika |
101
-| [ping](https://github.com/netdata/go.d.plugin/tree/master/modules/ping) | Any network host |
102
-| [prometheus](https://github.com/netdata/go.d.plugin/tree/master/modules/prometheus) | Any Prometheus Endpoint |
103
-| [portcheck](https://github.com/netdata/go.d.plugin/tree/master/modules/portcheck) | Any TCP Endpoint |
104
-| [postgres](https://github.com/netdata/go.d.plugin/tree/master/modules/postgres) | PostgreSQL |
105
-| [powerdns](https://github.com/netdata/go.d.plugin/tree/master/modules/powerdns) | PowerDNS Authoritative Server |
106
-| [powerdns_recursor](https://github.com/netdata/go.d.plugin/tree/master/modules/powerdns_recursor) | PowerDNS Recursor |
107
-| [proxysql](https://github.com/netdata/go.d.plugin/tree/master/modules/proxysql) | ProxySQL |
108
-| [pulsar](https://github.com/netdata/go.d.plugin/tree/master/modules/portcheck) | Apache Pulsar |
109
-| [rabbitmq](https://github.com/netdata/go.d.plugin/tree/master/modules/rabbitmq) | RabbitMQ |
110
-| [redis](https://github.com/netdata/go.d.plugin/tree/master/modules/redis) | Redis |
111
-| [scaleio](https://github.com/netdata/go.d.plugin/tree/master/modules/scaleio) | Dell EMC ScaleIO |
51
+| Name | Monitors |
52
+|:------------------------------------------------------------------------------------------------------------------------------|:-----------------------------:|
53
+| [activemq](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/activemq) | ActiveMQ |
54
+| [apache](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/apache) | Apache |
55
+| [bind](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/bind) | ISC Bind |
56
+| [cassandra](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/cassandra) | Cassandra |
57
+| [chrony](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/chrony) | Chrony |
58
+| [cockroachdb](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/cockroachdb) | CockroachDB |
59
+| [consul](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/consul) | Consul |
60
+| [coredns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/coredns) | CoreDNS |
61
+| [couchbase](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/couchbase) | Couchbase |
62
+| [couchdb](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/couchdb) | CouchDB |
63
+| [dnsdist](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dnsdist) | Dnsdist |
64
+| [dnsmasq](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dnsmasq) | Dnsmasq DNS Forwarder |
65
+| [dnsmasq_dhcp](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp) | Dnsmasq DHCP |
66
+| [dns_query](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dnsquery) | DNS Query RTT |
67
+| [docker](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/docker) | Docker Engine |
68
+| [docker_engine](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/docker_engine) | Docker Engine |
69
+| [dockerhub](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dockerhub) | Docker Hub |
70
+| [elasticsearch](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/elasticsearch) | Elasticsearch/OpenSearch |
71
+| [energid](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/energid) | Energi Core |
72
+| [envoy](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/envoy) | Envoy |
73
+| [example](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/example) | - |
74
+| [filecheck](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/filecheck) | Files and Directories |
75
+| [fluentd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/fluentd) | Fluentd |
76
+| [freeradius](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/freeradius) | FreeRADIUS |
77
+| [haproxy](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/haproxy) | HAProxy |
78
+| [hdfs](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/hdfs) | HDFS |
79
+| [httpcheck](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/httpcheck) | Any HTTP Endpoint |
80
+| [isc_dhcpd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/isc_dhcpd) | ISC DHCP |
81
+| [k8s_kubelet](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/k8s_kubelet) | Kubelet |
82
+| [k8s_kubeproxy](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/k8s_kubeproxy) | Kube-proxy |
83
+| [k8s_state](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/k8s_state) | Kubernetes cluster state |
84
+| [lighttpd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/lighttpd) | Lighttpd |
85
+| [logind](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/logind) | systemd-logind |
86
+| [logstash](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/logstash) | Logstash |
87
+| [mongoDB](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/mongodb) | MongoDB |
88
+| [mysql](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/mysql) | MySQL |
89
+| [nginx](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/nginx) | NGINX |
90
+| [nginxplus](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/nginxplus) | NGINX Plus |
91
+| [nginxvts](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/nginxvts) | NGINX VTS |
92
+| [ntpd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/ntpd) | NTP daemon |
93
+| [nvme](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/nvme) | NVMe devices |
94
+| [openvpn](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/openvpn) | OpenVPN |
95
+| [openvpn_status_log](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/openvpn_status_log) | OpenVPN |
96
+| [pgbouncer](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/pgbouncer) | PgBouncer |
97
+| [phpdaemon](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/phpdaemon) | phpDaemon |
98
+| [phpfpm](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/phpfpm) | PHP-FPM |
99
+| [pihole](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/pihole) | Pi-hole |
100
+| [pika](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/pika) | Pika |
101
+| [ping](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/ping) | Any network host |
102
+| [prometheus](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/prometheus) | Any Prometheus Endpoint |
103
+| [portcheck](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/portcheck) | Any TCP Endpoint |
104
+| [postgres](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/postgres) | PostgreSQL |
105
+| [powerdns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/powerdns) | PowerDNS Authoritative Server |
106
+| [powerdns_recursor](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/powerdns_recursor) | PowerDNS Recursor |
107
+| [proxysql](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/proxysql) | ProxySQL |
108
+| [pulsar](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/portcheck) | Apache Pulsar |
109
+| [rabbitmq](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/rabbitmq) | RabbitMQ |
110
+| [redis](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/redis) | Redis |
111
+| [scaleio](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/scaleio) | Dell EMC ScaleIO |
112
| [SNMP](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/snmp) | SNMP |
113
-| [solr](https://github.com/netdata/go.d.plugin/tree/master/modules/solr) | Solr |
114
-| [squidlog](https://github.com/netdata/go.d.plugin/tree/master/modules/squidlog) | Squid |
115
-| [springboot2](https://github.com/netdata/go.d.plugin/tree/master/modules/springboot2) | Spring Boot2 |
116
-| [supervisord](https://github.com/netdata/go.d.plugin/tree/master/modules/supervisord) | Supervisor |
117
-| [systemdunits](https://github.com/netdata/go.d.plugin/tree/master/modules/systemdunits) | Systemd unit state |
118
-| [tengine](https://github.com/netdata/go.d.plugin/tree/master/modules/tengine) | Tengine |
119
-| [traefik](https://github.com/netdata/go.d.plugin/tree/master/modules/traefik) | Traefik |
120
-| [upsd](https://github.com/netdata/go.d.plugin/tree/master/modules/upsd) | UPSd (Nut) |
121
-| [unbound](https://github.com/netdata/go.d.plugin/tree/master/modules/unbound) | Unbound |
122
-| [vcsa](https://github.com/netdata/go.d.plugin/tree/master/modules/vcsa) | vCenter Server Appliance |
123
-| [vernemq](https://github.com/netdata/go.d.plugin/tree/master/modules/vernemq) | VerneMQ |
124
-| [vsphere](https://github.com/netdata/go.d.plugin/tree/master/modules/vsphere) | VMware vCenter Server |
125
-| [web_log](https://github.com/netdata/go.d.plugin/tree/master/modules/weblog) | Apache/NGINX |
126
-| [wireguard](https://github.com/netdata/go.d.plugin/tree/master/modules/wireguard) | WireGuard |
127
-| [whoisquery](https://github.com/netdata/go.d.plugin/tree/master/modules/whoisquery) | Domain Expiry |
128
-| [windows](https://github.com/netdata/go.d.plugin/tree/master/modules/windows) | Windows |
129
-| [x509check](https://github.com/netdata/go.d.plugin/tree/master/modules/x509check) | Digital Certificates |
130
-| [zookeeper](https://github.com/netdata/go.d.plugin/tree/master/modules/zookeeper) | ZooKeeper |
113
+| [solr](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/solr) | Solr |
114
+| [squidlog](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/squidlog) | Squid |
115
+| [springboot2](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/springboot2) | Spring Boot2 |
116
+| [supervisord](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/supervisord) | Supervisor |
117
+| [systemdunits](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/systemdunits) | Systemd unit state |
118
+| [tengine](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/tengine) | Tengine |
119
+| [traefik](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/traefik) | Traefik |
120
+| [upsd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/upsd) | UPSd (Nut) |
121
+| [unbound](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/unbound) | Unbound |
122
+| [vcsa](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/vcsa) | vCenter Server Appliance |
123
+| [vernemq](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/vernemq) | VerneMQ |
124
+| [vsphere](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/vsphere) | VMware vCenter Server |
125
+| [web_log](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/weblog) | Apache/NGINX |
126
+| [wireguard](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/wireguard) | WireGuard |
127
+| [whoisquery](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/whoisquery) | Domain Expiry |
128
+| [windows](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/windows) | Windows |
129
+| [x509check](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/x509check) | Digital Certificates |
130
+| [zookeeper](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/zookeeper) | ZooKeeper |
131
132
## Configuration
133
@@ -143,7 +143,7 @@ sudo ./edit-config go.d.conf
143
Configurations are written in [YAML](http://yaml.org/).
144
145
- [plugin configuration](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/config/go.d.conf)
146
-- [specific module configuration](https://github.com/netdata/go.d.plugin/tree/master/config/go.d)
146
+- [specific module configuration](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/config/go.d)
147
148
### Enable a collector
149
src/go/collectors/go.d.plugin/docs/how-to-write-a-module.md
+39
-23
@@ -1,7 +1,7 @@
1
<!--
2
title: "How to write a Netdata collector in Go"
3
description: "This guide will walk you through the technical implementation of writing a new Netdata collector in Golang, with tips on interfaces, structure, configuration files, and more."
4
-custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/docs/how-to-write-a-module.md"
4
+custom_edit_url: "https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/docs/how-to-write-a-module.md"
5
sidebar_label: "How to write a Netdata collector in Go"
6
learn_status: "Published"
7
learn_topic_type: "Tasks"
@@ -20,25 +20,30 @@ sidebar_position: 20
20
locally the **forked** repository (e.g `git clone https://github.com/odyslam/go.d.plugin`).
21
- Using a terminal, `cd` into the directory (e.g `cd go.d.plugin`)
22
23
-
23
## Write and test a simple collector
24
26
-> :exclamation: You can skip most of these steps if you first experiment directy with the existing
27
-> [example module](https://github.com/netdata/go.d.plugin/tree/master/modules/example), which will
28
-> give you an idea of how things work.
25
+> :exclamation: You can skip most of these steps if you first experiment directy with the existing
26
+> [example module](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/example), which
27
+> will
28
+> give you an idea of how things work.
29
30
Let's assume you want to write a collector named `example2`.
31
32
The steps are:
33
34
-- Add the source code to [`modules/example2/`](https://github.com/netdata/go.d.plugin/tree/master/modules).
34
+- Add the source code
35
+ to [`modules/example2/`](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules).
36
- [module interface](#module-interface).
37
- [suggested module layout](#module-layout).
38
- [helper packages](#helper-packages).
38
-- Add the configuration to [`config/go.d/example2.conf`](https://github.com/netdata/go.d.plugin/tree/master/config/go.d).
39
-- Add the module to [`config/go.d.conf`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/config/go.d.conf).
40
-- Import the module in [`modules/init.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/init.go).
41
-- Update the [`available modules list`](https://github.com/netdata/go.d.plugin#available-modules).
39
+- Add the configuration
40
+ to [`config/go.d/example2.conf`](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/config/go.d).
41
+- Add the module
42
+ to [`config/go.d.conf`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/config/go.d.conf).
43
+- Import the module
44
+ in [`modules/init.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/init.go).
45
+- Update
46
+ the [`available modules list`](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin#available-modules).
47
- To build it, run `make` from the plugin root dir. This will create a new `go.d.plugin` binary that includes your newly
48
developed collector. It will be placed into the `bin` directory (e.g `go.d.plugin/bin`)
49
- Run it in the debug mode `bin/godplugin -d -m <MODULE_NAME>`. This will output the `STDOUT` of the collector, the same
@@ -46,12 +51,12 @@ The steps are:
51
our [documentation](https://github.com/netdata/netdata/blob/master/src/collectors/plugins.d/README.md#external-plugins-api).
52
- If you want to test the collector with the actual Netdata Agent, you need to replace the `go.d.plugin` binary that
53
exists in the Netdata Agent installation directory with the one you just compiled. Once
49
- you [restart](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#maintaining-a-netdata-agent-installation) the Netdata Agent, it will detect and run
54
+ you [restart](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#maintaining-a-netdata-agent-installation)
55
+ the Netdata Agent, it will detect and run
56
it, creating all the charts. It is advised not to remove the default `go.d.plugin` binary, but simply rename it
57
to `go.d.plugin.old` so that the Agent doesn't run it, but you can easily rename it back once you are done.
58
- Run `make clean` when you are done with testing.
59
54
-
60
## Module Interface
61
62
Every module should implement the following interface:
@@ -116,13 +121,16 @@ func (e *Example) Check() bool {
121
122
### Charts method
123
119
-:exclamation: Netdata module produces [`charts`](https://github.com/netdata/netdata/blob/master/src/collectors/plugins.d/README.md#chart), not
124
+:exclamation: Netdata module
125
+produces [`charts`](https://github.com/netdata/netdata/blob/master/src/collectors/plugins.d/README.md#chart), not
126
raw metrics.
127
122
-Use [`agent/module`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/agent/module/charts.go) package to create them,
128
+Use [`agent/module`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/agent/module/charts.go)
129
+package to create them,
130
it contains charts and dimensions structs.
131
125
-- `Charts` returns the [charts](https://github.com/netdata/netdata/blob/master/src/collectors/plugins.d/README.md#chart) (`*module.Charts`).
132
+- `Charts` returns
133
+ the [charts](https://github.com/netdata/netdata/blob/master/src/collectors/plugins.d/README.md#chart) (`*module.Charts`).
134
- Called after `Check` and only if `Check` returned `true`.
135
- If it returns `nil`, the job will be disabled
136
- :warning: Make sure not to share returned value between module instances (jobs).
@@ -196,7 +204,8 @@ Suggested minimal layout:
204
205
### File `module_name.go`
206
199
-> :exclamation: See the example [`example.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/example/example.go).
207
+> :exclamation: See the
208
+> example [`example.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/example/example.go).
209
210
Don't overload this file with the implementation details.
211
@@ -208,13 +217,15 @@ Usually it contains only:
217
218
### File `charts.go`
219
211
-> :exclamation: See the example: [`charts.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/example/charts.go).
220
+> :exclamation: See the
221
+> example: [`charts.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/example/charts.go).
222
223
Put charts, charts templates and charts constructor functions in this file.
224
225
### File `init.go`
226
217
-> :exclamation: See the example: [`init.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/example/init.go).
227
+> :exclamation: See the
228
+> example: [`init.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/example/init.go).
229
230
All the module initialization details should go in this file.
231
@@ -240,7 +251,8 @@ func (e *Example) initSomeValue() error {
251
252
### File `collect.go`
253
243
-> :exclamation: See the example: [`collect.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/example/collect.go).
254
+> :exclamation: See the
255
+> example: [`collect.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/example/collect.go).
256
257
This file is the entry point for the metrics collection.
258
@@ -262,11 +274,14 @@ func (e *Example) collect() (map[string]int64, error) {
274
275
### File `module_name_test.go`
276
265
-> :exclamation: See the example: [`example_test.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/example/example_test.go).
277
+> :exclamation: See the
278
+> example: [`example_test.go`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/example/example_test.go).
279
267
-> if you have no experience in testing we recommend starting with [testing package documentation](https://golang.org/pkg/testing/).
280
+> if you have no experience in testing we recommend starting
281
+> with [testing package documentation](https://golang.org/pkg/testing/).
282
269
-> we use `assert` and `require` packages from [github.com/stretchr/testify](https://github.com/stretchr/testify) library,
283
+> we use `assert` and `require` packages from [github.com/stretchr/testify](https://github.com/stretchr/testify)
284
+> library,
285
> check [their documentation](https://pkg.go.dev/github.com/stretchr/testify).
286
287
Testing is mandatory.
@@ -285,5 +300,6 @@ be [`testdata`](https://golang.org/cmd/go/#hdr-Package_lists_and_patterns).
300
301
## Helper packages
302
288
-There are [some helper packages](https://github.com/netdata/go.d.plugin/tree/master/pkg) for writing a module.
303
+There are [some helper packages](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg) for
304
+writing a module.
305
src/go/collectors/go.d.plugin/modules/coredns/metadata.yaml
+2
-2
@@ -70,7 +70,7 @@ modules:
70
detailed_description: |
71
Metrics of servers matching the selector will be collected.
72
- Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4)
73
- - Pattern syntax: [matcher](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format).
73
+ - Pattern syntax: [matcher](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#supported-format).
74
- Syntax:
75
76
```yaml
@@ -89,7 +89,7 @@ modules:
89
detailed_description: |
90
Metrics of zones matching the selector will be collected.
91
- Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4)
92
- - Pattern syntax: [matcher](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format).
92
+ - Pattern syntax: [matcher](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#supported-format).
93
- Syntax:
94
95
```yaml
src/go/collectors/go.d.plugin/modules/httpcheck/metadata.yaml
+2
-2
@@ -82,7 +82,7 @@ modules:
82
default_value: ""
83
required: true
84
- name: headers_match.value
85
- description: "The [pattern](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format) to match against the value of the specified header."
85
+ description: "The [pattern](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#supported-format) to match against the value of the specified header."
86
default_value: ""
87
required: false
88
- name: cookie_file
@@ -176,7 +176,7 @@ modules:
176
- 200
177
- 204
178
- name: With `header_match`
179
- description: Example configurations with `header_match`. See the value [pattern](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format) syntax.
179
+ description: Example configurations with `header_match`. See the value [pattern](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#supported-format) syntax.
180
config: |
181
jobs:
182
# The "X-Robots-Tag" header must be present in the HTTP response header,
src/go/collectors/go.d.plugin/modules/isc_dhcpd/metadata.yaml
+1
-1
@@ -69,7 +69,7 @@ modules:
69
detailed_description: |
70
List of IP pools to monitor.
71
72
- - IP range syntax: see [supported formats](https://github.com/netdata/go.d.plugin/tree/master/pkg/iprange#supported-formats).
72
+ - IP range syntax: see [supported formats](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/iprange#supported-formats).
73
- Syntax:
74
75
```yaml
src/go/collectors/go.d.plugin/modules/mongodb/metadata.yaml
+1
-1
@@ -104,7 +104,7 @@ modules:
104
Metrics of databases matching the selector will be collected.
105
106
- Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4)
107
- - Pattern syntax: [matcher](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format).
107
+ - Pattern syntax: [matcher](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#supported-format).
108
- Syntax:
109
110
```yaml
src/go/collectors/go.d.plugin/modules/openvpn/metadata.yaml
+1
-1
@@ -84,7 +84,7 @@ modules:
84
Metrics of users matching the selector will be collected.
85
86
- Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4)
87
- - Pattern syntax: [matcher](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format).
87
+ - Pattern syntax: [matcher](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#supported-format).
88
- Syntax:
89
90
```yaml
src/go/collectors/go.d.plugin/modules/openvpn_status_log/metadata.yaml
+1
-1
@@ -71,7 +71,7 @@ modules:
71
details: |
72
Metrics of users matching the selector will be collected.
73
- Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4)
74
- - Pattern syntax: [matcher](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format).
74
+ - Pattern syntax: [matcher](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#supported-format).
75
- Syntax:
76
```yaml
77
per_user_stats:
src/go/collectors/go.d.plugin/modules/postgres/metadata.yaml
+1
-1
@@ -98,7 +98,7 @@ modules:
98
default_value: 2
99
required: false
100
- name: collect_databases_matching
101
- description: Databases selector. Determines which database metrics will be collected. Syntax is [simple patterns](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#simple-patterns-matcher).
101
+ description: Databases selector. Determines which database metrics will be collected. Syntax is [simple patterns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#simple-patterns-matcher).
102
default_value: ""
103
required: false
104
- name: max_db_tables
src/go/collectors/go.d.plugin/modules/weblog/metadata.yaml
+1
-1
@@ -124,7 +124,7 @@ modules:
124
default_value: ""
125
required: true
126
- name: url_patterns.pattern
127
- description: Used to match against full original request URI. Pattern syntax in [matcher](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format).
127
+ description: Used to match against full original request URI. Pattern syntax in [matcher](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/matcher#supported-format).
128
default_value: ""
129
required: true
130
- name: parser
src/go/collectors/go.d.plugin/pkg/README.md
+4
-4
@@ -1,6 +1,6 @@
1
<!--
2
title: "Helper Packages"
3
-custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/pkg/README.md"
3
+custom_edit_url: "https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/README.md"
4
sidebar_label: "Helper Packages"
5
learn_status: "Published"
6
learn_rel_path: "Developers/External plugins/go.d.plugin/Helper Packages"
@@ -10,13 +10,13 @@ learn_rel_path: "Developers/External plugins/go.d.plugin/Helper Packages"
10
11
- if you need IP ranges consider to
12
use [`iprange`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/iprange/README.md).
13
-- if you parse an application log files, then [`log`](https://github.com/netdata/go.d.plugin/tree/master/pkg/logs) is
13
+- if you parse an application log files, then [`log`](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/logs) is
14
handy.
15
- if you need filtering
16
check [`matcher`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/matcher/README.md).
17
-- if you collect metrics from an HTTP endpoint use [`web`](https://github.com/netdata/go.d.plugin/tree/master/pkg/web).
17
+- if you collect metrics from an HTTP endpoint use [`web`](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/web).
18
- if you collect metrics from a prometheus endpoint,
19
- then [`prometheus`](https://github.com/netdata/go.d.plugin/tree/master/pkg/prometheus)
19
+ then [`prometheus`](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/pkg/prometheus)
20
and [`web`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/web/README.md) is what you need.
21
- [`tlscfg`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/tlscfg/README.md) provides TLS support.
22
- [`stm`](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/stm/README.md) helps you to convert any struct to a `map[string]int64`.
src/go/collectors/go.d.plugin/pkg/iprange/README.md
+1
-1
@@ -1,6 +1,6 @@
1
<!--
2
title: "iprange"
3
-custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/pkg/iprange/README.md"
3
+custom_edit_url: "https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/iprange/README.md"
4
sidebar_label: "iprange"
5
learn_status: "Published"
6
learn_rel_path: "Developers/External plugins/go.d.plugin/Helper Packages"
src/go/collectors/go.d.plugin/pkg/matcher/README.md
+1
-1
@@ -1,6 +1,6 @@
1
<!--
2
title: "matcher"
3
-custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/pkg/matcher/README.md"
3
+custom_edit_url: "https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/matcher/README.md"
4
sidebar_label: "matcher"
5
learn_status: "Published"
6
learn_rel_path: "Developers/External plugins/go.d.plugin/Helper Packages"
src/go/collectors/go.d.plugin/pkg/prometheus/selector/README.md
+1
-1
@@ -1,6 +1,6 @@
1
<!--
2
title: "Time series selector"
3
-custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/pkg/prometheus/selector/README.md"
3
+custom_edit_url: "https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/prometheus/selector/README.md"
4
sidebar_label: "Time series selector"
5
learn_status: "Published"
6
learn_rel_path: "Developers/External plugins/go.d.plugin/Helper Packages"
src/go/collectors/go.d.plugin/pkg/stm/README.md
+1
-1
@@ -1,6 +1,6 @@
1
<!--
2
title: "stm"
3
-custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/pkg/stm/README.md"
3
+custom_edit_url: "https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/stm/README.md"
4
sidebar_label: "stm"
5
learn_status: "Published"
6
learn_rel_path: "Developers/External plugins/go.d.plugin/Helper Packages"
src/go/collectors/go.d.plugin/pkg/tlscfg/README.md
+2
-2
@@ -1,6 +1,6 @@
1
<!--
2
title: "tlscfg"
3
-custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/pkg/tlscfg/README.md"
3
+custom_edit_url: "https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/tlscfg/README.md"
4
sidebar_label: "tlscfg"
5
learn_status: "Published"
6
learn_rel_path: "Developers/External plugins/go.d.plugin/Helper Packages"
@@ -27,7 +27,7 @@ Just make `TLSConfig` part of your module configuration.
27
```go
28
package example
29
30
-import "github.com/netdata/go.d.plugin/pkg/tlscfg"
30
+import "github.com/netdata/netdata/go/go.d.plugin/pkg/tlscfg"
31
32
type Config struct {
33
tlscfg.TLSConfig `yaml:",inline"`
src/go/collectors/go.d.plugin/pkg/web/README.md
+2
-2
@@ -1,6 +1,6 @@
1
<!--
2
title: "web"
3
-custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/pkg/web/README.md"
3
+custom_edit_url: "https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/pkg/web/README.md"
4
sidebar_label: "web"
5
learn_status: "Published"
6
learn_rel_path: "Developers/External plugins/go.d.plugin/Helper Packages"
@@ -46,7 +46,7 @@ Just make `HTTP` part of your module configuration.
46
```go
47
package example
48
49
-import "github.com/netdata/go.d.plugin/pkg/web"
49
+import "github.com/netdata/netdata/go/go.d.plugin/pkg/web"
50
51
type Config struct {
52
web.HTTP `yaml:",inline"`