From f148179ef78c717c79904b7bd2b0598d7c6392ac Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Sat, 10 Oct 2015 17:05:04 +0100 Subject: [PATCH] consoles: Escape regexes. With the new string handling, some regexes need escaping. --- consoles/node-disk.html | 2 +- consoles/node-overview.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/consoles/node-disk.html b/consoles/node-disk.html index eec9204a7..c27886b85 100644 --- a/consoles/node-disk.html +++ b/consoles/node-disk.html @@ -46,7 +46,7 @@ new PromConsole.Graph({ node: document.querySelector("#diskioGraph"), expr: [ - "irate(node_disk_io_time_ms{job='node',instance='{{ .Params.instance }}',device!~'^(md\\d+$|dm-)'}[5m]) / 1000 * 100", + "irate(node_disk_io_time_ms{job='node',instance='{{ .Params.instance }}',device!~'^(md\\\\d+$|dm-)'}[5m]) / 1000 * 100", ], min: 0, name: '[[ device ]]', diff --git a/consoles/node-overview.html b/consoles/node-overview.html index 71608b147..550c267f2 100644 --- a/consoles/node-overview.html +++ b/consoles/node-overview.html @@ -35,7 +35,7 @@ Disks -{{ range printf "node_disk_io_time_ms{job='node',instance='%s',device!~'^(md\\d+$|dm-)'}" .Params.instance | query | sortByLabel "device" }} +{{ range printf "node_disk_io_time_ms{job='node',instance='%s',device!~'^(md\\\\d+$|dm-)'}" .Params.instance | query | sortByLabel "device" }} {{ .Labels.device }} Utilization {{ template "prom_query_drilldown" (args (printf "irate(node_disk_io_time_ms{job='node',instance='%s',device='%s'}[5m]) / 1000 * 100" .Labels.instance .Labels.device) "%" "printf.1f") }} @@ -85,7 +85,7 @@ new PromConsole.Graph({ node: document.querySelector("#diskioGraph"), expr: [ - "irate(node_disk_io_time_ms{job='node',instance='{{ .Params.instance }}',device!~'^(md\\d+$|dm-)'}[5m]) / 1000 * 100", + "irate(node_disk_io_time_ms{job='node',instance='{{ .Params.instance }}',device!~'^(md\\\\d+$|dm-)'}[5m]) / 1000 * 100", ], min: 0, name: '[[ device ]]',