From: Pieter Lexis Date: Mon, 12 Nov 2018 16:02:04 +0000 (+0100) Subject: ixfrdist: add help to stats X-Git-Tag: auth-4.2.0-alpha1~31^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef9ebc82c4109cd249654e7b087dcbfc7f8f60a2;p=thirdparty%2Fpdns.git ixfrdist: add help to stats --- diff --git a/pdns/Makefile.am b/pdns/Makefile.am index bf73f19876..153dcc9bda 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -622,7 +622,7 @@ ixfrdist_SOURCES = \ ixfr.cc ixfr.hh \ ixfrdist.cc \ ixfrutils.cc ixfrutils.hh \ - ixfrdist-stats.hh \ + ixfrdist-stats.hh ixfrdist-stats.cc \ ixfrdist-web.hh ixfrdist-web.cc \ logger.cc logger.hh\ misc.cc misc.hh \ diff --git a/pdns/ixfrdist-stats.cc b/pdns/ixfrdist-stats.cc new file mode 100644 index 0000000000..3aa9720568 --- /dev/null +++ b/pdns/ixfrdist-stats.cc @@ -0,0 +1,108 @@ +/* + * This file is part of PowerDNS or dnsdist. + * Copyright -- PowerDNS.COM B.V. and its contributors + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * In addition, for the avoidance of any doubt, permission is granted to + * link this program with OpenSSL and to (re)distribute the binaries + * produced as the result of such linking. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "ixfrdist-stats.hh" + +std::string ixfrdistStats::getStats() { + std::stringstream stats; + const std::string prefix = "ixfrdist_"; + + stats<<"# HELP "<