0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-06 22:38:55 +00:00

restructure go.d ()

* restruture go.d

* update gitignore

* update ci files

* update gen_docs_integrations.py

* update link in go.d conf files

* update go.d modules metadata files

* update metadata files

* update packaging

* add log files

* integrations commit

* update get-go-version.py

* go fmt

* fix packaging

* update go.d readme

---------

Co-authored-by: Fotis Voutsas <fotis@netdata.cloud>
This commit is contained in:
Ilya Mashchenko 2024-07-02 15:32:34 +03:00 committed by GitHub
parent e99da8b64b
commit 7fee1e5222
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2179 changed files with 4748 additions and 5030 deletions
.github
.gitignoreCMakeLists.txt
docs
integrations
packaging/cmake/Modules
src

View file

@ -8,7 +8,7 @@ updates:
- "no changelog"
- "area/ci"
- package-ecosystem: gomod
directory: /src/go/collectors/go.d.plugin
directory: /src/go
schedule:
interval: weekly
labels:

4
.github/labeler.yml vendored
View file

@ -75,7 +75,7 @@ area/collectors:
- changed-files:
- any-glob-to-any-file:
- src/collectors/**
- src/go/collectors/go.d.plugin/**
- src/go/**
collectors/plugins.d:
- any:
@ -141,7 +141,7 @@ collectors/go.d:
- any:
- changed-files:
- any-glob-to-any-file:
- src/go/collectors/go.d.plugin/**
- src/go/**
collectors/idlejitter:
- any:

View file

@ -32,7 +32,7 @@ for modfile in GO_SRC.glob('**/go.mod'):
modules.append({
'module': str(modfile.parent),
'version': str(version),
'build_target': f'github.com/netdata/netdata/go/{ modfile.parts[-2] }/{ str(mainpath) }/',
'build_target': f'github.com/netdata/netdata/go/plugins/{ str(mainpath) }/',
})
with GITHUB_OUTPUT.open('a') as f:

View file

@ -139,7 +139,7 @@ jobs:
strategy:
matrix:
tree:
- src/go/collectors/go.d.plugin
- src/go
permissions:
security-events: write
steps:

View file

@ -183,7 +183,7 @@ jobs:
strategy:
matrix:
tree:
- src/go/collectors/go.d.plugin
- src/go
runs-on: ubuntu-latest
steps:
- name: Checkout

8
.gitignore vendored
View file

@ -127,6 +127,7 @@ docs/diagrams/plantuml.jar
# python virtual environment
venv/
.python-version
# debugging / profiling
makeself/debug/
@ -194,11 +195,8 @@ src/libnetdata/gorilla/fuzz-*.log
build/
# ignore rules for go plugin code
src/go/collectors/go.d.plugin/bin/
src/go/collectors/go.d.plugin/mocks/springboot2/.gradle/
src/go/collectors/go.d.plugin/mocks/tmp/*
!src/go/collectors/go.d.plugin/mocks/tmp/.gitkeep
src/go/collectors/go.d.plugin/vendor
src/go/plugin/go.d/bin/
src/go/plugin/go.d/vendor
# ignore nsis installer
packaging/utils/netdata-installer.exe

View file

@ -2358,7 +2358,7 @@ install(TARGETS netdatacli
#
if(ENABLE_PLUGIN_GO)
add_go_target(go-plugin go.d.plugin src/go/collectors/go.d.plugin cmd/godplugin)
add_go_target(go-plugin go.d.plugin src/go cmd/godplugin)
install(PROGRAMS ${CMAKE_BINARY_DIR}/go.d.plugin
COMPONENT plugin-go
@ -2943,14 +2943,14 @@ install(PROGRAMS ${CMAKE_BINARY_DIR}/src/collectors/ioping.plugin/ioping.plugin
# go.d.plugin
#
if(ENABLE_PLUGIN_GO)
install(FILES src/go/collectors/go.d.plugin/config/go.d.conf
install(FILES src/go/plugin/go.d/config/go.d.conf
COMPONENT plugin-go
DESTINATION usr/lib/netdata/conf.d)
install(DIRECTORY
COMPONENT plugin-go
DESTINATION usr/lib/netdata/conf.d/go.d)
file(GLOB GO_CONF_FILES src/go/collectors/go.d.plugin/config/go.d/*.conf)
file(GLOB GO_CONF_FILES src/go/plugin/go.d/config/go.d/*.conf)
install(FILES ${GO_CONF_FILES}
COMPONENT plugin-go
DESTINATION usr/lib/netdata/conf.d/go.d)
@ -2958,7 +2958,7 @@ if(ENABLE_PLUGIN_GO)
install(DIRECTORY
COMPONENT plugin-go
DESTINATION usr/lib/netdata/conf.d/go.d/sd)
file(GLOB GO_SD_CONF_FILES src/go/collectors/go.d.plugin/config/go.d/sd/*.conf)
file(GLOB GO_SD_CONF_FILES src/go/plugin/go.d/config/go.d/sd/*.conf)
install(FILES ${GO_SD_CONF_FILES}
COMPONENT plugin-go
DESTINATION usr/lib/netdata/conf.d/go.d/sd)

View file

@ -8,7 +8,7 @@ You can use the [LTSV log format](http://ltsv.org/), track TLS and cipher usage,
ever. In one test on a system with SSD storage, the collector consistently parsed the logs for 200,000 requests in
200ms, using ~30% of a single core.
The [web_log](/src/go/collectors/go.d.plugin/modules/weblog/README.md) collector is currently compatible
The [web_log](/src/go/plugin/go.d/modules/weblog/README.md) collector is currently compatible
with [Nginx](https://nginx.org/en/) and [Apache](https://httpd.apache.org/).
This guide will walk you through using the new Go-based web log collector to turn the logs these web servers
@ -91,7 +91,7 @@ The web log collector is capable of parsing custom Nginx and Apache log formats
leave that topic for a separate guide.
We do have [extensive
documentation](/src/go/collectors/go.d.plugin/modules/weblog/README.md#custom-log-format) on how
documentation](/src/go/plugin/go.d/modules/weblog/README.md#custom-log-format) on how
to build custom parsing for Nginx and Apache logs.
## Tweak web log collector alerts

View file

@ -137,7 +137,7 @@ Let's explore the most colorful box by hovering over it.
container](https://user-images.githubusercontent.com/1153921/109049544-a8417980-7695-11eb-80a7-109b4a645a27.png)
The **Context** tab shows `rabbitmq-5bb66bb6c9-6xr5b` as the container's image name, which means this container is
running a [RabbitMQ](/src/go/collectors/go.d.plugin/modules/rabbitmq/README.md) workload.
running a [RabbitMQ](/src/go/plugin/go.d/modules/rabbitmq/README.md) workload.
Click the **Metrics** tab to see real-time metrics from that container. Unsurprisingly, it shows a spike in CPU
utilization at regular intervals.
@ -166,13 +166,13 @@ for complete customization. For example, grouping the top chart by `k8s_containe
Netdata has a [service discovery plugin](https://github.com/netdata/agent-service-discovery), which discovers and
creates configuration files for [compatible
services](https://github.com/netdata/helmchart#service-discovery-and-supported-services) and any endpoints covered by
our [generic Prometheus collector](/src/go/collectors/go.d.plugin/modules/prometheus/README.md).
our [generic Prometheus collector](/src/go/plugin/go.d/modules/prometheus/README.md).
Netdata uses these files to collect metrics from any compatible application as they run _inside_ of a pod. Service
discovery happens without manual intervention as pods are created, destroyed, or moved between nodes.
Service metrics show up on the Overview as well, beneath the **Kubernetes** section, and are labeled according to the
service in question. For example, the **RabbitMQ** section has numerous charts from the [`rabbitmq`
collector](/src/go/collectors/go.d.plugin/modules/rabbitmq/README.md):
collector](/src/go/plugin/go.d/modules/rabbitmq/README.md):
![Finding service discovery
metrics](https://user-images.githubusercontent.com/1153921/109054511-2eac8a00-769b-11eb-97f1-da93acb4b5fe.png)
@ -193,7 +193,7 @@ Netdata also automatically collects metrics from two essential Kubernetes proces
The **k8s kubelet** section visualizes metrics from the Kubernetes agent responsible for managing every pod on a given
node. This also happens without any configuration thanks to the [kubelet
collector](/src/go/collectors/go.d.plugin/modules/k8s_kubelet/README.md).
collector](/src/go/plugin/go.d/modules/k8s_kubelet/README.md).
Monitoring each node's kubelet can be invaluable when diagnosing issues with your Kubernetes cluster. For example, you
can see if the number of running containers/pods has dropped, which could signal a fault or crash in a particular
@ -209,7 +209,7 @@ configuration-related errors, and the actual vs. desired numbers of volumes, plu
The **k8s kube-proxy** section displays metrics about the network proxy that runs on each node in your Kubernetes
cluster. kube-proxy lets pods communicate with each other and accept sessions from outside your cluster. Its metrics are
collected by the [kube-proxy
collector](/src/go/collectors/go.d.plugin/modules/k8s_kubeproxy/README.md).
collector](/src/go/plugin/go.d/modules/k8s_kubeproxy/README.md).
With Netdata, you can monitor how often your k8s proxies are syncing proxy rules between nodes. Dramatic changes in
these figures could indicate an anomaly in your cluster that's worthy of further investigation.
@ -229,9 +229,9 @@ clusters of all sizes.
- [Netdata Helm chart](https://github.com/netdata/helmchart)
- [Netdata service discovery](https://github.com/netdata/agent-service-discovery)
- [Netdata Agent · `kubelet`
collector](/src/go/collectors/go.d.plugin/modules/k8s_kubelet/README.md)
collector](/src/go/plugin/go.d/modules/k8s_kubelet/README.md)
- [Netdata Agent · `kube-proxy`
collector](/src/go/collectors/go.d.plugin/modules/k8s_kubeproxy/README.md)
collector](/src/go/plugin/go.d/modules/k8s_kubeproxy/README.md)
- [Netdata Agent · `cgroups.plugin`](/src/collectors/cgroups.plugin/README.md)

View file

@ -69,7 +69,7 @@ metrics from each using the [cgroups data collector](/src/collectors/cgroups.plu
## Enable Apache monitoring
Let's begin by configuring Apache to work with Netdata's [Apache data
collector](/src/go/collectors/go.d.plugin/modules/apache/README.md).
collector](/src/go/plugin/go.d/modules/apache/README.md).
Actually, there's nothing for you to do to enable Apache monitoring with Netdata.
@ -80,7 +80,7 @@ metrics](https://httpd.apache.org/docs/2.4/mod/mod_status.html), which is just _
## Enable web log monitoring
The Netdata Agent also comes with a [web log
collector](/src/go/collectors/go.d.plugin/modules/weblog/README.md), which reads Apache's access
collector](/src/go/plugin/go.d/modules/weblog/README.md), which reads Apache's access
log file, processes each line, and converts them into per-second metrics. On Debian systems, it reads the file at
`/var/log/apache2/access.log`.
@ -93,7 +93,7 @@ monitoring.
Because your MySQL database is password-protected, you do need to tell MySQL to allow the `netdata` user to connect to
without a password. Netdata's [MySQL data
collector](/src/go/collectors/go.d.plugin/modules/mysql/README.md) collects metrics in _read-only_
collector](/src/go/plugin/go.d/modules/mysql/README.md) collects metrics in _read-only_
mode, without being able to alter or affect operations in any way.
First, log into the MySQL shell. Then, run the following three commands, one at a time:
@ -113,7 +113,7 @@ Unlike Apache or MySQL, PHP isn't a service that you can monitor directly, unles
with [StatsD](/src/collectors/statsd.plugin/README.md).
However, if you use [PHP-FPM](https://php-fpm.org/) in your LAMP stack, you can monitor that process with our [PHP-FPM
data collector](/src/go/collectors/go.d.plugin/modules/phpfpm/README.md).
data collector](/src/go/plugin/go.d/modules/phpfpm/README.md).
Open your PHP-FPM configuration for editing, replacing `7.4` with your version of PHP:
@ -215,7 +215,7 @@ services. The per-second metrics granularity means you have the most accurate in
any LAMP-related issues.
Another powerful way to monitor the availability of a LAMP stack is the [`httpcheck`
collector](/src/go/collectors/go.d.plugin/modules/httpcheck/README.md), which pings a web server at
collector](/src/go/plugin/go.d/modules/httpcheck/README.md), which pings a web server at
a regular interval and tells you whether if and how quickly it's responding. The `response_match` option also lets you
monitor when the web server's response isn't what you expect it to be, which might happen if PHP-FPM crashes, for
example.
@ -231,8 +231,8 @@ source of issues faster with [Metric Correlations](/docs/metric-correlations.md)
### Related reference documentation
- [Netdata Agent · Get started](/packaging/installer/README.md)
- [Netdata Agent · Apache data collector](/src/go/collectors/go.d.plugin/modules/apache/README.md)
- [Netdata Agent · Web log collector](/src/go/collectors/go.d.plugin/modules/weblog/README.md)
- [Netdata Agent · MySQL data collector](/src/go/collectors/go.d.plugin/modules/mysql/README.md)
- [Netdata Agent · PHP-FPM data collector](/src/go/collectors/go.d.plugin/modules/phpfpm/README.md)
- [Netdata Agent · Apache data collector](/src/go/plugin/go.d/modules/apache/README.md)
- [Netdata Agent · Web log collector](/src/go/plugin/go.d/modules/weblog/README.md)
- [Netdata Agent · MySQL data collector](/src/go/plugin/go.d/modules/mysql/README.md)
- [Netdata Agent · PHP-FPM data collector](/src/go/plugin/go.d/modules/phpfpm/README.md)

View file

@ -11,7 +11,7 @@ learn_rel_path: "Miscellaneous"
[CockroachDB](https://github.com/cockroachdb/cockroach) is an open-source project that brings SQL databases into
scalable, disaster-resilient cloud deployments. Thanks to
a [new CockroachDB collector](/src/go/collectors/go.d.plugin/modules/cockroachdb/README.md)
a [new CockroachDB collector](/src/go/plugin/go.d/modules/cockroachdb/README.md)
released in
[v1.20](https://blog.netdata.cloud/posts/release-1.20/), you can now monitor any number of CockroachDB databases with
maximum granularity using Netdata. Collect more than 50 unique metrics and put them on interactive visualizations

View file

@ -27,8 +27,8 @@ alternative, like the guide available from
For more specifics on the collection modules used in this guide, read the respective pages in our documentation:
- [HDFS](/src/go/collectors/go.d.plugin/modules/hdfs/README.md)
- [Zookeeper](/src/go/collectors/go.d.plugin/modules/zookeeper/README.md)
- [HDFS](/src/go/plugin/go.d/modules/hdfs/README.md)
- [Zookeeper](/src/go/plugin/go.d/modules/zookeeper/README.md)
## Set up your HDFS and Zookeeper installations

View file

@ -81,7 +81,7 @@ service](https://discourse.pi-hole.net/t/how-do-i-configure-my-devices-to-use-pi
finished setting up Pi-hole at this point.
As far as configuring Netdata to monitor Pi-hole metrics, there's nothing you actually need to do. Netdata's [Pi-hole
collector](/src/go/collectors/go.d.plugin/modules/pihole/README.md) will autodetect the new service
collector](/src/go/plugin/go.d/modules/pihole/README.md) will autodetect the new service
running on your Raspberry Pi and immediately start collecting metrics every second.
Restart Netdata with `sudo systemctl restart netdata`, which will then recognize that Pi-hole is running and start a

View file

@ -41,7 +41,7 @@ We recommend a few strategies for organizing your Rooms.
If you have a user-facing SaaS product, or an internal service that this said product relies on, you may want to monitor that entire stack in a single Room. This might include Kubernetes clusters, Docker containers, proxies, databases, web servers, brokers, and more. End-to-end Rooms are valuable tools for ensuring the health and performance of your organization's essential services.
- **Incident response**
You can also create new Rooms as one of the first steps in your incident response process. For example, you have a user-facing web app that relies on Apache Pulsar for a message queue, and one of your nodes using the [Pulsar collector](/src/go/collectors/go.d.plugin/modules/pulsar/README.md) begins reporting a suspiciously low messages rate. You can create a Room called `$year-$month-$day-pulsar-rate`, add all your Pulsar nodes in addition to nodes they connect to, and begin diagnosing the root cause in a Room optimized for getting to resolution as fast as possible.
You can also create new Rooms as one of the first steps in your incident response process. For example, you have a user-facing web app that relies on Apache Pulsar for a message queue, and one of your nodes using the [Pulsar collector](/src/go/plugin/go.d/modules/pulsar/README.md) begins reporting a suspiciously low messages rate. You can create a Room called `$year-$month-$day-pulsar-rate`, add all your Pulsar nodes in addition to nodes they connect to, and begin diagnosing the root cause in a Room optimized for getting to resolution as fast as possible.
### Add Rooms

View file

@ -11,7 +11,7 @@ def cleanup():
"""
clean directories that are either data collection or exporting integrations
"""
for element in Path("src/go/collectors/go.d.plugin/modules").glob('**/*/'):
for element in Path("src/go/plugin/go.d/modules").glob('**/*/'):
if "integrations" in str(element):
shutil.rmtree(element)
for element in Path("src/collectors").glob('**/*/'):

View file

@ -29,7 +29,7 @@ COLLECTOR_SOURCES = [
(AGENT_REPO, REPO_PATH / 'src' / 'collectors', True),
(AGENT_REPO, REPO_PATH / 'src' / 'collectors' / 'charts.d.plugin', True),
(AGENT_REPO, REPO_PATH / 'src' / 'collectors' / 'python.d.plugin', True),
(AGENT_REPO, REPO_PATH / 'src' / 'go' / 'collectors' / 'go.d.plugin' / 'modules', True),
(AGENT_REPO, REPO_PATH / 'src' / 'go' / 'plugin' / 'go.d' / 'modules', True),
]
DEPLOY_SOURCES = [

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -5,9 +5,9 @@
# SPDX-License-Identifier: GPL
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(GO_LDFLAGS "-X github.com/netdata/netdata/go/go.d.plugin/pkg/buildinfo.Version=${NETDATA_VERSION_STRING}")
set(GO_LDFLAGS "-X github.com/netdata/netdata/go/plugins/pkg/buildinfo.Version=${NETDATA_VERSION_STRING}")
else()
set(GO_LDFLAGS "-w -s -X github.com/netdata/netdata/go/go.d.plugin/pkg/buildinfo.Version=${NETDATA_VERSION_STRING}")
set(GO_LDFLAGS "-w -s -X github.com/netdata/netdata/go/plugins/pkg/buildinfo.Version=${NETDATA_VERSION_STRING}")
endif()
# add_go_target: Add a new target that needs to be built using the Go toolchain.

File diff suppressed because it is too large Load diff

View file

@ -50,7 +50,7 @@ specifics of what a given collector does.
- **Orchestrators** are external plugins that run and manage one or more modules. They run as independent processes.
The Go orchestrator is in active development.
- [go.d.plugin](/src/go/collectors/go.d.plugin/README.md): An orchestrator for data
- [go.d.plugin](/src/go/plugin/go.d/README.md): An orchestrator for data
collection modules written in `go`.
- [python.d.plugin](/src/collectors/python.d.plugin/README.md):

View file

@ -93,7 +93,7 @@ metrics, will automatically enable data collection for the application in questi
When Netdata starts up, each collector searches for exposed metrics on the default endpoint established by that service
or application's standard installation procedure. For example,
the [Nginx collector](/src/go/collectors/go.d.plugin/modules/nginx/README.md) searches at
the [Nginx collector](/src/go/plugin/go.d/modules/nginx/README.md) searches at
`http://127.0.0.1/stub_status` for exposed metrics in the correct format. If an Nginx web server is running and exposes
metrics on that endpoint, the collector begins gathering them.

View file

@ -22,7 +22,7 @@ Module: sensors
## Overview
Use this collector when `lm-sensors` doesn't work on your device (e.g. for RPi temperatures).
For all other cases use the [Go collector](/src/go/collectors/go.d.plugin/modules/sensors/README.md), which supports multiple jobs, is more efficient and performs calculations on top of the kernel provided values."
For all other cases use the [Go collector](/src/go/plugin/go.d/modules/sensors/README.md), which supports multiple jobs, is more efficient and performs calculations on top of the kernel provided values."
It will provide charts for all configured system sensors, by reading sensors directly from the kernel.

View file

@ -25,7 +25,7 @@ modules:
data_collection:
metrics_description: |
Use this collector when `lm-sensors` doesn't work on your device (e.g. for RPi temperatures).
For all other cases use the [Go collector](/src/go/collectors/go.d.plugin/modules/sensors/README.md), which supports multiple jobs, is more efficient and performs calculations on top of the kernel provided values."
For all other cases use the [Go collector](/src/go/plugin/go.d/modules/sensors/README.md), which supports multiple jobs, is more efficient and performs calculations on top of the kernel provided values."
method_description: |
It will provide charts for all configured system sensors, by reading sensors directly from the kernel.
The values graphed are the raw hardware values of the sensors.

View file

@ -20,7 +20,7 @@ from external processes, thus allowing Netdata to use **external plugins**.
| [charts.d.plugin](/src/collectors/charts.d.plugin/README.md) | `BASH` | all | a **plugin orchestrator** for data collection modules written in `BASH` v4+. |
| [cups.plugin](/src/collectors/cups.plugin/README.md) | `C` | all | monitors **CUPS** |
| [ebpf.plugin](/src/collectors/ebpf.plugin/README.md) | `C` | linux | monitors different metrics on environments using kernel internal functions. |
| [go.d.plugin](/src/go/collectors/go.d.plugin/README.md) | `GO` | all | collects metrics from the system, applications, or third-party APIs. |
| [go.d.plugin](/src/go/plugin/go.d/README.md) | `GO` | all | collects metrics from the system, applications, or third-party APIs. |
| [ioping.plugin](/src/collectors/ioping.plugin/README.md) | `C` | all | measures disk latency. |
| [freeipmi.plugin](/src/collectors/freeipmi.plugin/README.md) | `C` | linux | collects metrics from enterprise hardware sensors, on Linux servers. |
| [nfacct.plugin](/src/collectors/nfacct.plugin/README.md) | `C` | linux | collects netfilter firewall, connection tracker and accounting metrics using `libmnl` and `libnetfilter_acct`. |

View file

@ -1,5 +1,5 @@
# This collector will not appear in documentation, as the go version is preferred,
# /src/go/collectors/go.d.plugin/modules/haproxy/README.md
# /src/go/plugin/go.d/modules/haproxy/README.md
#
#
# meta:

View file

@ -1,5 +1,5 @@
# This collector will not appear in documentation, as the go version is preferred,
# /src/go/collectors/go.d.plugin/modules/nvidia_smi/README.md
# /src/go/plugin/go.d/modules/nvidia_smi/README.md
#
# meta:
# plugin_name: python.d.plugin

View file

@ -1,5 +1,5 @@
# This collector will not appear in documentation, as the go version is preferred,
# /src/go/collectors/go.d.plugin/modules/traefik/README.md
# /src/go/plugin/go.d/modules/traefik/README.md
#
# meta:
# plugin_name: python.d.plugin

View file

@ -12,17 +12,17 @@ import (
"path/filepath"
"strings"
"github.com/netdata/netdata/go/go.d.plugin/agent"
"github.com/netdata/netdata/go/go.d.plugin/agent/executable"
"github.com/netdata/netdata/go/go.d.plugin/cli"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/go.d.plugin/pkg/buildinfo"
"github.com/netdata/netdata/go/go.d.plugin/pkg/multipath"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/pkg/buildinfo"
"github.com/netdata/netdata/go/plugins/pkg/executable"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent"
"github.com/netdata/netdata/go/plugins/plugin/go.d/cli"
"github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/multipath"
"github.com/jessevdk/go-flags"
"golang.org/x/net/http/httpproxy"
_ "github.com/netdata/netdata/go/go.d.plugin/modules"
_ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules"
)
var (

View file

@ -1,227 +0,0 @@
<!--
title: go.d.plugin
description: "go.d.plugin is an external plugin for Netdata, responsible for running individual data collectors written in Go."
custom_edit_url: "/src/go/collectors/go.d.plugin/README.md"
sidebar_label: "go.d.plugin"
learn_status: "Published"
learn_topic_type: "Tasks"
learn_rel_path: "Developers/External plugins/go.d.plugin"
sidebar_position: 1
-->
# go.d.plugin
`go.d.plugin` is a [Netdata](https://github.com/netdata/netdata) external plugin. It is an **orchestrator** for data
collection modules written in `go`.
1. It runs as an independent process (`ps fax` shows it).
2. It is started and stopped automatically by Netdata.
3. It communicates with Netdata via a unidirectional pipe (sending data to the Netdata daemon).
4. Supports any number of data collection modules.
5. Allows each module to have any number of data collection jobs.
## Bug reports, feature requests, and questions
Are welcome! We are using [netdata/netdata](https://github.com/netdata/netdata/) repository for bugs, feature requests,
and questions.
- [GitHub Issues](https://github.com/netdata/netdata/issues/new/choose): report bugs or open a new feature request.
- [GitHub Discussions](https://github.com/netdata/netdata/discussions): ask a question or suggest a new idea.
## Install
Go.d.plugin is shipped with Netdata.
### Required Linux capabilities
All capabilities are set automatically during Netdata installation using
the [official installation method](/packaging/installer/README.md#install-on-linux-with-one-line-installer).
No further action required. If you have used a different installation method and need to set the capabilities manually,
see the appropriate collector readme.
| Capability | Required by |
|:--------------------|:------------------------------------------------------------------------------------------------------------------:|
| CAP_NET_RAW | [Ping](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/ping#readme) |
| CAP_NET_ADMIN | [Wireguard](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/wireguard#readme) |
| CAP_DAC_READ_SEARCH | [Filecheck](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/filecheck#readme) |
## Available modules
| Name | Monitors |
|:------------------------------------------------------------------------------------------------------------------------------|:-----------------------------:|
| [adaptec_raid](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/adaptecraid) | Adaptec Hardware RAID |
| [activemq](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/activemq) | ActiveMQ |
| [apache](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/apache) | Apache |
| [bind](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/bind) | ISC Bind |
| [cassandra](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/cassandra) | Cassandra |
| [chrony](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/chrony) | Chrony |
| [clickhouse](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/clickhouse) | ClickHouse |
| [cockroachdb](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/cockroachdb) | CockroachDB |
| [consul](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/consul) | Consul |
| [coredns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/coredns) | CoreDNS |
| [couchbase](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/couchbase) | Couchbase |
| [couchdb](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/couchdb) | CouchDB |
| [dmcache](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dmcache) | DMCache |
| [dnsdist](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dnsdist) | Dnsdist |
| [dnsmasq](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dnsmasq) | Dnsmasq DNS Forwarder |
| [dnsmasq_dhcp](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp) | Dnsmasq DHCP |
| [dns_query](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dnsquery) | DNS Query RTT |
| [docker](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/docker) | Docker Engine |
| [docker_engine](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/docker_engine) | Docker Engine |
| [dockerhub](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/dockerhub) | Docker Hub |
| [elasticsearch](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/elasticsearch) | Elasticsearch/OpenSearch |
| [envoy](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/envoy) | Envoy |
| [example](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/example) | - |
| [fail2ban](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/fail2ban) | Fail2Ban Jails |
| [filecheck](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/filecheck) | Files and Directories |
| [fluentd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/fluentd) | Fluentd |
| [freeradius](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/freeradius) | FreeRADIUS |
| [haproxy](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/haproxy) | HAProxy |
| [hddtemp](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/hddtemp) | Disks temperature |
| [hdfs](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/hdfs) | HDFS |
| [hpssa](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/hpssa) | HPE Smart Array |
| [httpcheck](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/httpcheck) | Any HTTP Endpoint |
| [intelgpu](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/intelgpu) | Intel integrated GPU |
| [isc_dhcpd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/isc_dhcpd) | ISC DHCP |
| [k8s_kubelet](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/k8s_kubelet) | Kubelet |
| [k8s_kubeproxy](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/k8s_kubeproxy) | Kube-proxy |
| [k8s_state](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/k8s_state) | Kubernetes cluster state |
| [lighttpd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/lighttpd) | Lighttpd |
| [litespeed](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/litespeed) | Litespeed |
| [logind](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/logind) | systemd-logind |
| [logstash](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/logstash) | Logstash |
| [lvm](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/lvm) | LVM logical volumes |
| [megacli](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/megacli) | MegaCli Hardware Raid |
| [mongoDB](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/mongodb) | MongoDB |
| [mysql](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/mysql) | MySQL |
| [nginx](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/nginx) | NGINX |
| [nginxplus](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/nginxplus) | NGINX Plus |
| [nginxvts](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/nginxvts) | NGINX VTS |
| [ntpd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/ntpd) | NTP daemon |
| [nvme](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/nvme) | NVMe devices |
| [openvpn](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/openvpn) | OpenVPN |
| [openvpn_status_log](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/openvpn_status_log) | OpenVPN |
| [pgbouncer](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/pgbouncer) | PgBouncer |
| [phpdaemon](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/phpdaemon) | phpDaemon |
| [phpfpm](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/phpfpm) | PHP-FPM |
| [pihole](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/pihole) | Pi-hole |
| [pika](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/pika) | Pika |
| [ping](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/ping) | Any network host |
| [prometheus](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/prometheus) | Any Prometheus Endpoint |
| [portcheck](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/portcheck) | Any TCP Endpoint |
| [postgres](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/postgres) | PostgreSQL |
| [powerdns](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/powerdns) | PowerDNS Authoritative Server |
| [powerdns_recursor](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/powerdns_recursor) | PowerDNS Recursor |
| [proxysql](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/proxysql) | ProxySQL |
| [pulsar](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/portcheck) | Apache Pulsar |
| [rabbitmq](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/rabbitmq) | RabbitMQ |
| [redis](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/redis) | Redis |
| [rspamd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/rspamd) | Rspamd |
| [scaleio](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/scaleio) | Dell EMC ScaleIO |
| [sensors](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules) | Hardware Sensors |
| [SNMP](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/snmp) | SNMP |
| [squidlog](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/squidlog) | Squid |
| [smartctl](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/smartctl) | S.M.A.R.T Storage Devices |
| [storcli](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/storcli) | Broadcom Hardware RAID |
| [supervisord](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/supervisord) | Supervisor |
| [systemdunits](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/systemdunits) | Systemd unit state |
| [tengine](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/tengine) | Tengine |
| [traefik](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/traefik) | Traefik |
| [upsd](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/upsd) | UPSd (Nut) |
| [unbound](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/unbound) | Unbound |
| [vcsa](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/vcsa) | vCenter Server Appliance |
| [vernemq](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/vernemq) | VerneMQ |
| [vsphere](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/vsphere) | VMware vCenter Server |
| [web_log](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/weblog) | Apache/NGINX |
| [wireguard](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/wireguard) | WireGuard |
| [whoisquery](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/whoisquery) | Domain Expiry |
| [windows](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/windows) | Windows |
| [x509check](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/x509check) | Digital Certificates |
| [zfspool](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/zfspool) | ZFS Pools |
| [zookeeper](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules/zookeeper) | ZooKeeper |
## Configuration
Edit the `go.d.conf` configuration file using `edit-config` from the
Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory),
which is typically at `/etc/netdata`.
```bash
cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d.conf
```
Configurations are written in [YAML](http://yaml.org/).
- [plugin configuration](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/config/go.d.conf)
- [specific module configuration](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/config/go.d)
### Enable a collector
To enable a collector you should edit `go.d.conf` to uncomment the collector in question and change it from `no`
to `yes`.
For example, to enable the `example` plugin you would need to update `go.d.conf` from something like:
```yaml
modules:
# example: no
```
to
```yaml
modules:
example: yes
```
Then [restart netdata](/packaging/installer/README.md#maintaining-a-netdata-agent-installation)
for the change to take effect.
## Contributing
If you want to contribute to this project, we are humbled. Please take a look at
our [contributing guidelines](https://github.com/netdata/.github/blob/main/CONTRIBUTING.md) and don't hesitate to
contact us in our forums.
### How to develop a collector
Read [how to write a Netdata collector in Go](/src/go/collectors/go.d.plugin/docs/how-to-write-a-module.md).
## Troubleshooting
Plugin CLI:
```sh
Usage:
orchestrator [OPTIONS] [update every]
Application Options:
-m, --modules= module name to run (default: all)
-c, --config-dir= config dir to read
-w, --watch-path= config path to watch
-d, --debug debug mode
-v, --version display the version and exit
Help Options:
-h, --help Show this help message
```
To debug specific module:
```sh
# become user netdata
sudo su -s /bin/bash netdata
# run plugin in debug mode
./go.d.plugin -d -m <module name>
```
Change `<module name>` to the [module name](#available-modules) you want to debug.
## Netdata Community
This repository follows the Netdata Code of Conduct and is part of the Netdata Community.
- [Community Forums](https://community.netdata.cloud)
- [Netdata Code of Conduct](https://github.com/netdata/.github/blob/main/CODE_OF_CONDUCT.md)

View file

@ -1,99 +0,0 @@
// SPDX-License-Identifier: GPL-3.0-or-later
package modules
import (
_ "github.com/netdata/netdata/go/go.d.plugin/modules/activemq"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/adaptecraid"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/apache"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/bind"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/cassandra"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/chrony"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/clickhouse"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/cockroachdb"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/consul"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/coredns"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/couchbase"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/couchdb"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/dmcache"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/dnsdist"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/dnsmasq"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/dnsmasq_dhcp"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/dnsquery"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/docker"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/docker_engine"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/dockerhub"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/elasticsearch"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/envoy"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/example"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/fail2ban"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/filecheck"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/fluentd"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/freeradius"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/geth"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/haproxy"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/hddtemp"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/hdfs"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/hpssa"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/httpcheck"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/intelgpu"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/isc_dhcpd"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/k8s_kubelet"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/k8s_kubeproxy"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/k8s_state"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/lighttpd"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/litespeed"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/logind"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/logstash"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/lvm"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/megacli"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/mongodb"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/mysql"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/nginx"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/nginxplus"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/nginxvts"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/ntpd"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/nvidia_smi"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/nvme"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/openvpn"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/openvpn_status_log"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/pgbouncer"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/phpdaemon"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/phpfpm"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/pihole"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/pika"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/ping"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/portcheck"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/postfix"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/postgres"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/powerdns"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/powerdns_recursor"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/prometheus"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/proxysql"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/pulsar"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/rabbitmq"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/redis"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/rspamd"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/scaleio"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/sensors"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/smartctl"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/snmp"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/squidlog"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/storcli"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/supervisord"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/systemdunits"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/tengine"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/traefik"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/unbound"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/upsd"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/vcsa"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/vernemq"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/vsphere"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/weblog"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/whoisquery"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/windows"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/wireguard"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/x509check"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/zfspool"
_ "github.com/netdata/netdata/go/go.d.plugin/modules/zookeeper"
)

View file

@ -1,4 +1,4 @@
module github.com/netdata/netdata/go/go.d.plugin
module github.com/netdata/netdata/go/plugins
go 1.22.0

View file

@ -12,7 +12,7 @@ import (
"sync/atomic"
"syscall"
"github.com/netdata/netdata/go/go.d.plugin/agent/executable"
"github.com/netdata/netdata/go/plugins/pkg/executable"
"github.com/mattn/go-isatty"
)

View file

@ -16,7 +16,6 @@ var (
func init() {
path, err := os.Executable()
if err != nil || path == "" {
Name = "go.d"
return
}
@ -27,7 +26,6 @@ func init() {
Name = "test"
}
// FIXME: can't use logger because of circular import
fi, err := os.Lstat(path)
if err != nil {
return

View file

@ -0,0 +1,227 @@
<!--
title: go.d.plugin
description: "go.d.plugin is an external plugin for Netdata, responsible for running individual data collectors written in Go."
custom_edit_url: "/src/go/collectors/go.d.plugin/README.md"
sidebar_label: "go.d.plugin"
learn_status: "Published"
learn_topic_type: "Tasks"
learn_rel_path: "Developers/External plugins/go.d.plugin"
sidebar_position: 1
-->
# go.d.plugin
`go.d.plugin` is a [Netdata](https://github.com/netdata/netdata) external plugin. It is an **orchestrator** for data
collection modules written in `go`.
1. It runs as an independent process (`ps fax` shows it).
2. It is started and stopped automatically by Netdata.
3. It communicates with Netdata via a unidirectional pipe (sending data to the Netdata daemon).
4. Supports any number of data collection modules.
5. Allows each module to have any number of data collection jobs.
## Bug reports, feature requests, and questions
Are welcome! We are using [netdata/netdata](https://github.com/netdata/netdata/) repository for bugs, feature requests,
and questions.
- [GitHub Issues](https://github.com/netdata/netdata/issues/new/choose): report bugs or open a new feature request.
- [GitHub Discussions](https://github.com/netdata/netdata/discussions): ask a question or suggest a new idea.
## Install
Go.d.plugin is shipped with Netdata.
### Required Linux capabilities
All capabilities are set automatically during Netdata installation using
the [official installation method](/packaging/installer/methods/kickstart.md).
No further action required. If you have used a different installation method and need to set the capabilities manually,
see the appropriate collector readme.
| Capability | Required by |
|:--------------------|:-------------------------------------------------------------------------------------------------------:|
| CAP_NET_RAW | [Ping](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/ping#readme) |
| CAP_NET_ADMIN | [Wireguard](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/wireguard#readme) |
| CAP_DAC_READ_SEARCH | [Filecheck](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/filecheck#readme) |
## Available modules
| Name | Monitors |
|:-------------------------------------------------------------------------------------------------------------------|:-----------------------------:|
| [adaptec_raid](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/adaptecraid) | Adaptec Hardware RAID |
| [activemq](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/activemq) | ActiveMQ |
| [apache](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/apache) | Apache |
| [bind](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/bind) | ISC Bind |
| [cassandra](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/cassandra) | Cassandra |
| [chrony](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/chrony) | Chrony |
| [clickhouse](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/clickhouse) | ClickHouse |
| [cockroachdb](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/cockroachdb) | CockroachDB |
| [consul](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/consul) | Consul |
| [coredns](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/coredns) | CoreDNS |
| [couchbase](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/couchbase) | Couchbase |
| [couchdb](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/couchdb) | CouchDB |
| [dmcache](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/dmcache) | DMCache |
| [dnsdist](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/dnsdist) | Dnsdist |
| [dnsmasq](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/dnsmasq) | Dnsmasq DNS Forwarder |
| [dnsmasq_dhcp](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/dnsmasq_dhcp) | Dnsmasq DHCP |
| [dns_query](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/dnsquery) | DNS Query RTT |
| [docker](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/docker) | Docker Engine |
| [docker_engine](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/docker_engine) | Docker Engine |
| [dockerhub](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/dockerhub) | Docker Hub |
| [elasticsearch](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/elasticsearch) | Elasticsearch/OpenSearch |
| [envoy](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/envoy) | Envoy |
| [example](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/example) | - |
| [fail2ban](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/fail2ban) | Fail2Ban Jails |
| [filecheck](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/filecheck) | Files and Directories |
| [fluentd](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/fluentd) | Fluentd |
| [freeradius](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/freeradius) | FreeRADIUS |
| [haproxy](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/haproxy) | HAProxy |
| [hddtemp](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/hddtemp) | Disks temperature |
| [hdfs](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/hdfs) | HDFS |
| [hpssa](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/hpssa) | HPE Smart Array |
| [httpcheck](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/httpcheck) | Any HTTP Endpoint |
| [intelgpu](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/intelgpu) | Intel integrated GPU |
| [isc_dhcpd](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/isc_dhcpd) | ISC DHCP |
| [k8s_kubelet](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/k8s_kubelet) | Kubelet |
| [k8s_kubeproxy](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/k8s_kubeproxy) | Kube-proxy |
| [k8s_state](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/k8s_state) | Kubernetes cluster state |
| [lighttpd](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/lighttpd) | Lighttpd |
| [litespeed](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/litespeed) | Litespeed |
| [logind](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/logind) | systemd-logind |
| [logstash](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/logstash) | Logstash |
| [lvm](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/lvm) | LVM logical volumes |
| [megacli](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/megacli) | MegaCli Hardware Raid |
| [mongoDB](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/mongodb) | MongoDB |
| [mysql](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/mysql) | MySQL |
| [nginx](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/nginx) | NGINX |
| [nginxplus](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/nginxplus) | NGINX Plus |
| [nginxvts](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/nginxvts) | NGINX VTS |
| [ntpd](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/ntpd) | NTP daemon |
| [nvme](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/nvme) | NVMe devices |
| [openvpn](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/openvpn) | OpenVPN |
| [openvpn_status_log](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/openvpn_status_log) | OpenVPN |
| [pgbouncer](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/pgbouncer) | PgBouncer |
| [phpdaemon](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/phpdaemon) | phpDaemon |
| [phpfpm](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/phpfpm) | PHP-FPM |
| [pihole](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/pihole) | Pi-hole |
| [pika](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/pika) | Pika |
| [ping](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/ping) | Any network host |
| [prometheus](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/prometheus) | Any Prometheus Endpoint |
| [portcheck](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/portcheck) | Any TCP Endpoint |
| [postgres](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/postgres) | PostgreSQL |
| [powerdns](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/powerdns) | PowerDNS Authoritative Server |
| [powerdns_recursor](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/powerdns_recursor) | PowerDNS Recursor |
| [proxysql](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/proxysql) | ProxySQL |
| [pulsar](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/portcheck) | Apache Pulsar |
| [rabbitmq](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/rabbitmq) | RabbitMQ |
| [redis](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/redis) | Redis |
| [rspamd](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/rspamd) | Rspamd |
| [scaleio](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/scaleio) | Dell EMC ScaleIO |
| [sensors](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/modules) | Hardware Sensors |
| [SNMP](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/modules/snmp) | SNMP |
| [squidlog](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/squidlog) | Squid |
| [smartctl](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/smartctl) | S.M.A.R.T Storage Devices |
| [storcli](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/storcli) | Broadcom Hardware RAID |
| [supervisord](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/supervisord) | Supervisor |
| [systemdunits](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/systemdunits) | Systemd unit state |
| [tengine](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/tengine) | Tengine |
| [traefik](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/traefik) | Traefik |
| [upsd](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/upsd) | UPSd (Nut) |
| [unbound](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/unbound) | Unbound |
| [vcsa](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/vcsa) | vCenter Server Appliance |
| [vernemq](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/vernemq) | VerneMQ |
| [vsphere](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/vsphere) | VMware vCenter Server |
| [web_log](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/weblog) | Apache/NGINX |
| [wireguard](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/wireguard) | WireGuard |
| [whoisquery](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/whoisquery) | Domain Expiry |
| [windows](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/windows) | Windows |
| [x509check](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/x509check) | Digital Certificates |
| [zfspool](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/zfspool) | ZFS Pools |
| [zookeeper](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/zookeeper) | ZooKeeper |
## Configuration
Edit the `go.d.conf` configuration file using `edit-config` from the
Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory),
which is typically at `/etc/netdata`.
```bash
cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d.conf
```
Configurations are written in [YAML](http://yaml.org/).
- [plugin configuration](https://github.com/netdata/netdata/blob/master/src/go/collectors/go.d.plugin/config/go.d.conf)
- [specific module configuration](https://github.com/netdata/netdata/tree/master/src/go/collectors/go.d.plugin/config/go.d)
### Enable a collector
To enable a collector you should edit `go.d.conf` to uncomment the collector in question and change it from `no`
to `yes`.
For example, to enable the `example` plugin you would need to update `go.d.conf` from something like:
```yaml
modules:
# example: no
```
to
```yaml
modules:
example: yes
```
Then [restart netdata](/docs/netdata-agent/start-stop-restart.md)
for the change to take effect.
## Contributing
If you want to contribute to this project, we are humbled. Please take a look at
our [contributing guidelines](https://github.com/netdata/.github/blob/main/CONTRIBUTING.md) and don't hesitate to
contact us in our forums.
### How to develop a collector
Read [how to write a Netdata collector in Go](/src/go/plugin/go.d/docs/how-to-write-a-module.md).
## Troubleshooting
Plugin CLI:
```sh
Usage:
orchestrator [OPTIONS] [update every]
Application Options:
-m, --modules= module name to run (default: all)
-c, --config-dir= config dir to read
-w, --watch-path= config path to watch
-d, --debug debug mode
-v, --version display the version and exit
Help Options:
-h, --help Show this help message
```
To debug specific module:
```sh
# become user netdata
sudo su -s /bin/bash netdata
# run plugin in debug mode
./go.d.plugin -d -m <module name>
```
Change `<module name>` to the [module name](#available-modules) you want to debug.
## Netdata Community
This repository follows the Netdata Code of Conduct and is part of the Netdata Community.
- [Community Forums](https://community.netdata.cloud)
- [Netdata Code of Conduct](https://github.com/netdata/.github/blob/main/CODE_OF_CONDUCT.md)

View file

@ -12,18 +12,18 @@ import (
"syscall"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery"
"github.com/netdata/netdata/go/go.d.plugin/agent/filelock"
"github.com/netdata/netdata/go/go.d.plugin/agent/filestatus"
"github.com/netdata/netdata/go/go.d.plugin/agent/functions"
"github.com/netdata/netdata/go/go.d.plugin/agent/jobmgr"
"github.com/netdata/netdata/go/go.d.plugin/agent/module"
"github.com/netdata/netdata/go/go.d.plugin/agent/netdataapi"
"github.com/netdata/netdata/go/go.d.plugin/agent/safewriter"
"github.com/netdata/netdata/go/go.d.plugin/agent/vnodes"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/go.d.plugin/pkg/multipath"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/filelock"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/filestatus"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/functions"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/jobmgr"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/netdataapi"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/safewriter"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/vnodes"
"github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/multipath"
"github.com/mattn/go-isatty"
)

View file

@ -9,8 +9,8 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/module"
"github.com/netdata/netdata/go/go.d.plugin/agent/safewriter"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/safewriter"
"github.com/stretchr/testify/assert"
)

View file

@ -8,8 +8,8 @@ import (
"regexp"
"strings"
"github.com/netdata/netdata/go/go.d.plugin/agent/hostinfo"
"github.com/netdata/netdata/go/go.d.plugin/agent/module"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/hostinfo"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"
"github.com/ilyam8/hashstructure"
"gopkg.in/yaml.v2"

View file

@ -5,7 +5,7 @@ package confgroup
import (
"testing"
"github.com/netdata/netdata/go/go.d.plugin/agent/module"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"
"github.com/stretchr/testify/assert"
)

View file

@ -3,7 +3,7 @@
package discovery
import (
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
)
type cache map[string]*confgroup.Group // [Source]

View file

@ -5,10 +5,10 @@ package discovery
import (
"errors"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/dummy"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/file"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/dummy"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/file"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd"
)
type Config struct {

View file

@ -5,7 +5,7 @@ package dummy
import (
"errors"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
)
type Config struct {

View file

@ -7,8 +7,8 @@ import (
"fmt"
"log/slog"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
)
func NewDiscovery(cfg Config) (*Discovery, error) {

View file

@ -7,8 +7,8 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/module"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View file

@ -5,7 +5,7 @@ package file
import (
"errors"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
)
type Config struct {

View file

@ -9,8 +9,8 @@ import (
"log/slog"
"sync"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
)
var log = logger.New().With(

View file

@ -7,7 +7,7 @@ import (
"os"
"path/filepath"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"gopkg.in/yaml.v2"
)

View file

@ -5,8 +5,8 @@ package file
import (
"testing"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/module"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View file

@ -9,8 +9,8 @@ import (
"path/filepath"
"strings"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
)
type (

View file

@ -6,8 +6,8 @@ import (
"fmt"
"testing"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/module"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"
"github.com/stretchr/testify/assert"
)

View file

@ -10,7 +10,7 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View file

@ -10,8 +10,8 @@ import (
"strings"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/fsnotify/fsnotify"
)

View file

@ -7,8 +7,8 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/module"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"
"github.com/stretchr/testify/assert"
)

View file

@ -10,11 +10,11 @@ import (
"sync"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/dummy"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/file"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/dummy"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/file"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd"
)
func NewManager(cfg Config) (*Manager, error) {

View file

@ -9,8 +9,8 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/file"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/file"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View file

@ -6,8 +6,8 @@ import (
"context"
"os"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/go.d.plugin/pkg/multipath"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/multipath"
)
type confFile struct {

View file

@ -11,10 +11,10 @@ import (
"strings"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/go.d.plugin/pkg/dockerhost"
"github.com/netdata/netdata/go/go.d.plugin/pkg/web"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/dockerhost"
"github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web"
"github.com/docker/docker/api/types"
typesContainer "github.com/docker/docker/api/types/container"

View file

@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/docker/docker/api/types"
typesNetwork "github.com/docker/docker/api/types/network"

View file

@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/docker/docker/api/types"
typesContainer "github.com/docker/docker/api/types/container"

View file

@ -5,7 +5,7 @@ package dockerd
import (
"fmt"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
)
type targetGroup struct {

View file

@ -11,9 +11,9 @@ import (
"sync"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/go.d.plugin/pkg/k8sclient"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/k8sclient"
"github.com/ilyam8/hashstructure"
corev1 "k8s.io/api/core/v1"

View file

@ -7,8 +7,8 @@ import (
"os"
"testing"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/go.d.plugin/pkg/k8sclient"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/k8sclient"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"

View file

@ -9,8 +9,8 @@ import (
"strconv"
"strings"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/tools/cache"

View file

@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"

View file

@ -9,8 +9,8 @@ import (
"strconv"
"strings"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/tools/cache"

View file

@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"

View file

@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View file

@ -18,9 +18,9 @@ import (
"strings"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/go.d.plugin/agent/executable"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/pkg/executable"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/ilyam8/hashstructure"
)

View file

@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
)
func TestDiscoverer_Discover(t *testing.T) {

View file

@ -12,7 +12,7 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View file

@ -6,7 +6,7 @@ import (
"fmt"
"strings"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
)
type targetGroup struct {

View file

@ -7,8 +7,8 @@ import (
"sync"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
)
func newAccumulator() *accumulator {

View file

@ -8,8 +8,8 @@ import (
"strings"
"text/template"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
)
func newTargetClassificator(cfg []ClassifyRuleConfig) (*targetClassificator, error) {

View file

@ -5,7 +5,7 @@ package pipeline
import (
"testing"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View file

@ -8,9 +8,9 @@ import (
"fmt"
"text/template"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"gopkg.in/yaml.v2"
)

View file

@ -5,8 +5,8 @@ package pipeline
import (
"testing"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View file

@ -6,10 +6,10 @@ import (
"errors"
"fmt"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/discoverer/dockerd"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/discoverer/kubernetes"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/discoverer/netlisteners"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/discoverer/dockerd"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/discoverer/kubernetes"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/discoverer/netlisteners"
)
type Config struct {

View file

@ -7,7 +7,7 @@ import (
"strconv"
"text/template"
"github.com/netdata/netdata/go/go.d.plugin/pkg/matcher"
"github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher"
"github.com/Masterminds/sprig/v3"
"github.com/bmatcuk/doublestar/v4"

View file

@ -9,13 +9,13 @@ import (
"log/slog"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/discoverer/dockerd"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/discoverer/kubernetes"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/discoverer/netlisteners"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/go.d.plugin/agent/hostinfo"
"github.com/netdata/netdata/go/go.d.plugin/logger"
"github.com/netdata/netdata/go/plugins/logger"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/discoverer/dockerd"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/discoverer/kubernetes"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/discoverer/netlisteners"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/hostinfo"
)
func New(cfg Config) (*Pipeline, error) {

View file

@ -11,8 +11,8 @@ import (
"testing"
"time"
"github.com/netdata/netdata/go/go.d.plugin/agent/confgroup"
"github.com/netdata/netdata/go/go.d.plugin/agent/discovery/sd/model"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
"github.com/ilyam8/hashstructure"
"github.com/stretchr/testify/assert"

Some files were not shown because too many files have changed in this diff Show more