Page MenuHomeFreeBSD

ctlstat: add prometheus output
ClosedPublic

Authored by asomers on Apr 21 2021, 11:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 5:14 AM
Unknown Object (File)
Nov 19 2024, 1:35 AM
Unknown Object (File)
Nov 18 2024, 7:24 PM
Unknown Object (File)
Nov 17 2024, 10:00 AM
Unknown Object (File)
Oct 21 2024, 1:34 PM
Unknown Object (File)
Oct 21 2024, 7:35 AM
Unknown Object (File)
Oct 20 2024, 1:31 PM
Unknown Object (File)
Oct 3 2024, 9:29 AM
Subscribers

Details

Summary

When invoked by inetd, ctlstat -P will now produce output suitable for
ingestion into Prometheus.

It's a drop-in replacement for https://github.com/Gandi/ctld_exporter,
except that it doesn't report the number of initiators per target, and
it does report time and dma_time.

MFC after: 2 weeks
Sponsored by: Axcient

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

0mp requested changes to this revision.Apr 22 2021, 6:12 AM
0mp added a subscriber: 0mp.

I've got some minor fixes for the manual page.

Also, just an idea: shouldn't we extend libxo with Prometheus support? This way we would have a consistent way of printing this format across various utilities without having to introduce a different flag for each one.

usr.bin/ctlstat/ctlstat.8
90
136
139
This revision now requires changes to proceed.Apr 22 2021, 6:12 AM
asomers marked 2 inline comments as done.
  • Respond to 0mp's man page review
In D29901#671164, @0mp wrote:

I've got some minor fixes for the manual page.

Also, just an idea: shouldn't we extend libxo with Prometheus support? This way we would have a consistent way of printing this format across various utilities without having to introduce a different flag for each one.

That's an interesting idea. I hadn't thought of it. The only problems are that I'm not very familiar with libxo's workings, and ctlstat doesn't support libxo anyway. I admit, I'm not thrilled about the idea of repeating all of this work. But it might be worthwhile. Do you know libxo? What would your proposal entail?

Note: prometheus output is quite specific, I am not sure it is worth trying to add libxo to the party. Having a half backed conversion to libxo just to cover prom sounds weird to me.

bcr added a subscriber: bcr.

Manpage looks good now.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 20 2022, 9:20 PM
This revision was automatically updated to reflect the committed changes.