Skip to content

Commit

Permalink
Add mulitipathd_info text collector example (#1375)
Browse files Browse the repository at this point in the history
multipathd_info is a script that exposes device mapper multipathing
metrics from multipathd daemon.

Signed-off-by: Saket Sinha <[email protected]>
  • Loading branch information
ssinha-ionos authored and discordianfish committed Jun 25, 2019
1 parent 3108a50 commit e972e38
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions text_collector_examples/multipathd_info
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
#
# Description: Expose device mapper multipathing metrics from multipathd.
#
# Author: Saket Sinha <[email protected]>

echo '# HELP node_dmpath_info State info for dev-mapper path'
echo '# TYPE node_dmpath_info gauge'
/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 comments on commit e972e38

Please sign in to comment.