mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-01-01 00:47:30 -08:00
10 lines
417 B
Plaintext
10 lines
417 B
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
# Description: Expose device mapper multipathing metrics from multipathd.
|
||
|
#
|
||
|
# Author: Saket Sinha <saket.sinha@cloud.ionos.com>
|
||
|
|
||
|
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"}}'
|