Commit graph

19 commits

Author SHA1 Message Date
Leigh Phillips
fe3cf90612
Create dishStatusInflux_cron.py 2021-01-08 22:27:54 -08:00
Leigh Phillips
49cdcaa18c
Create Dockerfile 2021-01-08 22:26:52 -08:00
sparky8512
0ee39f61fd Small change to the interface between parser and calling scripts
Move the "samples" stat out of the ping drop group of stats and into a new general stats group.

This way, it  will make more sense if/when additional stat groups are added, since that stat will apply to all of them.
2021-01-08 19:17:34 -08:00
sparky8512
96b7634a3d
Merge pull request #4 from sparky8512/working
Mostly cosmetic cleanups and module reorganization
2021-01-06 11:59:24 -08:00
sparky8512
170dd2daae Reorganize history parsing logic into a separate module
Moves the parsing logic that will be shared by some upcoming scripts out into a separate module.

There's still just as much duplication between the JSON parser and the grpc parser as there was before, but this should at least prevent further duplication of this logic.

This also adds some proper documentation for what each of the stats means.
2021-01-06 11:46:50 -08:00
sparky8512
d165791559 Readability improvements (or so PEP 8 style guide claims...) 2021-01-06 10:12:56 -08:00
sparky8512
a5036db9e0 Don't allow a sample to be both unscheduled and obstructed
Doesn't ever seem to happen, but in case it does in the future, treat that case as just unscheduled. This way, the unclassified ping loss (AKA "Beta downtime") can be computed from the totals.
2020-12-30 13:09:24 -08:00
sparky8512
4ff6cfb5fa Fix line endings to be consistent with the other scripts 2020-12-30 13:01:41 -08:00
sparky8512
5c762e754b
Merge pull request #3 from sparky8512/working
Add scripts for status output to CSV, InfluxDB, and MQTT
2020-12-30 11:57:05 -08:00
sparky8512
f206a3ad91 Add a short blurb for the recently added scripts 2020-12-30 11:47:03 -08:00
sparky8512
e1a4c473c8 Handle errors on the gRPC connection
Also, actually do the thing I said I was doing in the prior checkin by writing state as a string instead of integer.

And a bit more cleanup.
2020-12-30 10:17:02 -08:00
sparky8512
61e9abf7d4 Add header comments and update README
Also, add a timestamp to the CSV output, similar to what is in the get_history equivalent.
2020-12-29 20:45:30 -08:00
sparky8512
c313134ba1
Scripts for CSV, InfluxDB, MQTT get_status output
Initial support for dumping status info in CSV format or to InfuxDB or MQTT servers.

InfluxDB script is largely what Equinox- posted into issue #2, but with a few things renamed, and the state info being recorded as a string of the enum value name, rather than the (integer) enum value.

All of these need header comments still and some need a bit more options handling, cleanup, and error handling.
2020-12-29 19:21:00 -08:00
sparky8512
f0aa1fe8dc Add (optional) run length stats
Add reporting of ping drop runs per length of run. Useful(?) for characterizing how long a typical "outage" is.
2020-12-24 14:58:28 -08:00
sparky8512
04b25d2da5
More example usage, commented out 2020-12-23 07:25:30 -08:00
sparky8512
d384481e46
Last of initial set of scripts 2020-12-22 20:16:33 -08:00
sparky8512
8d3aadad41
Fill out the README 2020-12-22 20:05:25 -08:00
sparky8512
a0f4ed2595
Initial upload of history parser and notes file 2020-12-22 15:51:37 -08:00
sparky8512
33e14d2073
Initial commit 2020-12-22 14:40:56 -08:00