Kea 2.5.8
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};
26
27const list<string>
29 "update-sent",
30 "update-signed",
31 "update-unsigned",
32 "update-success",
33 "update-timeout",
34 "update-error"
35};
36
37const list<string>
39 "update-sent",
40 "update-success",
41 "update-timeout",
42 "update-error"
43};
44
45void
48 stats_mgr.setMaxSampleCountDefault(0);
49 for (auto const& name : D2Stats::ncr) {
50 stats_mgr.setValue(name, static_cast<int64_t>(0));
51 }
52 for (auto const& name : D2Stats::update) {
53 stats_mgr.setValue(name, static_cast<int64_t>(0));
54 }
55};
56
57} // namespace d2
58} // namespace isc
static const std::list< std::string > update
Global DNS update statistics names.
Definition: d2_stats.h:34
static const std::list< std::string > key
Key DNS update statistics names.
Definition: d2_stats.h:42
static const std::list< std::string > ncr
Global NCR statistics names.
Definition: d2_stats.h:24
static void init()
Initialize D2 statistics.
Definition: d2_stats.cc:46
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.