]>
Commit | Line | Data |
---|---|---|
d705aad9 RG |
1 | |
2 | #include <unordered_map> | |
3 | ||
4 | #include "rec-snmp.hh" | |
5 | #include "rec_channel.hh" | |
6 | ||
7 | #include "logger.hh" | |
8 | ||
9 | #ifdef HAVE_NET_SNMP | |
10 | ||
11 | #define RECURSOR_OID 1, 3, 6, 1, 4, 1, 43315, 2 | |
12 | #define RECURSOR_STATS_OID RECURSOR_OID, 1 | |
13 | #define RECURSOR_TRAPS_OID RECURSOR_OID, 10, 0 | |
14 | #define RECURSOR_TRAP_OBJECTS_OID RECURSOR_OID, 11 | |
15 | ||
16 | static const oid trapReasonOID[] = { RECURSOR_TRAP_OBJECTS_OID, 1, 0 }; | |
17 | static const oid customTrapOID[] = { RECURSOR_TRAPS_OID, 1 }; | |
18 | ||
19 | static const oid questionsOID[] = { RECURSOR_STATS_OID, 1 }; | |
20 | static const oid ipv6QuestionsOID[] = { RECURSOR_STATS_OID, 2 }; | |
21 | static const oid tcpQuestionsOID[] = { RECURSOR_STATS_OID, 3 }; | |
22 | static const oid cacheHitsOID[] = { RECURSOR_STATS_OID, 4 }; | |
23 | static const oid cacheMissesOID[] = { RECURSOR_STATS_OID, 5 }; | |
24 | static const oid cacheEntriesOID[] = { RECURSOR_STATS_OID, 6 }; | |
25 | static const oid cacheBytesOID[] = { RECURSOR_STATS_OID, 7 }; | |
26 | static const oid packetcacheHitsOID[] = { RECURSOR_STATS_OID, 8 }; | |
27 | static const oid packetcacheMissesOID[] = { RECURSOR_STATS_OID, 9 }; | |
28 | static const oid packetcacheEntriesOID[] = { RECURSOR_STATS_OID, 10 }; | |
29 | static const oid packetcacheBytesOID[] = { RECURSOR_STATS_OID, 11 }; | |
30 | static const oid mallocBytesOID[] = { RECURSOR_STATS_OID, 12 }; | |
31 | static const oid servfailAnswersOID[] = { RECURSOR_STATS_OID, 13 }; | |
32 | static const oid nxdomainAnswersOID[] = { RECURSOR_STATS_OID, 14 }; | |
33 | static const oid noerrorAnswersOID[] = { RECURSOR_STATS_OID, 15 }; | |
34 | static const oid unauthorizedUdpOID[] = { RECURSOR_STATS_OID, 16 }; | |
35 | static const oid unauthorizedTcpOID[] = { RECURSOR_STATS_OID, 17 }; | |
36 | static const oid tcpClientOverflowOID[] = { RECURSOR_STATS_OID, 18 }; | |
37 | static const oid clientParseErrorsOID[] = { RECURSOR_STATS_OID, 19 }; | |
38 | static const oid serverParseErrorsOID[] = { RECURSOR_STATS_OID, 20 }; | |
39 | static const oid tooOldDropsOID[] = { RECURSOR_STATS_OID, 21 }; | |
40 | static const oid answers01OID[] = { RECURSOR_STATS_OID, 22 }; | |
41 | static const oid answers110OID[] = { RECURSOR_STATS_OID, 23 }; | |
42 | static const oid answers10100OID[] = { RECURSOR_STATS_OID, 24 }; | |
43 | static const oid answers1001000OID[] = { RECURSOR_STATS_OID, 25 }; | |
44 | static const oid answersSlowOID[] = { RECURSOR_STATS_OID, 26 }; | |
45 | static const oid auth4Answers01OID[] = { RECURSOR_STATS_OID, 27 }; | |
46 | static const oid auth4Answers110OID[] = { RECURSOR_STATS_OID, 28 }; | |
47 | static const oid auth4Answers10100OID[] = { RECURSOR_STATS_OID, 29 }; | |
48 | static const oid auth4Answers1001000OID[] = { RECURSOR_STATS_OID, 30 }; | |
49 | static const oid auth4AnswersslowOID[] = { RECURSOR_STATS_OID, 31 }; | |
50 | static const oid auth6Answers01OID[] = { RECURSOR_STATS_OID, 32 }; | |
51 | static const oid auth6Answers110OID[] = { RECURSOR_STATS_OID, 33 }; | |
52 | static const oid auth6Answers10100OID[] = { RECURSOR_STATS_OID, 34 }; | |
53 | static const oid auth6Answers1001000OID[] = { RECURSOR_STATS_OID, 35 }; | |
54 | static const oid auth6AnswersSlowOID[] = { RECURSOR_STATS_OID, 36 }; | |
55 | static const oid qaLatencyOID[] = { RECURSOR_STATS_OID, 37 }; | |
56 | static const oid unexpectedPacketsOID[] = { RECURSOR_STATS_OID, 38 }; | |
57 | static const oid caseMismatchesOID[] = { RECURSOR_STATS_OID, 39 }; | |
58 | static const oid spoofPreventsOID[] = { RECURSOR_STATS_OID, 40 }; | |
59 | static const oid nssetInvalidationsOID[] = { RECURSOR_STATS_OID, 41 }; | |
60 | static const oid resourceLimitsOID[] = { RECURSOR_STATS_OID, 42 }; | |
61 | static const oid overCapacityDropsOID[] = { RECURSOR_STATS_OID, 43 }; | |
62 | static const oid policyDropsOID[] = { RECURSOR_STATS_OID, 44 }; | |
63 | static const oid noPacketErrorOID[] = { RECURSOR_STATS_OID, 45 }; | |
64 | static const oid dlgOnlyDropsOID[] = { RECURSOR_STATS_OID, 46 }; | |
65 | static const oid ignoredPacketsOID[] = { RECURSOR_STATS_OID, 47 }; | |
66 | static const oid maxMthreadStackOID[] = { RECURSOR_STATS_OID, 48 }; | |
67 | static const oid negcacheEntriesOID[] = { RECURSOR_STATS_OID, 49 }; | |
68 | static const oid throttleEntriesOID[] = { RECURSOR_STATS_OID, 50 }; | |
69 | static const oid nsspeedsEntriesOID[] = { RECURSOR_STATS_OID, 51 }; | |
70 | static const oid failedHostEntriesOID[] = { RECURSOR_STATS_OID, 52 }; | |
71 | static const oid concurrentQueriesOID[] = { RECURSOR_STATS_OID, 53 }; | |
72 | static const oid securityStatusOID[] = { RECURSOR_STATS_OID, 54 }; | |
73 | static const oid outgoingTimeoutsOID[] = { RECURSOR_STATS_OID, 55 }; | |
74 | static const oid outgoing4TimeoutsOID[] = { RECURSOR_STATS_OID, 56 }; | |
75 | static const oid outgoing6TimeoutsOID[] = { RECURSOR_STATS_OID, 57 }; | |
76 | static const oid tcpOutqueriesOID[] = { RECURSOR_STATS_OID, 58 }; | |
77 | static const oid allOutqueriesOID[] = { RECURSOR_STATS_OID, 59 }; | |
78 | static const oid ipv6OutqueriesOID[] = { RECURSOR_STATS_OID, 60 }; | |
79 | static const oid throttledOutqueriesOID[] = { RECURSOR_STATS_OID, 61 }; | |
80 | static const oid dontOutqueriesOID[] = { RECURSOR_STATS_OID, 62 }; | |
81 | static const oid unreachablesOID[] = { RECURSOR_STATS_OID, 63 }; | |
82 | static const oid chainResendsOID[] = { RECURSOR_STATS_OID, 64 }; | |
83 | static const oid tcpClientsOID[] = { RECURSOR_STATS_OID, 65 }; | |
84 | static const oid udpRecvbufErrorsOID[] = { RECURSOR_STATS_OID, 66 }; | |
85 | static const oid udpSndbufErrorsOID[] = { RECURSOR_STATS_OID, 67 }; | |
86 | static const oid udpNoportErrorsOID[] = { RECURSOR_STATS_OID, 68 }; | |
87 | static const oid udpinErrorsOID[] = { RECURSOR_STATS_OID, 69 }; | |
88 | static const oid ednsPingMatchesOID[] = { RECURSOR_STATS_OID, 70 }; | |
89 | static const oid ednsPingMismatchesOID[] = { RECURSOR_STATS_OID, 71 }; | |
90 | static const oid dnssecQueriesOID[] = { RECURSOR_STATS_OID, 72 }; | |
91 | static const oid nopingOutqueriesOID[] = { RECURSOR_STATS_OID, 73 }; | |
92 | static const oid noednsOutqueriesOID[] = { RECURSOR_STATS_OID, 74 }; | |
93 | static const oid uptimeOID[] = { RECURSOR_STATS_OID, 75 }; | |
94 | static const oid realMemoryUsageOID[] = { RECURSOR_STATS_OID, 76 }; | |
95 | static const oid fdUsageOID[] = { RECURSOR_STATS_OID, 77 }; | |
96 | static const oid userMsecOID[] = { RECURSOR_STATS_OID, 78 }; | |
97 | static const oid sysMsecOID[] = { RECURSOR_STATS_OID, 79 }; | |
98 | static const oid dnssecValidationsOID[] = { RECURSOR_STATS_OID, 80 }; | |
99 | static const oid dnssecResultInsecureOID[] = { RECURSOR_STATS_OID, 81 }; | |
100 | static const oid dnssecResultSecureOID[] = { RECURSOR_STATS_OID, 82 }; | |
101 | static const oid dnssecResultBogusOID[] = { RECURSOR_STATS_OID, 83 }; | |
102 | static const oid dnssecResultIndeterminateOID[] = { RECURSOR_STATS_OID, 84 }; | |
103 | static const oid dnssecResultNtaOID[] = { RECURSOR_STATS_OID, 85 }; | |
104 | static const oid policyResultNoactionOID[] = { RECURSOR_STATS_OID, 86 }; | |
105 | static const oid policyResultDropOID[] = { RECURSOR_STATS_OID, 87 }; | |
106 | static const oid policyResultNxdomainOID[] = { RECURSOR_STATS_OID, 88 }; | |
107 | static const oid policyResultNodataOID[] = { RECURSOR_STATS_OID, 89 }; | |
108 | static const oid policyResultTruncateOID[] = { RECURSOR_STATS_OID, 90 }; | |
109 | static const oid policyResultCustomOID[] = { RECURSOR_STATS_OID, 91 }; | |
cf8cda18 | 110 | static const oid queryPipeFullDropsOID[] = { RECURSOR_STATS_OID, 92 }; |
ba892c7f | 111 | static const oid truncatedDropsOID[] = { RECURSOR_STATS_OID, 93 }; |
c0f9be19 | 112 | static const oid emptyQueriesOID[] = { RECURSOR_STATS_OID, 94 }; |
88c33dca RG |
113 | static const oid dnssecAuthenticDataQueriesOID[] = { RECURSOR_STATS_OID, 95 }; |
114 | static const oid dnssecCheckDisabledQueriesOID[] = { RECURSOR_STATS_OID, 96 }; | |
5e58ff50 | 115 | static const oid variableResponsesOID[] = { RECURSOR_STATS_OID, 97 }; |
330dcb5c | 116 | static const oid specialMemoryUsageOID[] = { RECURSOR_STATS_OID, 98 }; |
596bf482 | 117 | static const oid rebalancedQueriesOID[] = { RECURSOR_STATS_OID, 99 }; |
c701672a | 118 | static const oid qnameMinFallbackSuccessOID[] = { RECURSOR_STATS_OID, 100 }; |
5216ddcc | 119 | static const oid proxyProtocolInvalidOID[] = { RECURSOR_STATS_OID, 101 }; |
d705aad9 RG |
120 | |
121 | static std::unordered_map<oid, std::string> s_statsMap; | |
122 | ||
123 | /* We are never called for a GETNEXT if it's registered as a | |
124 | "instance", as it's "magically" handled for us. */ | |
125 | /* a instance handler also only hands us one request at a time, so | |
126 | we don't need to loop over a list of requests; we'll only get one. */ | |
127 | ||
128 | static int handleCounter64Stats(netsnmp_mib_handler* handler, | |
129 | netsnmp_handler_registration* reginfo, | |
130 | netsnmp_agent_request_info* reqinfo, | |
131 | netsnmp_request_info* requests) | |
132 | { | |
133 | if (reqinfo->mode != MODE_GET) { | |
134 | return SNMP_ERR_GENERR; | |
135 | } | |
136 | ||
137 | if (reginfo->rootoid_len != OID_LENGTH(questionsOID) + 1) { | |
138 | return SNMP_ERR_GENERR; | |
139 | } | |
140 | ||
141 | const auto& it = s_statsMap.find(reginfo->rootoid[reginfo->rootoid_len - 2]); | |
142 | if (it == s_statsMap.end()) { | |
143 | return SNMP_ERR_GENERR; | |
144 | } | |
145 | ||
146 | optional<uint64_t> value = getStatByName(it->second); | |
147 | if (value) { | |
148 | return RecursorSNMPAgent::setCounter64Value(requests, *value); | |
149 | } else { | |
150 | return RecursorSNMPAgent::setCounter64Value(requests, 0); | |
151 | } | |
152 | } | |
153 | ||
5e08df89 RG |
154 | static int handleDisabledCounter64Stats(netsnmp_mib_handler* handler, |
155 | netsnmp_handler_registration* reginfo, | |
156 | netsnmp_agent_request_info* reqinfo, | |
157 | netsnmp_request_info* requests) | |
158 | { | |
159 | if (reqinfo->mode != MODE_GET) { | |
160 | return SNMP_ERR_GENERR; | |
161 | } | |
162 | ||
163 | if (reginfo->rootoid_len != OID_LENGTH(questionsOID) + 1) { | |
164 | return SNMP_ERR_GENERR; | |
165 | } | |
166 | ||
167 | return RecursorSNMPAgent::setCounter64Value(requests, 0); | |
168 | } | |
169 | ||
72259676 | 170 | static void registerCounter64Stat(const std::string& name, const oid statOID[], size_t statOIDLength) |
d705aad9 RG |
171 | { |
172 | if (statOIDLength != OID_LENGTH(questionsOID)) { | |
5e08df89 | 173 | g_log<<Logger::Error<<"Invalid OID for SNMP Counter64 statistic "<<name<<endl; |
d705aad9 RG |
174 | return; |
175 | } | |
176 | ||
177 | if (s_statsMap.find(statOID[statOIDLength - 1]) != s_statsMap.end()) { | |
5e08df89 | 178 | g_log<<Logger::Error<<"OID for SNMP Counter64 statistic "<<name<<" has already been registered"<<endl; |
d705aad9 RG |
179 | return; |
180 | } | |
181 | ||
5e08df89 RG |
182 | s_statsMap[statOID[statOIDLength - 1]] = name.c_str(); |
183 | netsnmp_register_scalar(netsnmp_create_handler_registration(name.c_str(), | |
3fc5b512 OM |
184 | isStatBlacklisted(StatComponent::SNMP, name) ? |
185 | handleDisabledCounter64Stats : handleCounter64Stats, | |
d705aad9 RG |
186 | statOID, |
187 | statOIDLength, | |
188 | HANDLER_CAN_RONLY)); | |
189 | } | |
190 | ||
191 | #endif /* HAVE_NET_SNMP */ | |
192 | ||
193 | std::shared_ptr<RecursorSNMPAgent> g_snmpAgent{nullptr}; | |
194 | ||
195 | bool RecursorSNMPAgent::sendCustomTrap(const std::string& reason) | |
196 | { | |
197 | #ifdef HAVE_NET_SNMP | |
198 | netsnmp_variable_list* varList = nullptr; | |
199 | ||
200 | snmp_varlist_add_variable(&varList, | |
201 | snmpTrapOID, | |
202 | snmpTrapOIDLen, | |
203 | ASN_OBJECT_ID, | |
204 | customTrapOID, | |
205 | OID_LENGTH(customTrapOID) * sizeof(oid)); | |
206 | ||
207 | snmp_varlist_add_variable(&varList, | |
208 | trapReasonOID, | |
209 | OID_LENGTH(trapReasonOID), | |
210 | ASN_OCTET_STR, | |
211 | reason.c_str(), | |
212 | reason.size()); | |
213 | ||
214 | return sendTrap(d_trapPipe[1], varList); | |
215 | #endif /* HAVE_NET_SNMP */ | |
216 | return true; | |
217 | } | |
218 | ||
219 | ||
72259676 | 220 | RecursorSNMPAgent::RecursorSNMPAgent(const std::string& name, const std::string& masterSocket): SNMPAgent(name, masterSocket) |
d705aad9 RG |
221 | { |
222 | #ifdef HAVE_NET_SNMP | |
223 | /* This is done so that the statistics maps are | |
224 | initialized. */ | |
b0b37121 | 225 | registerAllStats(); |
d705aad9 | 226 | |
72259676 RG |
227 | registerCounter64Stat("questions", questionsOID, OID_LENGTH(questionsOID)); |
228 | registerCounter64Stat("ipv6-questions", ipv6QuestionsOID, OID_LENGTH(ipv6QuestionsOID)); | |
229 | registerCounter64Stat("tcp-questions", tcpQuestionsOID, OID_LENGTH(tcpQuestionsOID)); | |
230 | registerCounter64Stat("cache-hits", cacheHitsOID, OID_LENGTH(cacheHitsOID)); | |
231 | registerCounter64Stat("cache-misses", cacheMissesOID, OID_LENGTH(cacheMissesOID)); | |
232 | registerCounter64Stat("cache-entries", cacheEntriesOID, OID_LENGTH(cacheEntriesOID)); | |
233 | registerCounter64Stat("cache-bytes", cacheBytesOID, OID_LENGTH(cacheBytesOID)); | |
234 | registerCounter64Stat("packetcache-hits", packetcacheHitsOID, OID_LENGTH(packetcacheHitsOID)); | |
235 | registerCounter64Stat("packetcache-misses", packetcacheMissesOID, OID_LENGTH(packetcacheMissesOID)); | |
236 | registerCounter64Stat("packetcache-entries", packetcacheEntriesOID, OID_LENGTH(packetcacheEntriesOID)); | |
237 | registerCounter64Stat("packetcache-bytes", packetcacheBytesOID, OID_LENGTH(packetcacheBytesOID)); | |
238 | registerCounter64Stat("malloc-bytes", mallocBytesOID, OID_LENGTH(mallocBytesOID)); | |
239 | registerCounter64Stat("servfail-answers", servfailAnswersOID, OID_LENGTH(servfailAnswersOID)); | |
240 | registerCounter64Stat("nxdomain-answers", nxdomainAnswersOID, OID_LENGTH(nxdomainAnswersOID)); | |
241 | registerCounter64Stat("noerror-answers", noerrorAnswersOID, OID_LENGTH(noerrorAnswersOID)); | |
242 | registerCounter64Stat("unauthorized-udp", unauthorizedUdpOID, OID_LENGTH(unauthorizedUdpOID)); | |
243 | registerCounter64Stat("unauthorized-tcp", unauthorizedTcpOID, OID_LENGTH(unauthorizedTcpOID)); | |
244 | registerCounter64Stat("tcp-client-overflow", tcpClientOverflowOID, OID_LENGTH(tcpClientOverflowOID)); | |
245 | registerCounter64Stat("client-parse-errors", clientParseErrorsOID, OID_LENGTH(clientParseErrorsOID)); | |
246 | registerCounter64Stat("server-parse-errors", serverParseErrorsOID, OID_LENGTH(serverParseErrorsOID)); | |
247 | registerCounter64Stat("too-old-drops", tooOldDropsOID, OID_LENGTH(tooOldDropsOID)); | |
248 | registerCounter64Stat("query-pipe-full-drops", queryPipeFullDropsOID, OID_LENGTH(queryPipeFullDropsOID)); | |
249 | registerCounter64Stat("truncated-drops", truncatedDropsOID, OID_LENGTH(truncatedDropsOID)); | |
250 | registerCounter64Stat("empty-queries", emptyQueriesOID, OID_LENGTH(emptyQueriesOID)); | |
251 | registerCounter64Stat("variable-responses", variableResponsesOID, OID_LENGTH(variableResponsesOID)); | |
252 | registerCounter64Stat("answers0-1", answers01OID, OID_LENGTH(answers01OID)); | |
253 | registerCounter64Stat("answers1-10", answers110OID, OID_LENGTH(answers110OID)); | |
254 | registerCounter64Stat("answers10-100", answers10100OID, OID_LENGTH(answers10100OID)); | |
255 | registerCounter64Stat("answers100-1000", answers1001000OID, OID_LENGTH(answers1001000OID)); | |
256 | registerCounter64Stat("answers-slow", answersSlowOID, OID_LENGTH(answersSlowOID)); | |
257 | registerCounter64Stat("auth4-answers0-1", auth4Answers01OID, OID_LENGTH(auth4Answers01OID)); | |
258 | registerCounter64Stat("auth4-answers1-10", auth4Answers110OID, OID_LENGTH(auth4Answers110OID)); | |
259 | registerCounter64Stat("auth4-answers10-100", auth4Answers10100OID, OID_LENGTH(auth4Answers10100OID)); | |
260 | registerCounter64Stat("auth4-answers100-1000", auth4Answers1001000OID, OID_LENGTH(auth4Answers1001000OID)); | |
261 | registerCounter64Stat("auth4-answers-slow", auth4AnswersslowOID, OID_LENGTH(auth4AnswersslowOID)); | |
262 | registerCounter64Stat("auth6-answers0-1", auth6Answers01OID, OID_LENGTH(auth6Answers01OID)); | |
263 | registerCounter64Stat("auth6-answers1-10", auth6Answers110OID, OID_LENGTH(auth6Answers110OID)); | |
264 | registerCounter64Stat("auth6-answers10-100", auth6Answers10100OID, OID_LENGTH(auth6Answers10100OID)); | |
265 | registerCounter64Stat("auth6-answers100-1000", auth6Answers1001000OID, OID_LENGTH(auth6Answers1001000OID)); | |
266 | registerCounter64Stat("auth6-answers-slow", auth6AnswersSlowOID, OID_LENGTH(auth6AnswersSlowOID)); | |
267 | registerCounter64Stat("qa-latency", qaLatencyOID, OID_LENGTH(qaLatencyOID)); | |
268 | registerCounter64Stat("unexpected-packets", unexpectedPacketsOID, OID_LENGTH(unexpectedPacketsOID)); | |
269 | registerCounter64Stat("case-mismatches", caseMismatchesOID, OID_LENGTH(caseMismatchesOID)); | |
270 | registerCounter64Stat("spoof-prevents", spoofPreventsOID, OID_LENGTH(spoofPreventsOID)); | |
271 | registerCounter64Stat("nsset-invalidations", nssetInvalidationsOID, OID_LENGTH(nssetInvalidationsOID)); | |
272 | registerCounter64Stat("resource-limits", resourceLimitsOID, OID_LENGTH(resourceLimitsOID)); | |
273 | registerCounter64Stat("over-capacity-drops", overCapacityDropsOID, OID_LENGTH(overCapacityDropsOID)); | |
274 | registerCounter64Stat("policy-drops", policyDropsOID, OID_LENGTH(policyDropsOID)); | |
275 | registerCounter64Stat("no-packet-error", noPacketErrorOID, OID_LENGTH(noPacketErrorOID)); | |
276 | registerCounter64Stat("dlg-only-drops", dlgOnlyDropsOID, OID_LENGTH(dlgOnlyDropsOID)); | |
277 | registerCounter64Stat("ignored-packets", ignoredPacketsOID, OID_LENGTH(ignoredPacketsOID)); | |
278 | registerCounter64Stat("max-mthread-stack", maxMthreadStackOID, OID_LENGTH(maxMthreadStackOID)); | |
279 | registerCounter64Stat("negcache-entries", negcacheEntriesOID, OID_LENGTH(negcacheEntriesOID)); | |
280 | registerCounter64Stat("throttle-entries", throttleEntriesOID, OID_LENGTH(throttleEntriesOID)); | |
281 | registerCounter64Stat("nsspeeds-entries", nsspeedsEntriesOID, OID_LENGTH(nsspeedsEntriesOID)); | |
282 | registerCounter64Stat("failed-host-entries", failedHostEntriesOID, OID_LENGTH(failedHostEntriesOID)); | |
283 | registerCounter64Stat("concurrent-queries", concurrentQueriesOID, OID_LENGTH(concurrentQueriesOID)); | |
284 | registerCounter64Stat("security-status", securityStatusOID, OID_LENGTH(securityStatusOID)); | |
285 | registerCounter64Stat("outgoing-timeouts", outgoingTimeoutsOID, OID_LENGTH(outgoingTimeoutsOID)); | |
286 | registerCounter64Stat("outgoing4-timeouts", outgoing4TimeoutsOID, OID_LENGTH(outgoing4TimeoutsOID)); | |
287 | registerCounter64Stat("outgoing6-timeouts", outgoing6TimeoutsOID, OID_LENGTH(outgoing6TimeoutsOID)); | |
288 | registerCounter64Stat("tcp-outqueries", tcpOutqueriesOID, OID_LENGTH(tcpOutqueriesOID)); | |
289 | registerCounter64Stat("all-outqueries", allOutqueriesOID, OID_LENGTH(allOutqueriesOID)); | |
290 | registerCounter64Stat("ipv6-outqueries", ipv6OutqueriesOID, OID_LENGTH(ipv6OutqueriesOID)); | |
291 | registerCounter64Stat("throttled-outqueries", throttledOutqueriesOID, OID_LENGTH(throttledOutqueriesOID)); | |
292 | registerCounter64Stat("dont-outqueries", dontOutqueriesOID, OID_LENGTH(dontOutqueriesOID)); | |
c701672a | 293 | registerCounter64Stat("qname-min-fallback-success", qnameMinFallbackSuccessOID, OID_LENGTH(qnameMinFallbackSuccessOID)); |
72259676 RG |
294 | registerCounter64Stat("unreachables", unreachablesOID, OID_LENGTH(unreachablesOID)); |
295 | registerCounter64Stat("chain-resends", chainResendsOID, OID_LENGTH(chainResendsOID)); | |
296 | registerCounter64Stat("tcp-clients", tcpClientsOID, OID_LENGTH(tcpClientsOID)); | |
d705aad9 | 297 | #ifdef __linux__ |
72259676 RG |
298 | registerCounter64Stat("udp-recvbuf-errors", udpRecvbufErrorsOID, OID_LENGTH(udpRecvbufErrorsOID)); |
299 | registerCounter64Stat("udp-sndbuf-errors", udpSndbufErrorsOID, OID_LENGTH(udpSndbufErrorsOID)); | |
300 | registerCounter64Stat("udp-noport-errors", udpNoportErrorsOID, OID_LENGTH(udpNoportErrorsOID)); | |
301 | registerCounter64Stat("udp-in-errors", udpinErrorsOID, OID_LENGTH(udpinErrorsOID)); | |
d705aad9 | 302 | #endif /* __linux__ */ |
72259676 RG |
303 | registerCounter64Stat("edns-ping-matches", ednsPingMatchesOID, OID_LENGTH(ednsPingMatchesOID)); |
304 | registerCounter64Stat("edns-ping-mismatches", ednsPingMismatchesOID, OID_LENGTH(ednsPingMismatchesOID)); | |
305 | registerCounter64Stat("dnssec-queries", dnssecQueriesOID, OID_LENGTH(dnssecQueriesOID)); | |
306 | registerCounter64Stat("dnssec-authentic-data-queries", dnssecAuthenticDataQueriesOID, OID_LENGTH(dnssecAuthenticDataQueriesOID)); | |
307 | registerCounter64Stat("dnssec-check-disabled-queries", dnssecCheckDisabledQueriesOID, OID_LENGTH(dnssecCheckDisabledQueriesOID)); | |
308 | registerCounter64Stat("noping-outqueries", nopingOutqueriesOID, OID_LENGTH(nopingOutqueriesOID)); | |
309 | registerCounter64Stat("noedns-outqueries", noednsOutqueriesOID, OID_LENGTH(noednsOutqueriesOID)); | |
310 | registerCounter64Stat("uptime", uptimeOID, OID_LENGTH(uptimeOID)); | |
311 | registerCounter64Stat("real-memory-usage", realMemoryUsageOID, OID_LENGTH(realMemoryUsageOID)); | |
312 | registerCounter64Stat("fd-usage", fdUsageOID, OID_LENGTH(fdUsageOID)); | |
313 | registerCounter64Stat("user-msec", userMsecOID, OID_LENGTH(userMsecOID)); | |
314 | registerCounter64Stat("sys-msec", sysMsecOID, OID_LENGTH(sysMsecOID)); | |
315 | registerCounter64Stat("dnssec-validations", dnssecValidationsOID, OID_LENGTH(dnssecValidationsOID)); | |
316 | registerCounter64Stat("dnssec-result-insecure", dnssecResultInsecureOID, OID_LENGTH(dnssecResultInsecureOID)); | |
317 | registerCounter64Stat("dnssec-result-secure", dnssecResultSecureOID, OID_LENGTH(dnssecResultSecureOID)); | |
318 | registerCounter64Stat("dnssec-result-bogus", dnssecResultBogusOID, OID_LENGTH(dnssecResultBogusOID)); | |
319 | registerCounter64Stat("dnssec-result-indeterminate", dnssecResultIndeterminateOID, OID_LENGTH(dnssecResultIndeterminateOID)); | |
320 | registerCounter64Stat("dnssec-result-nta", dnssecResultNtaOID, OID_LENGTH(dnssecResultNtaOID)); | |
321 | registerCounter64Stat("policy-result-noaction", policyResultNoactionOID, OID_LENGTH(policyResultNoactionOID)); | |
322 | registerCounter64Stat("policy-result-drop", policyResultDropOID, OID_LENGTH(policyResultDropOID)); | |
323 | registerCounter64Stat("policy-result-nxdomain", policyResultNxdomainOID, OID_LENGTH(policyResultNxdomainOID)); | |
324 | registerCounter64Stat("policy-result-nodata", policyResultNodataOID, OID_LENGTH(policyResultNodataOID)); | |
325 | registerCounter64Stat("policy-result-truncate", policyResultTruncateOID, OID_LENGTH(policyResultTruncateOID)); | |
326 | registerCounter64Stat("policy-result-custom", policyResultCustomOID, OID_LENGTH(policyResultCustomOID)); | |
327 | registerCounter64Stat("special-memory-usage", specialMemoryUsageOID, OID_LENGTH(specialMemoryUsageOID)); | |
596bf482 | 328 | registerCounter64Stat("rebalanced-queries", rebalancedQueriesOID, OID_LENGTH(rebalancedQueriesOID)); |
5216ddcc | 329 | registerCounter64Stat("proxy-protocol-invalid", proxyProtocolInvalidOID, OID_LENGTH(proxyProtocolInvalidOID)); |
d705aad9 RG |
330 | #endif /* HAVE_NET_SNMP */ |
331 | } |