Kea 2.7.6
d2_stats.cc
Go to the documentation of this file.
1// Copyright (C) 2021-2024 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
8
9#include <config.h>
10
11#include <d2srv/d2_stats.h>
12#include <stats/stats_mgr.h>
13
14using namespace std;
15using namespace isc::stats;
16
17namespace isc {
18namespace d2 {
19
20const list<string>
22 "ncr-received",
23 "ncr-invalid",
24 "ncr-error",
25 "queue-mgr-queue-full"
26};
27
28const list<string>
30 "update-sent",
31 "update-signed",
32 "update-unsigned",
33 "update-success",
34 "update-timeout",
35 "update-error"
36};
37
38const list<string>
40 "update-sent",
41 "update-success",
42 "update-timeout",
43 "update-error"
44};
45
46void
49 stats_mgr.setMaxSampleCountDefault(0);
50 for (auto const& name : D2Stats::ncr) {
51 stats_mgr.setValue(name, static_cast<int64_t>(0));
52 }
53 for (auto const& name : D2Stats::update) {
54 stats_mgr.setValue(name, static_cast<int64_t>(0));
55 }
56};
57
58} // namespace d2
59} // namespace isc
static const std::list< std::string > update
Global DNS update statistics names.
Definition d2_stats.h:35
static const std::list< std::string > key
Key DNS update statistics names.
Definition d2_stats.h:43
static const std::list< std::string > ncr
Global NCR statistics names.
Definition d2_stats.h:25
static void init()
Initialize D2 statistics.
Definition d2_stats.cc:47
Statistics Manager class.
static StatsMgr & instance()
Statistics Manager accessor method.
void setMaxSampleCountDefault(uint32_t max_samples)
Set default count limit.
void setValue(const std::string &name, const int64_t value)
Records absolute integer observation.
Defines the logger used by the top-level component of kea-lfc.