Giter VIP home page Giter VIP logo

collectd-openrc's Introduction

Collectd plugin for OpenRC

A collectd plugin that collects information about OpenRC services.

Usage

LoadPlugin openrc

<Plugin openrc>
  LogLevel notice
</Plugin>

Parameters

LogLevel

Sets the logging level for this plugin. If, for example, set to notice, then all messages with severity notice, warning, or err will be passed to the collectd logger.
Since the debug level is no-op in collectd, unless it was compiled with --enable-debug, this plugin uses the info level for debug messages.

Allowed values: info | notice | warning | err
Default: notice

Metrics

This section describes exposed metrics (values).

openrc.services-<state>

Services in state <state>:

  • started — started services regardless of the runlevel (i.e. includes even manually started and hot-plugged services)

  • crashed — crashed (unsupervised) and failed (supervised) services regardless of the runlevel

  • stopped — stopped services that are in any runlevel other than shutdown

The value of the metric is the number of services, the metadata contains a list of them. The states are mutually exclusive, i.e. one service can be in one or no state.

  • type: GAUGE (min: 0, max: inf.)

  • metadata:

    • services (string) — a JSON array of objects with the following keys:

      • n (string): service name

Requirements

Runtime:
Build:
  • C compiler and linker supporting at least C11 (tested with gcc)

  • pkg-config

  • GNU Make

  • OpenRC development files

  • json-c development files

  • collectd development files

The header files needed to build collectd plugins are usually not included in the distribution packages. Exceptions are collectd-dev packages in Alpine Linux (since v3.16) and Debian – the core headers are installed in /usr/include/collectd/core. If you don’t have /usr/include/collectd/core/daemon/plugin.h, download the collectd source package from collectd.org. Then build this plugin with variable COLLECTD_INCLUDE_DIR pointing to the unpacked src/ directory: make build COLLECTD_INCLUDE_DIR=/path/to/src.

Installation

On Alpine Linux

Install package collectd-openrc-plugin from the Alpine’s Edge testing repository:

apk add collectd-openrc-plugin

From Source Tarball

wget https://github.com/jirutka/collectd-openrc/archive/v0.2.1/collectd-openrc-0.2.1.tar.gz
tar -xzf collectd-openrc-0.2.1.tar.gz
cd collectd-openrc-0.2.1

make build
make install DESTDIR=/ prefix=/usr

License

This project is licensed under GPL-2.0-or-later. For the full text of the license, see the LICENSE file.

collectd-openrc's People

Contributors

jirutka avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.