]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
expose stats.upstreams as web api /upstreams
authorUlrich Wisser <ulrich.wisser@iis.se>
Tue, 17 Jul 2018 20:46:54 +0000 (16:46 -0400)
committerPetr Špaček <petr.spacek@nic.cz>
Tue, 11 Dec 2018 16:05:10 +0000 (17:05 +0100)
modules/http/prometheus.lua

index cf76ef4cf572795fdd25a3adc2bf15d5c7274fdb..cff4050df666f7cecda1ae099b530fca6a936159 100644 (file)
@@ -164,7 +164,8 @@ M.deinit = snapshot_end
 M.endpoints = {
        ['/stats']     = {'application/json', getstats, stream_stats},
        ['/frequent']  = {'application/json', function () return stats.frequent() end},
+       ['/upstreams'] = {'application/json', function () return stats.upstreams() end},
        ['/metrics']   = {'text/plain; version=0.0.4', serve_prometheus},
 }
 
-return M
\ No newline at end of file
+return M