Add OpenMetrics compatible endpoint

Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
This commit is contained in:
Pat Riehecky 2023-07-25 14:30:25 -05:00
parent 2935519eb7
commit 749e12faa0
2 changed files with 20 additions and 0 deletions

View File

@ -3,6 +3,7 @@ templatesdir = $(pkgdatadir)
TEMPLATES = \
debug.html \
default.html \
metrics \
stats.html
templates_DATA = \

19
data/templates/metrics Normal file
View File

@ -0,0 +1,19 @@
# 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}
# HELP binary_info Information about the binary
# TYPE binary Info
binary_info{name="{package}",version="{version}"} 1
# EOF