From f2f051262542a37306e07ea289a5370ae503e459 Mon Sep 17 00:00:00 2001 From: Nico Holguin Date: Thu, 10 Dec 2020 16:10:40 -0700 Subject: [PATCH 1/3] add prometheus exporter template --- data/templates/Makefile.am | 3 ++- data/templates/prometheus.html | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 data/templates/prometheus.html diff --git a/data/templates/Makefile.am b/data/templates/Makefile.am index e4b0134..a6967a9 100644 --- a/data/templates/Makefile.am +++ b/data/templates/Makefile.am @@ -3,7 +3,8 @@ templatesdir = $(pkgdatadir) TEMPLATES = \ debug.html \ default.html \ - stats.html + stats.html \ + prometheus.html templates_DATA = \ $(TEMPLATES) diff --git a/data/templates/prometheus.html b/data/templates/prometheus.html new file mode 100644 index 0000000..6988adf --- /dev/null +++ b/data/templates/prometheus.html @@ -0,0 +1,15 @@ +# HELP opens Number of open connections. +# TYPE opens Gauge +opens {opens} +# HELP reqs Number of requests. +# TYPE reqs Counter +reqs {reqs} +# HELP badconns Number of bad connections. +# TYPE badconns Counter +badconns {badconns} +# HELP deniedconns Number of denied connections. +# TYPE deniedconns Counter +deniedconns {deniedconns} +# HELP refusedconns Number of refused connections due to high load. +# TYPE refusedconns Counter +refusedconns {refusedconns} From fb1787c4a49509f65f55fd7b382260bf03f70212 Mon Sep 17 00:00:00 2001 From: infinite-turtles Date: Sat, 12 Dec 2020 09:06:55 -0700 Subject: [PATCH 2/3] use txt extension for prometheus exporter --- data/templates/Makefile.am | 2 +- data/templates/{stats.html => stats.txt} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename data/templates/{stats.html => stats.txt} (100%) diff --git a/data/templates/Makefile.am b/data/templates/Makefile.am index a6967a9..3b83a78 100644 --- a/data/templates/Makefile.am +++ b/data/templates/Makefile.am @@ -3,7 +3,7 @@ templatesdir = $(pkgdatadir) TEMPLATES = \ debug.html \ default.html \ - stats.html \ + stats.txt \ prometheus.html templates_DATA = \ diff --git a/data/templates/stats.html b/data/templates/stats.txt similarity index 100% rename from data/templates/stats.html rename to data/templates/stats.txt From c04340409d135ecc6419ed55fdf6f03812d7f916 Mon Sep 17 00:00:00 2001 From: infinite-turtles Date: Sat, 12 Dec 2020 09:10:14 -0700 Subject: [PATCH 3/3] chang extension on correct file --- data/templates/Makefile.am | 4 ++-- data/templates/{prometheus.html => prometheus.txt} | 0 data/templates/{stats.txt => stats.html} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename data/templates/{prometheus.html => prometheus.txt} (100%) rename data/templates/{stats.txt => stats.html} (100%) diff --git a/data/templates/Makefile.am b/data/templates/Makefile.am index 3b83a78..7cd6e97 100644 --- a/data/templates/Makefile.am +++ b/data/templates/Makefile.am @@ -3,8 +3,8 @@ templatesdir = $(pkgdatadir) TEMPLATES = \ debug.html \ default.html \ - stats.txt \ - prometheus.html + stats.html \ + prometheus.txt templates_DATA = \ $(TEMPLATES) diff --git a/data/templates/prometheus.html b/data/templates/prometheus.txt similarity index 100% rename from data/templates/prometheus.html rename to data/templates/prometheus.txt diff --git a/data/templates/stats.txt b/data/templates/stats.html similarity index 100% rename from data/templates/stats.txt rename to data/templates/stats.html