summaryrefslogtreecommitdiffstats
path: root/src/go/collectors/go.d.plugin/modules/supervisord
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2024-07-02 15:32:34 +0300
committerGitHub <noreply@github.com>2024-07-02 15:32:34 +0300
commit7fee1e522262104b75a5f8d7e38b9299275d87bc (patch)
treef2999f9ca7d5017182d82d3e99d19bb6ce429f4f /src/go/collectors/go.d.plugin/modules/supervisord
parente99da8b64b1588a4ccf19f89953ee83c49584bb7 (diff)
restructure go.d (#18058)
* 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>
Diffstat (limited to 'src/go/collectors/go.d.plugin/modules/supervisord')
l---------src/go/collectors/go.d.plugin/modules/supervisord/README.md1
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/charts.go94
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/client.go109
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/collect.go174
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/config_schema.json87
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/init.go30
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/integrations/supervisor.md247
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/metadata.yaml161
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/supervisord.go115
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/supervisord_test.go277
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/testdata/config.json11
-rw-r--r--src/go/collectors/go.d.plugin/modules/supervisord/testdata/config.yaml9
12 files changed, 0 insertions, 1315 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/supervisord/README.md b/src/go/collectors/go.d.plugin/modules/supervisord/README.md
deleted file mode 120000
index a8b7434849..0000000000
--- a/src/go/collectors/go.d.plugin/modules/supervisord/README.md
+++ /dev/null
@@ -1 +0,0 @@
-integrations/supervisor.md \ No newline at end of file
diff --git a/src/go/collectors/go.d.plugin/modules/supervisord/charts.go b/src/go/collectors/go.d.plugin/modules/supervisord/charts.go
deleted file mode 100644
index 2c7f08f045..0000000000
--- a/src/go/collectors/go.d.plugin/modules/supervisord/charts.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-
-package supervisord
-
-import (
- "fmt"
-
- "github.com/netdata/netdata/go/go.d.plugin/agent/module"
-)
-
-const (
- summaryChartsPriority = module.Priority
- groupChartsPriority = summaryChartsPriority + 20
-)
-
-var summaryCharts = module.Charts{
- {
- ID: "processes",
- Title: "Processes",
- Units: "processes",
- Fam: "summary",
- Ctx: "supervisord.summary_processes",
- Type: module.Stacked,
- Priority: summaryChartsPriority,
- Dims: module.Dims{
- {ID: "running_processes", Name: "running"},
- {ID: "non_running_processes", Name: "non-running"},
- },
- },
-}
-
-var (
- groupChartsTmpl = module.Charts{
- groupProcessesChartTmpl.Copy(),
- groupProcessesStateCodeChartTmpl.Copy(),
- groupProcessesExitStatusChartTmpl.Copy(),
- groupProcessesUptimeChartTmpl.Copy(),
- groupProcessesDowntimeChartTmpl.Copy(),
- }
-
- groupProcessesChartTmpl = module.Chart{
- ID: "group_%s_processes",
- Title: "Processes",
- Units: "processes",
- Fam: "group %s",
- Ctx: "supervisord.processes",
- Type: module.Stacked,
- Dims: module.Dims{
- {ID: "group_%s_running_processes", Name: "running"},
- {ID: "group_%s_non_running_processes", Name: "non-running"},
- },
- }
- groupProcessesStateCodeChartTmpl = module.Chart{
- ID: "group_%s_processes_state_code",
- Title: "State code",
- Units: "code",
- Fam: "group %s",
- Ctx: "supervisord.process_state_code",
- }
- groupProcessesExitStatusChartTmpl = module.Chart{
- ID: "group_%s_processes_exit_status",
- Title: "Exit status",
- Units: "status",
- Fam: "group %s",
- Ctx: "supervisord.process_exit_status",
- }
- groupProcessesUptimeChartTmpl = module.Chart{
- ID: "group_%s_processes_uptime",
- Title: "Uptime",
- Units: "seconds",
- Fam: "group %s",
- Ctx: "supervisord.process_uptime",
- }
- groupProcessesDowntimeChartTmpl = module.Chart{
- ID: "group_%s_processes_downtime",
- Title: "Downtime",
- Units: "seconds",
- Fam: "group %s",
- Ctx: "supervisord.process_downtime",
- }
-)
-
-func newProcGroupCharts(group string) *module.Charts {
- charts := groupChartsTmpl.Copy()
- for i, c := range *charts {
- c.ID = fmt.Sprintf(c.ID, group)
- c.Fam = fmt.Sprintf(c.Fam, group)
- c.Priority = groupChartsPriority + i
- for _, d := range c.Dims {
- d.ID = fmt.Sprintf(d.ID, group)
- }
- }
- return charts
-}
diff --git a/src/go/collectors/go.d.plugin/modules/supervisord/client.go b/src/go/collectors/go.d.plugin/modules/supervisord/client.go
deleted file mode 100644
index da62ca21c8..0000000000
--- a/src/go/collectors/go.d.plugin/modules/supervisord/client.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-
-package supervisord
-
-import (
- "context"
- "errors"
- "fmt"
- "net"
- "net/http"
- "net/url"
- "strings"
-
- "github.com/mattn/go-xmlrpc"
-)
-
-type supervisorRPCClient struct {
- client *xmlrpc.Client
-}
-
-func newSupervisorRPCClient(serverURL *url.URL, httpClient *http.Client) (supervisorClient, error) {
- switch serverURL.Scheme {
- case "http", "https":
- c := xmlrpc.NewClient(serverURL.String())
- c.HttpClient = httpClient
- return &supervisorRPCClient{client: c}, nil
- case "unix":
- c := xmlrpc.NewClient("http://unix/RPC2")
- t, ok := httpClient.Transport.(*http.Transport)
- if !ok {
- return nil, errors.New("unexpected HTTP client transport")
- }
- t.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {
- d := net.Dialer{Timeout: httpClient.Timeout}
- return d.DialContext(ctx, "unix", serverURL.Path)
- }
- c.HttpClient = httpClient
- return &supervisorRPCClient{client: c}, nil
- default:
- return nil, fmt.Errorf("unexpected URL scheme: %s", serverURL)
- }
-}
-
-// http://supervisord.org/api.html#process-control
-type processStatus struct {
- name string // name of the process.
- group string // name of the process’ group.
- start int // UNIX timestamp of when the process was started.
- stop int // UNIX timestamp of when the process last ended, or 0 if the process has never been stopped.
- now int // UNIX timestamp of the current time, which can be used to calculate process up-time.
- state int // state code.
- stateName string // string description of state.
- exitStatus int // exit status (errorlevel) of process, or 0 if the process is still running.
-}
-
-func (c *supervisorRPCClient) getAllProcessInfo() ([]processStatus, error) {
- const fn = "supervisor.getAllProcessInfo"
- resp, err := c.client.Call(fn)
- if err != nil {
- return nil, fmt.Errorf("error on '%s' function call: %v", fn, err)
- }
- return parseGetAllProcessInfo(resp)
-}
-
-func (c *supervisorRPCClient) closeIdleConnections() {
- c.client.HttpClient.CloseIdleConnections()
-}
-
-func parseGetAllProcessInfo(resp interface{}) ([]processStatus, error) {
- arr, ok := resp.(xmlrpc.Array)
- if !ok {
- return nil, fmt.Errorf("unexpected response type, want=xmlrpc.Array, got=%T", resp)
- }
-
- var info []processStatus
-
- for _, item := range arr {
- s, ok := item.(xmlrpc.Struct)
- if !ok {
- continue
- }
-
- var p processStatus
- for k, v := range s {
- switch strings.ToLower(k) {
- case "name":
- p.name, _ = v.(string)
- case "group":
- p.group, _ = v.(string)
- case "start":
- p.start, _ = v.(int)
- case "stop":
- p.stop, _ = v.(int)
- case "now":
- p.now, _ = v.(int)
- case "state":
- p.state, _ = v.(int)
- case "statename":
- p.stateName, _ = v.(string)
- case "exitstatus":
- p.exitStatus, _ = v.(int)
- }
- }
- if p.name != "" && p.group != "" && p.stateName != "" {
- info = append(info, p)
- }
- }
- return info, nil
-}
diff --git a/src/go/collectors/go.d.plugin/modules/supervisord/collect.go b/src/go/collectors/go.d.plugin/modules/supervisord/collect.go
deleted file mode 100644
index e04e321314..0000000000
--- a/src/go/collectors/go.d.plugin/modules/supervisord/collect.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-
-package supervisord
-
-import (
- "fmt"
- "strings"
-
- "github.com/netdata/netdata/go/go.d.plugin/agent/module"
-)
-
-func (s *Supervisord) collect() (map[string]int64, error) {
- info, err := s.client.getAllProcessInfo()
- if err != nil {
- return nil, err
- }
-
- ms := make(map[string]int64)
- s.collectAllProcessInfo(ms, info)
-
- return ms, nil
-}
-
-func (s *Supervisord) collectAllProcessInfo(ms map[string]int64, info []processStatus) {
- s.resetCache()
- ms["running_processes"] = 0
- ms["non_running_processes"] = 0
- for _, p := range info {
- if _, ok := s.cache[p.group]; !ok {
- s.cache[p.group] = make(map[string]bool)
- s.addProcessGroupCharts(p)
- }
- if _, ok := s.cache[p.group][p.name]; !ok {
- s.addProcessToCharts(p)
- }
- s.cache[p.group][p.name] = true
-
- ms["group_"+p.group+"_running_processes"] += 0
- ms["group_"+p.group+"_non_running_processes"] += 0
- if isProcRunning(p) {
- ms["running_processes"] += 1
- ms["group_"+p.group+"_running_processes"] += 1
- } else {
- ms["non_running_processes"] += 1
- ms["group_"+p.group+"_non_running_processes"] += 1
- }
- id := procID(p)
- ms[id+"_state_code"] = int64(p.state)
- ms[id+"_exit_status"] = int64(p.exitStatus)
- ms[id+"_uptime"] = calcProcessUptime(p)
- ms[id+"_downtime"] = calcProcessDowntime(p)
- }
- s.cleanupCache()
-}
-
-func (s *Supervisord) resetCache() {
- for _, procs := range s.cache {
- for name := range procs {
- procs[name] = false
- }
- }
-}
-
-func (s *Supervisord) cleanupCache() {
- for group, procs := range s.cache {
- for name, ok := range procs {
- if !ok {
- s.removeProcessFromCharts(group, name)
- delete(s.cache[group], name)
- }
- }
- if len(s.cache[group]) == 0 {
- s.removeProcessGroupCharts(group)
- delete(s.cache, group)
- }
- }
-}
-
-func calcProcessUptime(p processStatus) int64 {
- if !isProcRunning(p) {
- return 0
- }
- return int64(p.now - p.start)
-}
-
-func calcProcessDowntime(p processStatus) int64 {
- if isProcRunning(p) || p.stop == 0 {
- return 0
- }
- return int64(p.now - p.stop)
-}
-
-func (s *Supervisord) addProcessGroupCharts(p processStatus) {
- charts := newProcGroupCharts(p.group)
- if err := s.Charts().Add(*charts...); err != nil {
- s.Warning(err)
- }
-}
-
-func (s *Supervisord) addProcessToCharts(p processStatus) {
- id := procID(p)
- for _, c := range *s.Charts() {
- var dimID string
- switch c.ID {
- case fmt.Sprintf(groupProcessesStateCodeChartTmpl.ID, p.group):
- dimID = id + "_state_code"
- case fmt.Sprintf(groupProcessesExitStatusChartTmpl.ID, p.group):
- dimID = id + "_exit_status"
- case fmt.Sprintf(groupProcessesUptimeChartTmpl.ID, p.group):
- dimID = id + "_uptime"
- case fmt.Sprintf(groupProcessesDowntimeChartTmpl.ID, p.group):
- dimID = id + "_downtime"
- default:
- continue
- }
- dim := &module.Dim{ID: dimID, Name: p.name}
- if err := c.AddDim(dim); err != nil {
- s.Warning(err)
- return
- }
- c.MarkNotCreated()
- }
-}
-
-func (s *Supervisord) removeProcessGroupCharts(group string) {
- prefix := "group_" + group
- for _, c := range *s.Charts() {
- if strings.HasPrefix(c.ID, prefix) {
- c.MarkRemove()
- c.MarkNotCreated()
- }
- }
-}
-
-func (s *Supervisord) removeProcessFromCharts(group, name string) {
- id := procID(processStatus{name: name, group: group})
- for _, c := range *s.Charts() {
- var dimID string
- switch c.ID {
- case fmt.Sprintf(groupProcessesStateCodeChartTmpl.ID, group):
- dimID = id + "_state_code"
- case fmt.Sprintf(groupProcessesExitStatusChartTmpl.ID, group):
- dimID = id + "_exit_status"
- case fmt.Sprintf(groupProcessesUptimeChartTmpl.ID, group):
- dimID = id + "_uptime"
- case fmt.Sprintf(groupProcessesDowntimeChartTmpl.ID, group):
- dimID = id + "_downtime"
- default:
- continue
- }
- if err := c.MarkDimRemove(dimID, true); err != nil {
- s.Warning(err)
- return
- }
- c.MarkNotCreated()
- }
-}
-
-func procID(p processStatus) string {
- return fmt.Sprintf("group_%s_process_%s", p.group, p.name)
-}
-
-func isProcRunning(p processStatus) bool {
- // http://supervisord.org/subprocess.html#process-states
- // STOPPED (0)
- // STARTING (10)
- // RUNNING (20)
- // BACKOFF (30)
- // STOPPING (40)
- // EXITED (100)
- // FATAL (200)
- // UNKNOWN (1000)
- return p.state == 20
-}
diff --git a/src/go/collectors/go.d.plugin/modules/supervisord/config_schema.json b/src/go/collectors/go.d.plugin/modules/supervisord/config_schema.json
deleted file mode 100644
index 8d3c4e9437..0000000000
--- a/src/go/collectors/go.d.plugin/modules/supervisord/config_schema.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "jsonSchema": {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "title": "Supervisord collector configuration.",
- "type": "object",
- "properties": {
- "update_every": {
- "title": "Update every",
- "description": "Data collection interval, measured in seconds.",
- "type": "integer",
- "minimum": 1,
- "default": 1
- },
- "url": {
- "title": "URL",
- "description": "The URL of the Supervisord [XML-RPC interface](http://supervisord.org/xmlrpc.html#rpcinterface-factories).",
- "type": "string",
- "default": "http://127.0.0.1:9001/RPC2",
- "format": "uri"
- },
- "timeout": {
- "title": "Timeout",
- "description": "The timeout in seconds for the HTTP request.",
- "type": "number",
- "minimum": 0.5,
- "default": 1
- },
- "tls_skip_verify": {
- "title": "Skip TLS verification",
- "description": "If set, TLS certificate verification will be skipped.",
- "type": "boolean"
- },
- "tls_ca": {
- "title": "TLS CA",
- "description": "The path to the CA certificate file for TLS verification.",
- "type": "string"
- },
- "tls_cert": {
- "title": "TLS certificate",
- "description": "The path to the client certificate file for TLS authentication.",
- "type": "string"
- },
- "tls_key": {
- "title": "TLS key",
- "description": "The path to the client key file for TLS authentication.",
- "type": "string"
- }
- },
- "required": [
- "url"
- ],
- "additionalProperties": false,
- "patternProperties": {
- "^name$": {}
- }
- },
- "uiSchema": {
- "uiOptions": {
- "fullPage": true
- },
- "timeout": {
- "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)."
- },
- "ui:flavour": "tabs",
- "ui:options": {
- "tabs": [
- {
- "title": "Base",
- "fields": [
- "update_every",
- "url",
- "timeout"
- ]
- },
- {
- "title": "TLS",
- "fields": [
- "tls_skip_verify",
- "tls_ca",
- "tls_cert",
- "tls_key"
- ]
- }
- ]
- }
- }
-}
diff --git a/src/go/collectors/go.d.plugin/modules/supervisord/init.go b/src/go/collectors/go.d.plugin/modules/supervisord/init.go
deleted file mode 100644
index b4cc36382e..0000000000
--- a/src/go/collectors/go.d.plugin/modules/supervisord/init.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-
-package supervisord
-
-import (
- "errors"
- "fmt"
- "net/url"
-
- "github.com/netdata/netdata/go/go.d.plugin/pkg/web"
-)
-
-func (s *Supervisord) verifyConfig() error {
- if s.URL == "" {
- return errors.New("'url' not set")
- }
- return nil
-}
-
-func (s *Supervisord) initSupervisorClient() (supervisorClient, error) {
- u, err := url.Parse(s.URL)
- if err != nil {
- return nil, fmt.Errorf("parse 'url': %v (%s)", err, s.URL)
- }
- httpClient, err := web.NewHTTPClient(s.Client)
- if err != nil {
- return nil, fmt.Errorf("create HTTP client: %v", err)
- }
- return newSupervisorRPCClient(u, httpClient)
-}
diff --git a/src/go/collectors/go.d.plugin/modules/supervisord/integrations/supervisor.md b/src/go/collectors/go.d.plugin/modules/supervisord/integrations/supervisor.md
deleted file mode 100644
index d701d95d05..0000000000
--- a/src/go/collectors/go.d.plugin/modules/supervisord/integrations/supervisor.md
+++ /dev/null
@@ -1,247 +0,0 @@
-<!--startmeta
-custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/collectors/go.d.plugin/modules/supervisord/README.md"
-meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/collectors/go.d.plugin/modules/supervisord/metadata.yaml"
-sidebar_label: "Supervisor"
-learn_status: "Published"
-learn_rel_path: "Collecting Metrics/Processes and System Services"
-most_popular: False
-message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
-endmeta-->
-
-# Supervisor
-
-
-<img src="https://netdata.cloud/img/supervisord.png" width="150"/>
-
-
-Plugin: go.d.plugin
-Module: supervisord
-
-<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
-
-## Overview
-
-This collector monitors Supervisor instances.
-
-It can collect metrics from:
-
-- [unix socket](http://supervisord.org/configuration.html?highlight=unix_http_server#unix-http-server-section-values)
-- [internal http server](http://supervisord.org/configuration.html?highlight=unix_http_server#inet-http-server-section-settings)
-
-Used methods:
-
-- [`supervisor.getAllProcessInfo`](http://supervisord.org/api.html#supervisor.rpcinterface.SupervisorNamespaceRPCInterface.getAllProcessInfo)
-
-
-
-
-This collector is supported on all platforms.
-
-This collector supports collecting metrics from multiple instances of this integration, including remote instances.
-
-
-### Default Behavior
-
-#### Auto-Detection
-
-This integration doesn't support auto-detection.
-
-#### Limits
-
-The default configuration for this integration does not impose any limits on data collection.
-
-#### Performance Impact
-
-The default configuration for this integration is not expected to impose a significant performance impact on the system.
-
-
-## Metrics
-
-Metrics grouped by *scope*.
-
-The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
-
-
-
-### Per Supervisor instance
-
-These metrics refer to the entire monitored application.
-
-This scope has no labels.
-
-Metrics:
-
-| Metric | Dimensions | Unit |
-|:------|:----------|:----|
-| supervisord.summary_processes | running, non-running | processes |
-
-### Per process group
-
-These metrics refer to the process group.
-
-This scope has no labels.
-
-Metrics:
-
-| Metric | Dimensions | Unit |
-|:------|:----------|:----|
-| supervisord.processes | running, non-running | processes |
-| supervisord.process_state_code | a dimension per process | code |
-| supervisord.process_exit_status | a dimension per process | exit status |
-| supervisord.process_uptime | a dimension per process | seconds |
-| supervisord.process_downtime | a dimension per process | seconds |
-
-
-
-## Alerts
-
-There are no alerts configured by default for this integration.
-
-
-## Setup
-
-### Prerequisites
-
-No action required.
-
-### Configuration
-
-#### File
-
-The configuration file name for this integration is `go.d/supervisord.conf`.
-
-
-You can edit the configuration file using the `edit-config` script from the
-Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).
-
-```bash
-cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
-sudo ./edit-config go.d/supervisord.conf
-```
-#### Options
-
-The following options can be defined globally: update_every, autodetection_retry.
-
-
-<details open><summary>Config options</summary>
-
-| Name | Description | Default | Required |
-|:----|:-----------|:-------|:--------:|
-| update_every | Data collection frequency. | 1 | no |
-| autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |
-| url | Server URL. | http://127.0.0.1:9001/RPC2 | yes |
-| timeout | System bus requests timeout. | 1 | no |
-
-</details>
-
-#### Examples
-
-##### HTTP
-
-Collect metrics via HTTP.
-
-<details open><summary>Config</summary>
-
-```yaml
-jobs:
- - name: local
- url: 'http://127.0.0.1:9001/RPC2'
-
-```
-</details>
-
-##### Socket
-
-Collect metrics via Unix socket.
-
-<details open><summary>Config</summary>
-
-```yaml
-- name: local
- url: 'unix:///run/supervisor.sock'
-
-```
-</details>
-
-##### Multi-instance
-
-> **Note**: When you define multiple jobs, their names must be unique.
-
-Collect metrics from local and remote instances.
-
-
-<details open><summary>Config</summary>
-
-```yaml
-jobs:
- - name: local
- url: 'http://127.0.0.1:9001/RPC2'
-
- - name: remote
- url: 'http://192.0.2.1:9001/RPC2'
-
-```
-</details>
-
-
-
-## Troubleshooting
-
-### Debug Mode
-
-To troubleshoot issues with the `supervisord` collector, run the `go.d.plugin` with the debug option enabled. The output
-should give you clues as to why the collector isn't working.
-
-- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
- your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
-
- ```bash
- cd /usr/libexec/netdata/plugins.d/
- ```
-
-- Switch to the `netdata` user.
-
- ```bash
- sudo -u netdata -s
- ```
-
-- Run the `go.d.plugin` to debug the collector:
-
- ```bash
- ./go.d.plugin -d -m supervisord
- ```
-
-### Getting Logs
-
-If you're encountering problems with the `supervisord` collector, follow these steps to retrieve logs and identify potential issues:
-
-- **Run the command** specific to your system (systemd, non-systemd, or Docker container).
-- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.
-
-#### System with systemd
-
-Use the following command to view logs generated since the last Netdata service restart:
-
-```bash
-journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep supervisord
-```
-
-#### System without systemd
-
-Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:
-
-```bash
-grep supervisord /var/log/netdata/collector.log
-```
-
-**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.
-
-#### Docker Container
-
-If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:
-
-```bash
-docker logs netdata 2>&1 | grep supervisord
-```
-
-
diff --git a/src/go/collectors/go.d.plugin/modules/supervisord/metadata.yaml b/src/go/collectors/go.d.plugin/modules/supervisord/metadata.yaml
deleted file mode 100644
index b5c81dd044..0000000000
--- a/src/go/collectors/go.d.plugin/modules/supervisord/metadata.yaml
+++ /dev/null
@@ -1,161 +0,0 @@
-plugin_name: go.d.plugin
-modules:
- - meta:
- id: collector-go.d.plugin-supervisord
- plugin_name: go.d.plugin
- module_name: supervisord
- monitored_instance:
- name: Supervisor
- link: http://supervisord.org/
- icon_filename: supervisord.png
- categories:
- - data-collection.processes-and-system-services
- keywords:
- - supervisor
- related_resources:
- integrations:
- list: []
- info_provided_to_referring_integrations:
- description: ""
- most_popular: false
- overview:
- data_collection:
- metrics_description: |
- This collector monitors Supervisor instances.
-
- It can collect metrics from:
-
- - [unix socket](http://supervisord.org/configuration.html?highlight=unix_http_server#unix-http-server-section-values)
- - [internal http server](http://supervisord.org/configuration.html?highlight=unix_http_server#inet-http-server-section-settings)
-
- Used methods:
-
- - [`supervisor.getAllProcessInfo`](http://supervisord.org/api.html#supervisor.rpcinterface.SupervisorNamespaceRPCInterface.getAllProcessInfo)
- method_description: ""
- supported_platforms:
- include: []
- exclude: []
- multi_instance: true
- additional_permissions:
- description: ""
- default_behavior:
- auto_detection:
- description: ""
- limits:
- description: ""
- performance_impact:
- description: ""
- setup:
- prerequisites:
- list: []
- configuration:
- file:
- name: go.d/supervisord.conf
- options:
- description: |
- The following options can be defined globally: update_every, autodetection_retry.
- folding:
- title: Config options
- enabled: true
- list:
- - name: update_every
- description: Data collection frequency.
- default_value: 1
- required: false
- - name: autodetection_retry
- description: Recheck interval in seconds. Zero means no recheck will be scheduled.
- default_value: 0
- required: false
- - name: url
- description: Server URL.
- default_value: http://127.0.0.1:9001/RPC2
- required: true
- - name: timeout
- description: System bus requests timeout.
- default_value: 1
- required: false
- examples:
- folding:
- title: Config
- enabled: true
- list:
- - name: HTTP
- description: Collect metrics via HTTP.
- config: |
- jobs:
- - name: local
- url: 'http://127.0.0.1:9001/RPC2'
- - name: Socket
- description: Collect metrics via Unix socket.
- config: |
- - name: local
- url: 'unix:///run/supervisor.sock'
- - name: Multi-instance
- description: |
- > **Note**: When you define multiple jobs, their names must be unique.
-
- Collect metrics from local and remote instances.
- config: |
- jobs:
- - name: local
- url: 'http://127.0.0.1:9001/RPC2'
-
- - name: remote
- url: 'http://192.0.2.1:9001/RPC2'
- troubleshooting:
- problems:
- list: []
- alerts: []
- metrics:
- folding:
- title: Metrics
- enabled: false
- description: ""
- availability: []
- scopes:
- - name: global
- description: These metrics refer to the entire monitored application.
- labels: []
- metrics:
- - name: supervisord.summary_processes
- description: Processes
- unit: processes
- chart_type: stacked
- dimensions:
- - name: running
- - name: non-running
- - name: process group
- description: These metrics refer to the process group.
- labels: []
- metrics:
- - name: supervisord.processes
- description: Processes
- unit: processes
- chart_type: stacked
- dimensions:
- - name: running
- - name: non-running
- - name: supervisord.process_state_code
- description: State code
- unit: code
- chart_type: line
- dimensions:
- - name: a dimension per process
- - name: supervisord.process_exit_status
- description: Exit status
- unit: exit status
- chart_type: line
- dimensions:
- - name: a dimension per process
- - name: supervisord.process_uptime
- description: Uptime
- unit: seconds
- chart_type: line
- dimensions:
- - name: a dimension per process
- - name: supervisord.process_downtime
- description: Downtime
- unit: seconds
- chart_type: line
- dimensions:
- - name: a dimension per process
diff --git a/src/go/collectors/go.d.plugin/modules/supervisord/supervisord.go b/src/go/collectors/go.d.plugin/modules/supervisord/supervisord.go
deleted file mode 100644
index 4c1bc8e848..0000000000
--- a/src/go/collectors/go.d.plugin/modules/supervi