Commit Graph

13 Commits

Author SHA1 Message Date
Ian Wienand dcc872442f flake8 regex fixes
Prefix strings with regex escapes with "r"

Change-Id: I1dcbaa9947a693992e560ca258469b8cbcfcfec3
2020-02-12 11:46:58 +11:00
Ian Wienand 618e1833e1 Handle backup volumes
Backup volumes appear in the "vol listvol" with a "BK" status, which
broke our existing match which only handles RO/RW volumes.

Add matching for this, and a basic unit test for parsing of this
output.

Change-Id: I1b3e985f79977981b2f0d3e3d3823d99f7cf3626
2018-10-10 17:18:57 +11:00
Ian Wienand bf39628920 Add timestamps to debug messages
Useful in log files to see when things are running

Change-Id: Ie19faf9dd0bab8545f96a2977f37c7387823e24c
2018-06-13 05:55:23 +10:00
Ian Wienand 494a12801b Remove accidental debug print
Change-Id: I0acd19c539e0d06be8081f46beb88209a8638640
2018-06-12 14:45:00 +10:00
Ian Wienand 1b0b447d51 Add creation date, report RO volumes
After discussion, the best way to see if volumes are being released is
 to check the creation date.

This adds the creation date to reported volume stats, and also starts
reporting RO volumes by default too (skipping them was a theory to
reduce output, but they are important for seeing how releases are
working).

The creation date is reported in statsd with a unix timestamp gauge

Change-Id: I3feb4eac26bf1eb7196531b2d01029d28417e162
2018-06-08 13:15:49 +10:00
Ian Wienand cacf936df8 Add some config options
Add a fileservers option (which extends the cell list if specified).

Add debug option to config file

Better handle all config variables and better document the sample
config file.
2018-06-05 11:54:37 +10:00
Ian Wienand 2bb567c24e Allow default statsd values
Show the defaults in the debug log if nothing is specified
2018-06-05 11:05:00 +10:00
Ian Wienand 26a7a2c827 Use statsd pipeline
With a few volumes, stats tend to go missing as there's a big flood of
individual packets.  Use the statsd pipeline which is meant for this
sort of batch reporting.

Test-case is updated to handle the batched messages which are
delineated by newlines.
2018-06-05 09:58:52 +10:00
Ian Wienand 9d29fbb8b7 Fail early when no command given 2018-06-01 15:46:56 +10:00
Ian Wienand 5bc5403d6d Revert to pre-3.6 regex group matching 2018-06-01 15:43:07 +10:00
Ian Wienand a7122e2a2d pep8 fixes 2018-06-01 14:36:23 +10:00
Ian Wienand 719425d9f2 Add statsd reporter and test 2018-06-01 14:25:22 +10:00
Ian Wienand 8a1eb3901b Initial code motion
Rename things to just afsmon, and split out cmd from library.
2018-06-01 08:40:03 +10:00