diff options
Diffstat (limited to 'text_collector_examples')
-rwxr-xr-x | text_collector_examples/multipathd_info | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/text_collector_examples/multipathd_info b/text_collector_examples/multipathd_info new file mode 100755 index 0000000..cddbb2b --- /dev/null +++ b/text_collector_examples/multipathd_info | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Description: Expose device mapper multipathing metrics from multipathd. | ||
4 | # | ||
5 | # Author: Saket Sinha <saket.sinha@cloud.ionos.com> | ||
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"}}' | ||