1
0
Fork 0
Commit Graph

6 Commits (master)

Author SHA1 Message Date
Mike Gerwitz d511fa8d17
prom.awk: Correct regex escape
I'm not confident this ever worked as intended.  Unless behavior in
newer Gawks changed (since now it is issuing a warning where it wasn't
previously).

This replaced double quotes with '0'..which certainly solves the
security problem of double quotes, but not in the intended way.  I have
no labels with double quotes and so never noticed.

I suspect that I tried using // delimiters to avoid having to go through
this escape mess ("\\\\" to produce "\\" which is recogniezd as a single
"\" in the replacement, and then a fifth to escape the double quote.
What a mess.
2023-12-31 16:33:21 -05:00
Mike Gerwitz 16108f0c2e
printer/epson/et-2720/metrics: Add serial number
Distinguish between two printers of the same model without having to
rely on URL, which can change over time.
2021-06-24 21:53:14 -04:00
Mike Gerwitz 0ec4219d91
Increase *_scrape_duration resolution to ms
May want to clean this up at some point.  Note that Bash doesn't have
floating point arithmetic support in `(())`.
2021-06-15 23:48:12 -04:00
Mike Gerwitz 3142db006a
x509/expiry: Add script 2021-06-15 23:19:24 -04:00
Mike Gerwitz 9c7961bb5c
prom.awk: New basic library
This introduces the beginning of a very basic library for generating
Prometheus metrics with GNU Awk.  It is not intended to be complete, and
it'll evolve as I need it to.

At the moment, there are no tests, because manual verification is
trivial and I'm not yet sure how far I'll be going with this.  If it
evolves much further, though, I'll be adding a test suite.
2021-03-01 21:56:30 -05:00
Mike Gerwitz a3e4bc22c6
Epson ET-2720 metrics 2021-02-23 00:16:42 -05:00