diff --git a/console_libraries/menu.lib b/console_libraries/menu.lib
index 261aea6a4e..71bf5a9922 100644
--- a/console_libraries/menu.lib
+++ b/console_libraries/menu.lib
@@ -82,6 +82,19 @@
{{ end }}
{{ end }}
+{{ if query "up{job='prometheus'}" }}
+{{ template "_menuItem" (args . "prometheus.html" "Prometheus") }}
+{{ if match "^prometheus" .Path }}
+ {{ if .Params.instance }}
+
+ {{ end }}
+{{ end }}
+{{ end }}
+
{{ if query "up{job='snmp'}" }}
{{ template "_menuItem" (args . "snmp.html" "SNMP") }}
diff --git a/consoles/index.html.example b/consoles/index.html.example
index f85d7a22c7..e4e0e2e552 100644
--- a/consoles/index.html.example
+++ b/consoles/index.html.example
@@ -17,6 +17,14 @@
Node Exporter |
node |
+
+ Prometheus |
+ prometheus |
+
+
+ SNMP Exporter |
+ snmp |
+
HAProxy Exporter |
haproxy |
diff --git a/consoles/prometheus-overview.html b/consoles/prometheus-overview.html
new file mode 100644
index 0000000000..f1a5998819
--- /dev/null
+++ b/consoles/prometheus-overview.html
@@ -0,0 +1,125 @@
+{{ template "head" . }}
+
+{{ template "prom_right_table_head" }}
+
+ Overview |
+
+
+ CPU |
+ {{ template "prom_query_drilldown" (args (printf "rate(process_cpu_seconds_total{job='prometheus',instance='%s'}[5m])" .Params.instance) "s/s" "humanizeNoSmallPrefix") }} |
+
+
+ Memory |
+ {{ template "prom_query_drilldown" (args (printf "process_resident_memory_bytes{job='prometheus',instance='%s'}" .Params.instance) "B" "humanize1024") }} |
+
+
+ Version |
+ {{ with query (printf "prometheus_build_info{job='prometheus',instance='%s'}" .Params.instance) }}{{. | first | label "version"}}{{end}} |
+
+
+
+ Storage |
+
+
+ Ingested Samples |
+ {{ template "prom_query_drilldown" (args (printf "rate(prometheus_local_storage_ingested_samples_total{job='prometheus',instance='%s'}[5m])" .Params.instance) "/s" "humanizeNoSmallPrefix") }} |
+
+
+ Time Series |
+ {{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_memory_series{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }} |
+
+
+ Indexing Queue |
+ {{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_indexing_queue_length{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }} |
+
+
+ Chunks |
+ {{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_memory_chunks{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }} |
+
+
+ Chunk Descriptors |
+ {{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_memory_chunkdescs{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }} |
+
+
+ Chunks To Persist |
+ {{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_chunks_to_persist{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }} |
+
+
+ Checkpoint Duration |
+ {{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_checkpoint_duration_milliseconds{job='prometheus',instance='%s'} / 1000" .Params.instance) "" "humanizeDuration") }} |
+
+
+
+ Rules |
+
+
+ Evaluation Duration |
+ {{ template "prom_query_drilldown" (args (printf "rate(prometheus_evaluator_duration_milliseconds_sum{job='prometheus',instance='%s'}[5m]) / rate(prometheus_evaluator_duration_milliseconds_count{job='prometheus',instance='%s'}[5m]) / 1000" .Params.instance .Params.instance) "" "humanizeDuration") }} |
+
+
+ Notification Latency |
+ {{ template "prom_query_drilldown" (args (printf "rate(prometheus_notifications_latency_milliseconds_sum{job='prometheus',instance='%s'}[5m]) / rate(prometheus_notifications_latency_milliseconds_count{job='prometheus',instance='%s'}[5m]) / 1000" .Params.instance .Params.instance) "" "humanizeDuration") }} |
+
+
+ Notification Queue |
+ {{ template "prom_query_drilldown" (args (printf "prometheus_notifications_queue_length{job='prometheus',instance='%s'}" .Params.instance) "" "humanize") }} |
+
+
+ HTTP Server |
+
+{{ range printf "http_request_duration_microseconds_count{job='prometheus',instance='%s',handler=~'^(query.*|federate|consoles)$'}" .Params.instance | query | sortByLabel "handler" }}
+
+ {{ .Labels.handler }} |
+ {{ template "prom_query_drilldown" (args (printf "rate(http_request_duration_microseconds_count{job='prometheus',instance='%s',handler='%s'}[5m])" .Labels.instance .Labels.handler) "/s" "humanizeNoSmallPrefix") }} |
+
+{{ end }}
+
+{{ template "prom_right_table_tail" }}
+
+{{ template "prom_content_head" . }}
+ Prometheus Overview - {{ .Params.instance }}
+
+ Ingested Samples
+
+
+
+ Time Series
+
+
+
+ HTTP Server
+
+
+
+{{ template "prom_content_tail" . }}
+
+{{ template "tail" }}
diff --git a/consoles/prometheus.html b/consoles/prometheus.html
new file mode 100644
index 0000000000..13809cc950
--- /dev/null
+++ b/consoles/prometheus.html
@@ -0,0 +1,35 @@
+{{ template "head" . }}
+
+{{ template "prom_right_table_head" }}
+
+ Prometheus |
+ {{ template "prom_query_drilldown" (args "sum(up{job='prometheus'})") }} / {{ template "prom_query_drilldown" (args "count(up{job='prometheus'})") }} |
+
+{{ template "prom_right_table_tail" }}
+
+{{ template "prom_content_head" . }}
+Prometheus
+
+
+
+ Prometheus |
+ Up |
+ Ingested Samples |
+ Time Series |
+ Memory |
+
+{{ range query "up{job='prometheus'}" | sortByLabel "instance" }}
+
+ {{ .Labels.instance }} |
+ Yes{{ else }} class="alert-danger">No{{ end }} |
+ {{ template "prom_query_drilldown" (args (printf "rate(prometheus_local_storage_ingested_samples_total{job='prometheus',instance='%s'}[5m])" .Labels.instance) "/s" "humanizeNoSmallPrefix") }} |
+ {{ template "prom_query_drilldown" (args (printf "prometheus_local_storage_memory_series{job='prometheus',instance='%s'}" .Labels.instance) "" "humanize") }} |
+ {{ template "prom_query_drilldown" (args (printf "process_resident_memory_bytes{job='prometheus',instance='%s'}" .Labels.instance) "B" "humanize1024")}} |
+
+{{ else }}
+No devices found. |
+{{ end }}
+
+{{ template "prom_content_tail" . }}
+
+{{ template "tail" }}