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