From: Ulrich Wisser Date: Thu, 19 Jul 2018 22:20:42 +0000 (-0400) Subject: expose bogus_log.frequent as web api X-Git-Tag: v3.2.0~11^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=badb94df4ebf0c8ffadd36e7de03215a99284b28;p=thirdparty%2Fknot-resolver.git expose bogus_log.frequent as web api --- diff --git a/modules/http/http.lua b/modules/http/http.lua index a095afdb0..f61102a51 100644 --- a/modules/http/http.lua +++ b/modules/http/http.lua @@ -1,5 +1,6 @@ -- Load dependent modules if not stats then modules.load('stats') end +if not bogus_log then modules.load('bogus_log') end -- This is a module that does the heavy lifting to provide an HTTP/2 enabled -- server that supports TLS by default and provides endpoint for other modules diff --git a/modules/http/prometheus.lua b/modules/http/prometheus.lua index cff4050df..00d93de51 100644 --- a/modules/http/prometheus.lua +++ b/modules/http/prometheus.lua @@ -165,6 +165,7 @@ M.endpoints = { ['/stats'] = {'application/json', getstats, stream_stats}, ['/frequent'] = {'application/json', function () return stats.frequent() end}, ['/upstreams'] = {'application/json', function () return stats.upstreams() end}, + ['/bogus'] = {'application/json', function () return bogus_log.frequent() end}, ['/metrics'] = {'text/plain; version=0.0.4', serve_prometheus}, }