You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Enno Richter b74982ad59 replace convert-numeric with metric_type_cache 1 year ago
configs add user-configurable metric-name-to-tag 2 years ago
deps rewrite using Telegraf socket listener 2 years ago
docs add systemd unit file 2 years ago
gmondflux replace convert-numeric with metric_type_cache 1 year ago
tests replace convert-numeric with metric_type_cache 1 year ago
.envrc black 3 years ago
.gitignore update gitignore 2 years ago
README.md pytest config 1 year ago
pyenv.nix add convert-numeric option 1 year ago
pytest.ini pytest config 1 year ago
shell.nix add convert-numeric option 1 year ago

README.md

gmondflux

Gmondflux gmond UDP packet receiver.

Compability

Target Platform is Python 3.4 (SLES 12).

Configuration

Define tags to extract from the gmond metric name inside config/gmondflux.json and pass it to gmondflux.py. The key-value-pairs will be passed to Pythons re.sub()-function. The first matching expression will be used.

example:

r"^(?P<hdisk>hdisk\d+)(.*)$" : r"hdisk\2"
hdisk0_max_wserv -> disk_max_wserv
{'disk': 'hdisk0'}

Manual testing

  1. Start Telegraf Socket Listener using telegraf --config configs/telegraf.conf.
  2. Start gmondflux using ./gmondflux/gmondflux.py -t telegraf.sock.
  3. Send metrics using gmetric -c configs/gmetric.conf -n my_metric -t string -v abc.
  4. The metric should be displayed on STDOUT of the Telegraf process.

Run automated tests

Execute pytest --show-capture=no to run the automated tests. To run this tests, make sure gmetric is in your PATH, e.g. by using the provided nix-shell environment.