aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/ctlstat/ctlstat.8
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2021-04-21 22:56:48 +0000
committerAlan Somers <asomers@FreeBSD.org>2022-04-20 21:18:41 +0000
commit1a7f22d9c211f504f6c48a86401469181a67ec34 (patch)
tree55127de732b740151b8eb322023b030b2fd5720f /usr.bin/ctlstat/ctlstat.8
parentb9e5884ef786a6c0fd203064baa07ef308025707 (diff)
downloadsrc-1a7f22d9c211f504f6c48a86401469181a67ec34.tar.gz
src-1a7f22d9c211f504f6c48a86401469181a67ec34.zip
ctlstat: add prometheus output
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 Relnotes: yes Reviewed by: bapt, bcr Differential Revision: https://reviews.freebsd.org/D29901
Diffstat (limited to 'usr.bin/ctlstat/ctlstat.8')
-rw-r--r--usr.bin/ctlstat/ctlstat.824
1 files changed, 22 insertions, 2 deletions
diff --git a/usr.bin/ctlstat/ctlstat.8 b/usr.bin/ctlstat/ctlstat.8
index 28e6d6fd1462..2512803f798a 100644
--- a/usr.bin/ctlstat/ctlstat.8
+++ b/usr.bin/ctlstat/ctlstat.8
@@ -34,7 +34,7 @@
.\" $Id: //depot/users/kenm/FreeBSD-test2/usr.bin/ctlstat/ctlstat.8#2 $
.\" $FreeBSD$
.\"
-.Dd January 9, 2017
+.Dd April 22, 2021
.Dt CTLSTAT 8
.Os
.Sh NAME
@@ -48,6 +48,7 @@
.Op Fl d
.Op Fl D
.Op Fl j
+.Op Fl P
.Op Fl l Ar lun
.Op Fl n Ar numdevs
.Op Fl p Ar port
@@ -83,6 +84,19 @@ Suppress display of the header.
JSON dump mode.
Dump statistics every 30 seconds in JavaScript Object Notation (JSON) format.
No statistics are computed in this mode, only raw numbers are displayed.
+.It Fl P
+Prometheus dump mode.
+Dump statistics in a format suitable for ingestion into Prometheus.
+When invoked with this option,
+.Nm
+dumps once, regardless of the
+.Fl t
+option.
+This option is especially useful when invoked by
+.Xr inetd 8 .
+See the comments in
+.Pa /etc/inetd.conf
+for an example configuration.
.It Fl l Ar lun
Request statistics for the specified LUN.
.It Fl n Ar numdevs
@@ -116,7 +130,13 @@ every 10 seconds.
.Xr camcontrol 8 ,
.Xr ctladm 8 ,
.Xr ctld 8 ,
-.Xr iostat 8
+.Xr iostat 8 ,
+.Lk
+Prometheus project:
+.Pa https://prometheus.io/ .
+.Pp
+Prometheus exposition formats:
+.Lk https://prometheus.io/docs/instrumenting/exposition_formats/ .
.Sh AUTHORS
.An Ken Merry Aq Mt ken@FreeBSD.org
.An Will Andrews Aq Mt will@FreeBSD.org