summaryrefslogtreecommitdiffhomepage
path: root/caddytest
diff options
context:
space:
mode:
authorDave Henderson <[email protected]>2020-12-30 13:44:02 -0500
committerGitHub <[email protected]>2020-12-30 11:44:02 -0700
commitebc278ec98bb24f2852b61fde2a9bf2e3d83818b (patch)
treeafc2f604f9c59b64d3558eadd76330df4269efc7 /caddytest
parent79f3af99275447058951bc27fc45b669868dde7e (diff)
downloadcaddy-ebc278ec98bb24f2852b61fde2a9bf2e3d83818b.tar.gz
caddy-ebc278ec98bb24f2852b61fde2a9bf2e3d83818b.zip
metrics: allow disabling OpenMetrics negotiation (#3944)
* metrics: allow disabling OpenMetrics negotiation Signed-off-by: Dave Henderson <[email protected]> * fixup! metrics: allow disabling OpenMetrics negotiation
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/metrics_disable_om.txt36
-rw-r--r--caddytest/integration/caddyfile_adapt/metrics_syntax.txt33
2 files changed, 69 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/metrics_disable_om.txt b/caddytest/integration/caddyfile_adapt/metrics_disable_om.txt
new file mode 100644
index 000000000..2d7b24f4d
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/metrics_disable_om.txt
@@ -0,0 +1,36 @@
+:80 {
+ metrics /metrics {
+ disable_openmetrics
+ }
+}
+----------
+{
+ "apps": {
+ "http": {
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":80"
+ ],
+ "routes": [
+ {
+ "match": [
+ {
+ "path": [
+ "/metrics"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "disable_openmetrics": true,
+ "handler": "metrics"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+}
diff --git a/caddytest/integration/caddyfile_adapt/metrics_syntax.txt b/caddytest/integration/caddyfile_adapt/metrics_syntax.txt
new file mode 100644
index 000000000..ca08cea23
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/metrics_syntax.txt
@@ -0,0 +1,33 @@
+:80 {
+ metrics /metrics
+}
+----------
+{
+ "apps": {
+ "http": {
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":80"
+ ],
+ "routes": [
+ {
+ "match": [
+ {
+ "path": [
+ "/metrics"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "handler": "metrics"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+}