github.com/netdata/go.d.plugin@v0.58.1/README.md (about)

     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
     5  sidebar_label: "go.d.plugin"
     6  learn_status: "Published"
     7  learn_topic_type: "Tasks"
     8  learn_rel_path: "Developers/External plugins/go.d.plugin"
     9  sidebar_position: 1
    10  -->
    11  
    12  # go.d.plugin
    13  
    14  `go.d.plugin` is a [Netdata](https://github.com/netdata/netdata) external plugin. It is an **orchestrator** for data
    15  collection modules written in `go`.
    16  
    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
    22     collection jobs.
    23  
    24  ## Bug reports, feature requests, and questions
    25  
    26  Are welcome! We are using [netdata/netdata](https://github.com/netdata/netdata/) repository for bugs, feature requests,
    27  and questions.
    28  
    29  - [GitHub Issues](https://github.com/netdata/netdata/issues/new/choose): report bugs or open a new feature request.
    30  - [GitHub Discussions](https://github.com/netdata/netdata/discussions): ask a question or suggest a new idea.
    31  
    32  ## Install
    33  
    34  Go.d.plugin is shipped with Netdata.
    35  
    36  ### Required Linux capabilities
    37  
    38  All capabilities are set automatically during Netdata installation using
    39  the [official installation method](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#install-on-linux-with-one-line-installer).
    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) |
    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        |
   112  | [SNMP](https://github.com/netdata/go.d.plugin/blob/master/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           |
   131  
   132  ## Configuration
   133  
   134  Edit the `go.d.conf` configuration file using `edit-config` from the
   135  Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md), which is typically
   136  at `/etc/netdata`.
   137  
   138  ```bash
   139  cd /etc/netdata # Replace this path with your Netdata config directory
   140  sudo ./edit-config go.d.conf
   141  ```
   142  
   143  Configurations are written in [YAML](http://yaml.org/).
   144  
   145  - [plugin configuration](https://github.com/netdata/go.d.plugin/blob/master/config/go.d.conf)
   146  - [specific module configuration](https://github.com/netdata/go.d.plugin/tree/master/config/go.d)
   147  
   148  ### Enable a collector
   149  
   150  To enable a collector you should edit `go.d.conf` to uncomment the collector in question and change it from `no`
   151  to `yes`.
   152  
   153  For example, to enable the `example` plugin you would need to update `go.d.conf` from something like:
   154  
   155  ```yaml
   156  modules:
   157  #  example: no 
   158  ```
   159  
   160  to
   161  
   162  ```yaml
   163  modules:
   164    example: yes
   165  ```
   166  
   167  Then [restart netdata](https://github.com/netdata/netdata/blob/master/docs/configure/start-stop-restart.md) for the
   168  change to take effect.
   169  
   170  ## Contributing
   171  
   172  If you want to contribute to this project, we are humbled. Please take a look at
   173  our [contributing guidelines](https://github.com/netdata/.github/blob/main/CONTRIBUTING.md) and don't hesitate to
   174  contact us in our forums.
   175  
   176  ### How to develop a collector
   177  
   178  Read [how to write a Netdata collector in Go](https://github.com/netdata/go.d.plugin/blob/master/docs/how-to-write-a-module.md).
   179  
   180  ## Troubleshooting
   181  
   182  Plugin CLI:
   183  
   184  ```sh
   185  Usage:
   186    orchestrator [OPTIONS] [update every]
   187  
   188  Application Options:
   189    -m, --modules=    module name to run (default: all)
   190    -c, --config-dir= config dir to read
   191    -w, --watch-path= config path to watch
   192    -d, --debug       debug mode
   193    -v, --version     display the version and exit
   194  
   195  Help Options:
   196    -h, --help        Show this help message
   197  ```
   198  
   199  To debug specific module:
   200  
   201  ```sh
   202  # become user netdata
   203  sudo su -s /bin/bash netdata
   204  
   205  # run plugin in debug mode
   206  ./go.d.plugin -d -m <module name>
   207  ```
   208  
   209  Change `<module name>` to the module name you want to debug. See the [whole list](#available-modules) of available
   210  modules.
   211  
   212  ## Netdata Community
   213  
   214  This repository follows the Netdata Code of Conduct and is part of the Netdata Community.
   215  
   216  - [Community Forums](https://community.netdata.cloud)
   217  - [Netdata Code of Conduct](https://github.com/netdata/.github/blob/main/CODE_OF_CONDUCT.md)