Page MenuHomeFreeBSD

ctlstat: add prometheus output
ClosedPublic

Authored by asomers on Apr 21 2021, 11:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 13 2024, 9:51 PM
Unknown Object (File)
Dec 26 2023, 12:54 PM
Unknown Object (File)
Dec 20 2023, 3:28 AM
Unknown Object (File)
Dec 12 2023, 2:48 PM
Unknown Object (File)
Nov 8 2023, 6:27 PM
Unknown Object (File)
Nov 8 2023, 11:00 AM
Unknown Object (File)
Nov 7 2023, 8:37 AM
Unknown Object (File)
Nov 3 2023, 3:54 PM
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38813
Build 35702: arc lint + arc unit

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.