Python based monitoring for AFS
Go to file
Clark Boylan 4fd41a7033 Update afsmon python testing to modern versions
We run this tool primarily on our mirror-update nodes which are
currently Focal with python3.8. We want to drop the python35 testing so
that we can clean up our Xenial test nodes. Update afsmon's testing to
more closely match the current production environment and potential
future environments while also dropping python35 on Xenial jobs.

Small changes are made to fix a string escapes warning and a use of mock
error when running flake8.

Change-Id: Id509936bf9eb200fc92dcaa06a18c1a79ef13e2c
2024-04-29 14:43:26 -07:00
afsmon Update afsmon python testing to modern versions 2024-04-29 14:43:26 -07:00
.gitignore Initial framework 2018-05-31 19:40:44 +10:00
.gitreview OpenDev Migration Patch 2019-04-19 19:26:08 +00:00
.stestr.conf Add statsd reporter and test 2018-06-01 14:25:22 +10:00
.zuul.yaml Update afsmon python testing to modern versions 2024-04-29 14:43:26 -07:00
bindep.txt Add empty bindep.txt 2018-06-08 12:50:09 +10:00
LICENSE Initial commit 2018-05-31 10:40:51 +10:00
MANIFEST.in Initial code motion 2018-06-01 08:40:03 +10:00
README.rst README.rst formatting fixes 2018-06-05 11:54:12 +10:00
requirements.txt Remove Babel requirement 2020-02-12 11:46:58 +11:00
sample.cfg Add some config options 2018-06-05 11:54:37 +10:00
setup.cfg Update afsmon python testing to modern versions 2024-04-29 14:43:26 -07:00
setup.py Initial framework 2018-05-31 11:02:11 +10:00
test-requirements.txt Initial framework 2018-05-31 11:02:11 +10:00
tox.ini Initial framework 2018-05-31 11:02:11 +10:00

afsmon

Python library and utilities for monitoring AFS file-systems using OpenAFS tools.

Many of the details are inspired by https://github.com/openafs-contrib/afs-tools

Command-line

The afsmon tool provides

  • show : produce tabular output of key statistics for a cell, such as threads on file-servers, partition usage, volume usage and quotas.
  • statsd : report similar results to a statsd host.

Configuration is minimal, see the sample.cfg.

Library

The core of afsmon should suitable for use in other contexts.

import afsmon
fs = afsmon.FileServerStats('hostname')
fs.get_stats()

The fs object now contains a FileServerStats with all available information for the server, partitions and volumes.