Utilities for writing munin client scripts
This package provides base classes for defining Munin graphs and a main function to handle munin-typical symlinked scripts.
Munin plugin scripts
A single plugin file defines (multiple) graphs by subclassing the bases as mentioned in the next section. The main function uses the called script’s filename to determine which of the defined graphs is relevant.
Data for each graph is determined by retrieving a text file from a URL (with possibly given basic authentication data).
The format for the data is plain/text wich each line having key/value pairs split by ‘:’. The values are expected to be floats.
All graph bases expect two environment variables to be set:
- URL
The URL at which to retrieve data from. Must include a ‘%s’ which encodes the graph name.
- AUTH
HTTP basic authentication information. Either empty or in the form of ‘username:password’.
The environment variables can be configured using munin’s plugin-conf.d like this:
The plugin is called prefix_something_1:
[prefix_*] env.URL http://foo:8900/myapp/munin?data=%s env.AUTH admin:admin
Graph bases
The following base classes are currently defined:
- SimpleGraph
A simple graph with a single value that is plotted as an absolute value.
- SimpleMultiGraph
Multiple absolute values plotted on the same graph and scale.
more bases will be added as needed.
Main function
The main function handles munin-typical type_option_index symlink scripts by looking at the name from which the main script was called.
Example script
Here’s a sample script that you could symlink into the plugins directory:
from gocept.munin.client import SimpleGraph, main
class people(SimpleGraph):
name = key = 'people'
title = 'How many people are there?'
category = 'Office'
main()
Metadata
Release files for gocept.munin 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gocept.munin-0.1.tar.gz | 3.3 kB | Without provenance | Details for gocept.munin-0.1.tar.gz |
Release files / gocept.munin-0.1.tar.gz
| Download URL | gocept.munin-0.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d75aff906d5429bc2222a8d9cfbaf31c149bb24a6cd425fb96b7a5a9dc3a9ee2
|
|
BLAKE2b-256 checksum How to use checksums |
b5a7846c129e8769088fc294cb7c06b434c56baeb9c1ca52b2d10eaa9a6a37bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for gocept.munin 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.