From e3c375b9b055e353e4662c8d26e82c2f848e19d4 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Fri, 23 Jan 2015 17:40:48 +0000 Subject: [PATCH] Add consoles for haproxy and cloudwatch. Only display jobs in the LHS if they're present. --- console_libraries/menu.lib | 59 +++++++++++++++++++-- console_libraries/prom.lib | 46 ++++++++-------- consoles/aws_elasticache.html | 45 ++++++++++++++++ consoles/aws_elb.html | 46 ++++++++++++++++ consoles/aws_redshift-cluster.html | 83 +++++++++++++++++++++++++++++ consoles/aws_redshift.html | 28 ++++++++++ consoles/cloudwatch.html | 19 +++++++ consoles/haproxy-backend.html | 58 +++++++++++++++++++++ consoles/haproxy-backends.html | 29 +++++++++++ consoles/haproxy-frontend.html | 45 ++++++++++++++++ consoles/haproxy-frontends.html | 25 +++++++++ consoles/haproxy.html | 84 ++++++++++++++++++++++++++++++ consoles/index.html.example | 31 +++++++++-- consoles/node-cpu.html | 18 +++---- consoles/node-disk.html | 22 ++++---- consoles/node-overview.html | 38 +++++++------- consoles/node.html | 12 ++--- 17 files changed, 612 insertions(+), 76 deletions(-) create mode 100644 consoles/aws_elasticache.html create mode 100644 consoles/aws_elb.html create mode 100644 consoles/aws_redshift-cluster.html create mode 100644 consoles/aws_redshift.html create mode 100644 consoles/cloudwatch.html create mode 100644 consoles/haproxy-backend.html create mode 100644 consoles/haproxy-backends.html create mode 100644 consoles/haproxy-frontend.html create mode 100644 consoles/haproxy-frontends.html create mode 100644 consoles/haproxy.html diff --git a/console_libraries/menu.lib b/console_libraries/menu.lib index 4abfd3b44..cd12e993a 100644 --- a/console_libraries/menu.lib +++ b/console_libraries/menu.lib @@ -30,26 +30,79 @@
{{ end }} diff --git a/console_libraries/prom.lib b/console_libraries/prom.lib index 34f3c1a0c..32d1f2864 100644 --- a/console_libraries/prom.lib +++ b/console_libraries/prom.lib @@ -1,6 +1,6 @@ {{/* vim: set ft=html: */}} {{/* Load Prometheus console library JS/CSS. Should go in */}} -{{define "prom_console_head"}} +{{ define "prom_console_head" }} @@ -10,18 +10,18 @@ -{{end}} +{{ end }} {{/* Top of all pages. */}} -{{define "head"}} +{{ define "head" }} -{{template "prom_console_head"}} +{{ template "prom_console_head" }} -{{template "navbar" .}} -{{template "menu" .}} -{{end}} +{{ template "navbar" . }} +{{ template "menu" . }} +{{ end }} {{ define "__prom_query_drilldown_noop" }}{{ . }}{{ end }} {{ define "humanize" }}{{ humanize . }}{{ end }} @@ -36,33 +36,33 @@ Displays the result of the expression, with a link to /graph for it. renderTemplate is the name of the template to use to render the value. */}} {{ define "prom_query_drilldown" }} -{{ $expr := .arg0}}{{ $suffix := (or .arg1 "")}}{{ $renderTemplate := (or .arg2 "__prom_query_drilldown_noop")}} -{{ with query $expr }}{{tmpl $renderTemplate ( . | first | value )}}{{ $suffix }}{{else}}-{{ end }} +{{ $expr := .arg0 }}{{ $suffix := (or .arg1 "")}}{{ $renderTemplate := (or .arg2 "__prom_query_drilldown_noop")}} +{{ with query $expr }}{{ tmpl $renderTemplate ( . | first | value ) }}{{ $suffix }}{{else}}-{{ end }} {{ end }} -{{ define "prom_path" }}/consoles/{{.Path}}?{{range $param, $value := .Params}}{{$param}}={{$value}}&{{end}}{{ end }}" +{{ define "prom_path" }}/consoles/{{ .Path }}?{{range $param, $value := .Params}}{{$param}}={{$value}}&{{end}}{{ end }}" -{{define "prom_right_table_head"}} +{{ define "prom_right_table_head" }}
-{{end}} -{{define "prom_right_table_tail"}} +{{ end }} +{{ define "prom_right_table_tail" }}
-{{end}} +{{ end }} -{{define "prom_content_head"}} +{{ define "prom_content_head" }}
-{{template "prom_graph_timecontrol" .}} -{{end}} -{{define "prom_content_tail"}} +{{ template "prom_graph_timecontrol" . }} +{{ end }} +{{ define "prom_content_tail" }}
-{{end}} +{{ end }} -{{define "prom_graph_timecontrol"}} +{{ define "prom_graph_timecontrol" }}
@@ -104,10 +104,10 @@ renderTemplate is the name of the template to use to render the value. new PromConsole.TimeControl();
-{{end}} +{{ end }} {{/* Bottom of all pages. */}} -{{define "tail"}} +{{ define "tail" }} -{{end}} +{{ end }} diff --git a/consoles/aws_elasticache.html b/consoles/aws_elasticache.html new file mode 100644 index 000000000..c1b403a6b --- /dev/null +++ b/consoles/aws_elasticache.html @@ -0,0 +1,45 @@ +{{ template "head" . }} + +{{ template "prom_right_table_head" }} +{{ range printf "sum by (cache_cluster_id)(aws_elasticache_cpuutilization_average{job='aws_elasticache'})" | query | sortByLabel "cache_cluster_id" }} + + {{ .Labels.cache_cluster_id }} + + + CPU + {{ template "prom_query_drilldown" (args (printf "aws_elasticache_cpuutilization_average{job='aws_elasticache',cache_cluster_id='%s'}" .Labels.cache_cluster_id) "%" "printf.3g") }} + + + Cache Size + {{ template "prom_query_drilldown" (args (printf "aws_elasticache_bytes_used_for_cache_average{job='aws_elasticache',cache_cluster_id='%s'}" .Labels.cache_cluster_id) "B" "humanize1024") }} + + + Cache Items + {{ template "prom_query_drilldown" (args (printf "aws_elasticache_curr_items_average{job='aws_elasticache',cache_cluster_id='%s'}" .Labels.cache_cluster_id) "" "humanize") }} + + + Freeable Memory + {{ template "prom_query_drilldown" (args (printf "aws_elasticache_freeable_memory_average{job='aws_elasticache',cache_cluster_id='%s'}" .Labels.cache_cluster_id) "B" "humanize1024") }} + +{{ end }} +{{ template "prom_right_table_tail" }} + +{{ template "prom_content_head" . }} +

AWS ElastiCache

+{{ template "prom_content_tail" . }} + +

CPU

+
+ + +{{ template "tail" }} diff --git a/consoles/aws_elb.html b/consoles/aws_elb.html new file mode 100644 index 000000000..f0e88335e --- /dev/null +++ b/consoles/aws_elb.html @@ -0,0 +1,46 @@ +{{ template "head" . }} + +{{ template "prom_right_table_head" }} +{{ range query "sum by (load_balancer_name)(aws_elb_healthy_host_count_average{job='aws_elb'})" | sortByLabel "load_balancer_name" }} + + {{ .Labels.load_balancer_name }} + + + Healthy Hosts + {{ template "prom_query_drilldown" (args (printf "avg(aws_elb_healthy_host_count_average{job='aws_elb',load_balancer_name='%s'})" .Labels.load_balancer_name) ) }} / {{ template "prom_query_drilldown" (args (printf "avg(aws_elb_healthy_host_count_average{job='aws_elb',load_balancer_name='%s'}) + avg(aws_elb_un_healthy_host_count_average{job='aws_elb',load_balancer_name='%s'})" .Labels.load_balancer_name .Labels.load_balancer_name) ) }} + + + Queries + {{ template "prom_query_drilldown" (args (printf "sum(aws_elb_request_count_sum{job='aws_elb',load_balancer_name='%s'}) / 60" .Labels.load_balancer_name) "/s" "humanizeNoSmallPrefix") }} + + + Latency + {{ template "prom_query_drilldown" (args (printf "avg(aws_elb_latency_average{job='aws_elb',load_balancer_name='%s'})" .Labels.load_balancer_name) "s" "humanize") }} + + + Surge Queue + {{ template "prom_query_drilldown" (args (printf "sum(aws_elb_surge_queue_length_sum{job='aws_elb',load_balancer_name='%s'})" .Labels.load_balancer_name) "" "humanize") }} + +{{ end }} +{{ template "prom_right_table_tail" }} + +{{ template "prom_content_head" . }} +

AWS Elastic Load Balancer

+{{ template "prom_content_tail" . }} +

This console assumes that period_seconds in the CloudWatch Exporter is the default of 60s.

+ +

Queries

+
+ + +{{ template "tail" }} diff --git a/consoles/aws_redshift-cluster.html b/consoles/aws_redshift-cluster.html new file mode 100644 index 000000000..5d75dfb25 --- /dev/null +++ b/consoles/aws_redshift-cluster.html @@ -0,0 +1,83 @@ +{{ template "head" . }} + +{{ template "prom_right_table_head" }} + + Nodes + {{ template "prom_query_drilldown" (args (printf "count(aws_redshift_percentage_disk_space_used_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier)) }} + + + Healthy + {{ with printf "aws_redshift_health_status_average{job='aws_redshift',cluster_identifier='%s'}" .Params.cluster_identifier | query }}{{ if eq (. | first | value) 1.0 }}Yes{{ else }}No{{ end }} {{ end }} + + + Maintenance mode + {{ with printf "aws_redshift_maintenance_mode_average{job='aws_redshift',cluster_identifier='%s'}" .Params.cluster_identifier | query }}{{ if eq (. | first | value) 1.0 }}Yes{{ else }}No{{ end }} {{ end }} + + + Connections + {{ template "prom_query_drilldown" (args (printf "aws_redshift_database_connections_average{job='aws_redshift',cluster_identifier='%s'}" .Params.cluster_identifier)) }} + + + CPU + {{ template "prom_query_drilldown" (args (printf "avg(aws_redshift_cpuutilization_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier) "%" "printf.3g") }} + + + Disk Used + {{ template "prom_query_drilldown" (args (printf "max(aws_redshift_percentage_disk_space_used_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier) "%" "printf.3g") }} + + + Network Transmitted + {{ template "prom_query_drilldown" (args (printf "avg(aws_redshift_network_transmit_throughput_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier) "B/s" "humanize") }} + + + Network Received + {{ template "prom_query_drilldown" (args (printf "avg(aws_redshift_network_receive_throughput_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier) "B/s" "humanize") }} + + + Read Throughput + {{ template "prom_query_drilldown" (args (printf "avg(aws_redshift_read_throughput_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier) "B/s" "humanize") }} + + + Read IOPS + {{ template "prom_query_drilldown" (args (printf "avg(aws_redshift_read_iops_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier) "/s" "humanizeNoSmallPrefix") }} + + + Read Latency + {{ template "prom_query_drilldown" (args (printf "avg(aws_redshift_read_latency_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier) "s" "humanize") }} + + + Write Throughput + {{ template "prom_query_drilldown" (args (printf "avg(aws_redshift_write_throughput_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier) "B/s" "humanize") }} + + + Write IOPS + {{ template "prom_query_drilldown" (args (printf "avg(aws_redshift_write_iops_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier) "/s" "humanizeNoSmallPrefix") }} + + + Write Latency + {{ template "prom_query_drilldown" (args (printf "avg(aws_redshift_write_latency_average{job='aws_redshift',cluster_identifier='%s'})" .Params.cluster_identifier) "s" "humanize") }} + +{{ template "prom_right_table_tail" }} + +{{ template "prom_content_head" . }} +

AWS Redshift

+

Cluster: {{ .Params.cluster_identifier }}

+ +

CPU Usage

+
+ + + +{{ template "prom_content_tail" . }} + +{{ template "tail" }} diff --git a/consoles/aws_redshift.html b/consoles/aws_redshift.html new file mode 100644 index 000000000..42ef272f7 --- /dev/null +++ b/consoles/aws_redshift.html @@ -0,0 +1,28 @@ +{{ template "head" . }} + +{{ template "prom_content_head" . }} +

AWS Redshift

+ +

Overview

+ + + + + + + + +{{ range printf "sum by (cluster_identifier)(aws_redshift_health_status_average{job='aws_redshift'})" | query | sortByLabel "cluster_identifier" }} + + + + + + + +{{ end }} +
ClusterHealthyMaintenance ModeNodesDisk Used
{{ .Labels.cluster_identifier }}{{ with printf "aws_redshift_health_status_average{job='aws_redshift',cluster_identifier='%s'}" .Labels.cluster_identifier | query }}{{ if eq (. | first | value) 1.0 }}Yes{{ else }}No{{ end }} {{ end }}{{ with printf "aws_redshift_maintenance_mode_average{job='aws_redshift',cluster_identifier='%s'}" .Labels.cluster_identifier | query }}{{ if eq (. | first | value) 1.0 }}Yes{{ else }}No{{ end }} {{ end }}{{ template "prom_query_drilldown" (args (printf "count(aws_redshift_percentage_disk_space_used_average{job='aws_redshift',cluster_identifier='%s'})" .Labels.cluster_identifier)) }}{{ template "prom_query_drilldown" (args (printf "max(aws_redshift_percentage_disk_space_used_average{job='aws_redshift',cluster_identifier='%s'})" .Labels.cluster_identifier) "%" "printf.3g") }}
+ +{{ template "prom_content_tail" . }} + +{{ template "tail" }} diff --git a/consoles/cloudwatch.html b/consoles/cloudwatch.html new file mode 100644 index 000000000..704b303d4 --- /dev/null +++ b/consoles/cloudwatch.html @@ -0,0 +1,19 @@ +{{ template "head" . }} + +{{ template "prom_right_table_head" }} + + cloudwatch + {{ template "prom_query_drilldown" (args "sum(up{job='cloudwatch'})") }} / {{ template "prom_query_drilldown" (args "count(up{job='cloudwatch'})") }} + + + + API Requests + {{ template "prom_query_drilldown" (args "sum by (job)(rate(cloudwatch_requests_total{job='cloudwatch'}[5m]))" "/s" "humanizeNoSmallPrefix") }} + +{{ template "prom_right_table_tail" }} + +{{ template "prom_content_head" . }} +

CloudWatch Exporter

+{{ template "prom_content_tail" . }} + +{{ template "tail" }} diff --git a/consoles/haproxy-backend.html b/consoles/haproxy-backend.html new file mode 100644 index 000000000..8fe0b7c3e --- /dev/null +++ b/consoles/haproxy-backend.html @@ -0,0 +1,58 @@ +{{ template "head" . }} + +{{ template "prom_right_table_head" }} + {{ .Params.backend }}{{ template "prom_query_drilldown" (args (printf "sum(min by (server)(haproxy_server_up{job='haproxy',backend='%s'}))" .Params.backend)) }} / {{ template "prom_query_drilldown" (args (printf "count(sum by (server)(haproxy_server_up{job='haproxy',backend='%s'}))" .Params.backend))}} + + Responses + {{ template "prom_query_drilldown" (args (printf "sum(rate(haproxy_backend_http_responses_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "/s" "humanizeNoSmallPrefix") }} + + + Data In + {{ template "prom_query_drilldown" (args (printf "sum(rate(haproxy_backend_bytes_in_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "B/s" "humanize") }} + + + Data Out + {{ template "prom_query_drilldown" (args (printf "sum(rate(haproxy_backend_bytes_out_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "B/s" "humanize") }} + + + Current Sessions + {{ template "prom_query_drilldown" (args (printf "sum(haproxy_backend_current_sessions{job='haproxy',backend='%s'})" .Params.backend) "" "humanize") }} + + + Current Queue + {{ template "prom_query_drilldown" (args (printf "sum(haproxy_backend_current_queue{job='haproxy',backend='%s'})" .Params.backend) "" "humanize") }} + + Server Errors + + Connection Errors + {{ template "prom_query_drilldown" (args (printf "sum(rate(haproxy_backend_connection_errors_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "/s" "humanizeNoSmallPrefix") }} + + + Response Errors + {{ template "prom_query_drilldown" (args (printf "sum(rate(haproxy_backend_connection_errors_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "/s" "humanizeNoSmallPrefix") }} + + + Retry Warnings + {{ template "prom_query_drilldown" (args (printf "sum(rate(haproxy_backend_retry_warnings_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "/s" "humanizeNoSmallPrefix") }} + +{{ template "prom_right_table_tail" }} + +{{ template "prom_content_head" . }} +

HAProxy Backend - {{ .Params.backend }}

+ +

Responses

+
+ +{{ template "prom_content_tail" . }} + +{{ template "tail" }} diff --git a/consoles/haproxy-backends.html b/consoles/haproxy-backends.html new file mode 100644 index 000000000..27d578b86 --- /dev/null +++ b/consoles/haproxy-backends.html @@ -0,0 +1,29 @@ +{{ template "head" . }} + +{{ template "prom_content_head" . }} +

HAProxy Backends

+ + + + + + + + + +{{ range query "count by (backend)(haproxy_backend_http_responses_total{job='haproxy'})" | sortByLabel "backend" }} + + + + + + +{{ else }} + +{{ end }} + + +{{ template "prom_content_tail" . }} + +{{ template "tail" }} diff --git a/consoles/haproxy-frontend.html b/consoles/haproxy-frontend.html new file mode 100644 index 000000000..c852b5cd4 --- /dev/null +++ b/consoles/haproxy-frontend.html @@ -0,0 +1,45 @@ +{{ template "head" . }} + +{{ template "prom_right_table_head" }} + + + + + + + + + + + + + + + + + + + + + +{{ template "prom_right_table_tail" }} + +{{ template "prom_content_head" . }} +

HAProxy Frontend - {{ .Params.frontend }}

+ +

Responses

+
+ +{{ template "prom_content_tail" . }} + +{{ template "tail" }} diff --git a/consoles/haproxy-frontends.html b/consoles/haproxy-frontends.html new file mode 100644 index 000000000..cdbdb503d --- /dev/null +++ b/consoles/haproxy-frontends.html @@ -0,0 +1,25 @@ +{{ template "head" . }} + +{{ template "prom_content_head" . }} +

HAProxy Frontends

+ +
BackendServers HealthyResponsesSessionsQueue
{{ .Labels.backend }}{{ template "prom_query_drilldown" (args (printf "sum(min by (server)(haproxy_server_up{job='haproxy',backend='%s'}))" .Labels.backend)) }} / {{ template "prom_query_drilldown" (args (printf "count(sum by (server)(haproxy_server_up{job='haproxy',backend='%s'}))" .Labels.backend))}} + {{ template "prom_query_drilldown" (args (printf "sum by(backend)(rate(haproxy_backend_http_responses_total{job='haproxy',backend='%s'}[5m]))" .Labels.backend) "/s" "humanizeNoSmallPrefix") }}{{ template "prom_query_drilldown" (args (printf "sum by(backend)(haproxy_backend_current_sessions{job='haproxy',backend='%s'})" .Labels.backend) "" "humanize") }}{{ template "prom_query_drilldown" (args (printf "sum by(backend)(haproxy_backend_current_queue{job='haproxy',backend='%s'})" .Labels.backend) "" "humanize") }}
No backends found.
{{ .Params.frontend }}
Requests{{ template "prom_query_drilldown" (args (printf "sum(rate(haproxy_frontend_http_requests_total{job='haproxy',frontend='%s'}[5m]))" .Params.frontend) "/s" "humanizeNoSmallPrefix") }}
Requests Denied{{ template "prom_query_drilldown" (args (printf "sum(rate(haproxy_frontend_requests_denied_total{job='haproxy',frontend='%s'}[5m]))" .Params.frontend) "/s" "humanizeNoSmallPrefix") }}
Data In{{ template "prom_query_drilldown" (args (printf "sum(rate(haproxy_frontend_bytes_in_total{job='haproxy',frontend='%s'}[5m]))" .Params.frontend) "B/s" "humanize") }}
Data Out{{ template "prom_query_drilldown" (args (printf "sum(rate(haproxy_frontend_bytes_out_total{job='haproxy',frontend='%s'}[5m]))" .Params.frontend) "B/s" "humanize") }}
Current Sessions{{ template "prom_query_drilldown" (args (printf "sum(haproxy_frontend_current_sessions{job='haproxy',frontend='%s'})" .Params.frontend) "" "humanize") }}
+ + + + + +{{ range query "count by (frontend)(haproxy_frontend_http_requests_total{job='haproxy'})" | sortByLabel "frontend" }} + + + + + +{{ else }} + +{{ end }} + + +{{ template "prom_content_tail" . }} + +{{ template "tail" }} diff --git a/consoles/haproxy.html b/consoles/haproxy.html new file mode 100644 index 000000000..5efec4d68 --- /dev/null +++ b/consoles/haproxy.html @@ -0,0 +1,84 @@ +{{ template "head" . }} + +{{ template "prom_right_table_head" }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{{ template "prom_right_table_tail" }} + +{{ template "prom_content_head" . }} +

HAProxy

+ +

Frontend Requests

+
+ +

Backend Responses

+
+ +

Current Sessions

+
+ +{{ template "prom_content_tail" . }} + +{{ template "tail" }} diff --git a/consoles/index.html.example b/consoles/index.html.example index 4279b4b6f..0b45a0760 100644 --- a/consoles/index.html.example +++ b/consoles/index.html.example @@ -1,11 +1,32 @@ {{ template "head" . }} -{{template "prom_right_table_head"}} -{{template "prom_right_table_tail"}} +{{ template "prom_right_table_head" }} +{{ template "prom_right_table_tail" }} -{{template "prom_content_head" .}} +{{ template "prom_content_head" . }}

Overview

These are example consoles for Prometheus, they are still under development.

-{{template "prom_content_tail" .}} -{{template "tail"}} +

These consoles expect exporters to have the following job labels:

+
FrontendRequestsSessions
{{ .Labels.frontend }}{{ template "prom_query_drilldown" (args (printf "sum by(frontend)(rate(haproxy_frontend_http_requests_total{job='haproxy',frontend='%s'}[5m]))" .Labels.frontend) "/s" "humanizeNoSmallPrefix") }}{{ template "prom_query_drilldown" (args (printf "sum by(frontend)(haproxy_frontend_current_sessions{job='haproxy',frontend='%s'})" .Labels.frontend) "" "humanize") }}
No frontends found.
HAProxy{{ template "prom_query_drilldown" (args "sum(haproxy_up{job='haproxy'})") }} / {{ template "prom_query_drilldown" (args "count(up{job='haproxy'})") }}
CPU{{ template "prom_query_drilldown" (args "avg by(job)(rate(haproxy_process_cpu_seconds_total{job='haproxy'}[5m]))" "s/s" "humanizeNoSmallPrefix") }}
Memory{{ template "prom_query_drilldown" (args "avg by(job)(haproxy_process_resident_memory_bytes{job='haproxy'})" "B" "humanize1024") }}
Frontend
Requests{{ template "prom_query_drilldown" (args "sum(rate(haproxy_frontend_http_requests_total{job='haproxy'}[5m]))" "/s" "humanizeNoSmallPrefix") }}
Requests Denied{{ template "prom_query_drilldown" (args "sum(rate(haproxy_frontend_requests_denied_total{job='haproxy'}[5m]))" "/s" "humanizeNoSmallPrefix") }}
Data In{{ template "prom_query_drilldown" (args "sum(rate(haproxy_frontend_bytes_in_total{job='haproxy'}[5m]))" "B/s" "humanize") }}
Data Out{{ template "prom_query_drilldown" (args "sum(rate(haproxy_frontend_bytes_out_total{job='haproxy'}[5m]))" "B/s" "humanize") }}
Current Sessions{{ template "prom_query_drilldown" (args "sum(haproxy_frontend_current_sessions{job='haproxy'})" "" "humanize") }}
+ + + + + + + + + + + + + + + + +
ExporterJob label
Node Exporternode
HAProxy Exporterhaproxy
CloudWatch Exportercloudwatch
+ +{{ template "prom_content_tail" . }} + +{{ template "tail" }} diff --git a/consoles/node-cpu.html b/consoles/node-cpu.html index 678b27c35..58305d194 100644 --- a/consoles/node-cpu.html +++ b/consoles/node-cpu.html @@ -1,8 +1,8 @@ -{{template "head" .}} +{{ template "head" . }} -{{template "prom_right_table_head"}} +{{ template "prom_right_table_head" }} CPU -{{ range printf "sum by (mode)(rate(node_cpu{job='node',instance='%s'}[5m])) * 100 / scalar(count(count by (cpu)(node_cpu{job='node',instance='%s'})))" .Params.instance .Params.instance | query | sortByLabel "mode"}} +{{ range printf "sum by (mode)(rate(node_cpu{job='node',instance='%s'}[5m])) * 100 / scalar(count(count by (cpu)(node_cpu{job='node',instance='%s'})))" .Params.instance .Params.instance | query | sortByLabel "mode" }} {{ .Labels.mode | title }} CPU {{ .Value | printf "%.3g" }}% @@ -35,9 +35,9 @@ -{{template "prom_right_table_tail"}} +{{ template "prom_right_table_tail" }} -{{template "prom_content_head" .}} +{{ template "prom_content_head" . }}

Node CPU - {{ reReplaceAll "(.*?://)([^:/]+?)(:\\d+)?/.*" "$2" .Params.instance }}

CPU Usage

@@ -45,14 +45,14 @@ -{{template "prom_content_tail" .}} +{{ template "prom_content_tail" . }} -{{template "tail"}} +{{ template "tail" }} diff --git a/consoles/node-disk.html b/consoles/node-disk.html index c304d894e..5110af839 100644 --- a/consoles/node-disk.html +++ b/consoles/node-disk.html @@ -1,9 +1,9 @@ -{{template "head" .}} +{{ template "head" . }} -{{template "prom_right_table_head"}} +{{ template "prom_right_table_head" }} Disks -{{ range printf "node_disk_io_time_ms{job='node',instance='%s'}" .Params.instance | query | sortByLabel "device"}} +{{ range printf "node_disk_io_time_ms{job='node',instance='%s'}" .Params.instance | query | sortByLabel "device" }} {{ .Labels.device }} Utilization @@ -24,20 +24,20 @@ {{ end }} Filesystem Fullness -{{ define "roughlyNearZero"}} +{{ define "roughlyNearZero" }} {{ if gt .1 . }}~0{{ else }}{{ printf "%.3g" . }}{{ end }} {{ end }} -{{ range printf "node_filesystem_size{job='node',instance='%s'}" .Params.instance | query | sortByLabel "filesystem"}} +{{ range printf "node_filesystem_size{job='node',instance='%s'}" .Params.instance | query | sortByLabel "filesystem" }} - {{.Labels.filesystem}} + {{ .Labels.filesystem }} {{ template "prom_query_drilldown" (args (printf "100 - node_filesystem_free{job='node',instance='%s',filesystem='%s'} / node_filesystem_size{job='node'} * 100" .Labels.instance .Labels.filesystem) "%" "roughlyNearZero") }} {{ end }} -{{template "prom_right_table_tail"}} +{{ template "prom_right_table_tail" }} -{{template "prom_content_head" .}} +{{ template "prom_content_head" . }}

Node Disk - {{ reReplaceAll "(.*?://)([^:/]+?)(:\\d+)?/.*" "$2" .Params.instance }}

Disk I/O Utilization

@@ -46,7 +46,7 @@ new PromConsole.Graph({ node: document.querySelector("#diskioGraph"), expr: [ - "rate(node_disk_io_time_ms{job='node',instance='{{.Params.instance}}',device!~'^(md\\d+$|dm-)'}[5m]) / 1000 * 100", + "rate(node_disk_io_time_ms{job='node',instance='{{ .Params.instance }}',device!~'^(md\\d+$|dm-)'}[5m]) / 1000 * 100", ], min: 0, name: '[[ device ]]', @@ -71,6 +71,6 @@ yTitle: 'Filesystem Fullness' }) -{{template "prom_content_tail" .}} +{{ template "prom_content_tail" . }} -{{template "tail"}} +{{ template "tail" }} diff --git a/consoles/node-overview.html b/consoles/node-overview.html index 6bbc1d4f8..3187a1ed1 100644 --- a/consoles/node-overview.html +++ b/consoles/node-overview.html @@ -1,6 +1,6 @@ -{{template "head" .}} +{{ template "head" . }} -{{template "prom_right_table_head"}} +{{ template "prom_right_table_head" }} Overview User CPU @@ -21,7 +21,7 @@ Network -{{ range printf "node_network_receive_bytes{job='node',instance='%s',device!='lo'}" .Params.instance | query | sortByLabel "device"}} +{{ range printf "node_network_receive_bytes{job='node',instance='%s',device!='lo'}" .Params.instance | query | sortByLabel "device" }} {{ .Labels.device }} Received {{ template "prom_query_drilldown" (args (printf "rate(node_network_receive_bytes{job='node',instance='%s',device='%s'}[5m])" .Labels.instance .Labels.device) "B/s" "humanize") }} @@ -35,13 +35,13 @@ 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 "rate(node_disk_io_time_ms{job='node',instance='%s',device='%s'}[5m]) / 1000 * 100" .Labels.instance .Labels.device) "%" "printf.3g") }} {{ end }} -{{ range printf "node_disk_io_time_ms{job='node',instance='%s'}" .Params.instance | query | sortByLabel "device"}} +{{ range printf "node_disk_io_time_ms{job='node',instance='%s'}" .Params.instance | query | sortByLabel "device" }} {{ .Labels.device }} Throughput {{ template "prom_query_drilldown" (args (printf "rate(node_disk_sectors_read{job='node',instance='%s',device='%s'}[5m]) * 512 + rate(node_disk_sectors_written{job='node',instance='%s',device='%s'}[5m]) * 512" .Labels.instance .Labels.device .Labels.instance .Labels.device) "B/s" "humanize") }} @@ -50,19 +50,19 @@ Filesystem Fullness -{{ define "roughlyNearZero"}} +{{ define "roughlyNearZero" }} {{ if gt .1 . }}~0{{ else }}{{ printf "%.3g" . }}{{ end }} {{ end }} -{{ range printf "node_filesystem_size{job='node',instance='%s'}" .Params.instance | query | sortByLabel "filesystem"}} +{{ range printf "node_filesystem_size{job='node',instance='%s'}" .Params.instance | query | sortByLabel "filesystem" }} - {{.Labels.filesystem}} + {{ .Labels.filesystem }} {{ template "prom_query_drilldown" (args (printf "100 - node_filesystem_free{job='node',instance='%s',filesystem='%s'} / node_filesystem_size{job='node'} * 100" .Labels.instance .Labels.filesystem) "%" "roughlyNearZero") }} {{ end }} -{{template "prom_right_table_tail"}} +{{ template "prom_right_table_tail" }} -{{template "prom_content_head" .}} +{{ template "prom_content_head" . }}

Node Overview - {{ reReplaceAll "(.*?://)([^:/]+?)(:\\d+)?/.*" "$2" .Params.instance }}

CPU Usage

@@ -70,9 +70,9 @@ -{{template "prom_content_tail" .}} +{{ template "prom_content_tail" . }} -{{template "tail"}} +{{ template "tail" }} diff --git a/consoles/node.html b/consoles/node.html index ac6fb3ff1..fb3fbb6da 100644 --- a/consoles/node.html +++ b/consoles/node.html @@ -1,13 +1,13 @@ -{{template "head" .}} +{{ template "head" . }} -{{template "prom_right_table_head"}} +{{ template "prom_right_table_head" }} Node {{ template "prom_query_drilldown" (args "sum(up{job='node'})") }} / {{ template "prom_query_drilldown" (args "count(up{job='node'})") }} -{{template "prom_right_table_tail"}} +{{ template "prom_right_table_tail" }} -{{template "prom_content_head" .}} +{{ template "prom_content_head" . }}

Node

@@ -29,6 +29,6 @@ {{ end }} -{{template "prom_content_tail" .}} +{{ template "prom_content_tail" . }} -{{template "tail"}} +{{ template "tail" }}