Skip to content

Commit d2f2b0e

Browse files
ssinha-ionosdiscordianfish
authored andcommitted
Add mulitipathd_info text collector example (#1375)
multipathd_info is a script that exposes device mapper multipathing metrics from multipathd daemon. Signed-off-by: Saket Sinha <[email protected]>
1 parent 5050794 commit d2f2b0e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

multipathd_info

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
#
3+
# Description: Expose device mapper multipathing metrics from multipathd.
4+
#
5+
# Author: Saket Sinha <[email protected]>
6+
7+
echo '# HELP node_dmpath_info State info for dev-mapper path'
8+
echo '# TYPE node_dmpath_info gauge'
9+
/sbin/multipathd show paths format '%d %t %T' | /usr/bin/awk '{ if ( NR > 1) {print "node_dmpath_info{device=\""$1"\"," "dm_path_state=\""$2"\"," "path_state=\""$3"\"}" " 1"}}'

0 commit comments

Comments
 (0)