supervisord

package
v0.55.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2023 License: GPL-3.0 Imports: 11 Imported by: 1

README

Supervisord collector

Overview

Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.

This collector monitors one or more Supervisor instances, depending on your configuration.

It can collect metrics from both unix socket and internal http server

Used methods:

Collected 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.

global

These metrics refer to the entire monitored application.

This scope has no labels.

Metrics:

Metric Dimensions Unit
supervisord.summary_processes running, non-running processes
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

Setup

Prerequisites

No action required.

Configuration
File

The configuration file name is go.d/supervisord.conf.

The file format is YAML. Generally, the format is:

update_every: 1
autodetection_retry: 0
jobs:
  - name: some_name1
  - name: some_name1

You can edit the configuration file using the edit-config script from the Netdata config directory.

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.

Config options
Name Description Default Required
update_every Data collection frequency. 1
autodetection_retry Re-check interval in seconds. Zero means not to schedule re-check. 0
url Server URL. http://127.0.0.1:9001/RPC2 yes
timeout System bus requests timeout. 1
Examples
HTTP

Collect metrics via HTTP.

Config
jobs:
  - name: local
    url: 'http://127.0.0.1:9001/RPC2'
Socket

Collect metrics via Unix socket.

Config
- name: local
  url: 'unix:///run/supervisor.sock'
Multi-instance

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

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].

    cd /usr/libexec/netdata/plugins.d/
    
  • Switch to the netdata user.

    sudo -u netdata -s
    
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m supervisord
    

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL        string `yaml:"url"`
	web.Client `yaml:",inline"`
}

type Supervisord

type Supervisord struct {
	module.Base
	Config `yaml:",inline"`
	// contains filtered or unexported fields
}

func New

func New() *Supervisord

func (*Supervisord) Charts

func (s *Supervisord) Charts() *module.Charts

func (*Supervisord) Check

func (s *Supervisord) Check() bool

func (*Supervisord) Cleanup

func (s *Supervisord) Cleanup()

func (*Supervisord) Collect

func (s *Supervisord) Collect() map[string]int64

func (*Supervisord) Init

func (s *Supervisord) Init() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL