diff options
author | ssinha-ionos <51702740+ssinha-ionos@users.noreply.github.com> | 2019-06-25 11:02:02 +0200 |
---|---|---|
committer | Johannes 'fish' Ziemke <github@freigeist.org> | 2019-06-25 11:02:02 +0200 |
commit | e972e38b423632a4f45326bd33eb127a4935f1f6 (patch) | |
tree | 2f5b2fab648fbc1cc948d9aa4c203c140458daae /text_collector_examples | |
parent | 3108a50fb63500813cc13767f4e7fb2ae18b8b4a (diff) | |
download | prometheus_node_collector-e972e38b423632a4f45326bd33eb127a4935f1f6.tar.bz2 prometheus_node_collector-e972e38b423632a4f45326bd33eb127a4935f1f6.tar.xz prometheus_node_collector-e972e38b423632a4f45326bd33eb127a4935f1f6.zip |
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 <saket.sinha@cloud.ionos.com>
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"}}' | ||