]>
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 }; |
d705aad9 RG |
118 | |
119 | static std::unordered_map<oid, std::string> s_statsMap; | |
120 | ||
121 | /* We are never called for a GETNEXT if it's registered as a | |
122 | "instance", as it's "magically" handled for us. */ | |
123 | /* a instance handler also only hands us one request at a time, so | |
124 | we don't need to loop over a list of requests; we'll only get one. */ | |
125 | ||
126 | static int handleCounter64Stats(netsnmp_mib_handler* handler, | |
127 | netsnmp_handler_registration* reginfo, | |
128 | netsnmp_agent_request_info* reqinfo, | |
129 | netsnmp_request_info* requests) | |
130 | { | |
131 | if (reqinfo->mode != MODE_GET) { | |
132 | return SNMP_ERR_GENERR; | |
133 | } | |
134 | ||
135 | if (reginfo->rootoid_len != OID_LENGTH(questionsOID) + 1) { | |
136 | return SNMP_ERR_GENERR; | |
137 | } | |
138 | ||
139 | const auto& it = s_statsMap.find(reginfo->rootoid[reginfo->rootoid_len - 2]); | |
140 | if (it == s_statsMap.end()) { | |
141 | return SNMP_ERR_GENERR; | |
142 | } | |
143 | ||
144 | optional<uint64_t> value = getStatByName(it->second); | |
145 | if (value) { | |
146 | return RecursorSNMPAgent::setCounter64Value(requests, *value); | |
147 | } else { | |
148 | return RecursorSNMPAgent::setCounter64Value(requests, 0); | |
149 | } | |
150 | } | |
151 | ||
5e08df89 RG |
152 | static int handleDisabledCounter64Stats(netsnmp_mib_handler* handler, |
153 | netsnmp_handler_registration* reginfo, | |
154 | netsnmp_agent_request_info* reqinfo, | |
155 | netsnmp_request_info* requests) | |
156 | { | |
157 | if (reqinfo->mode != MODE_GET) { | |
158 | return SNMP_ERR_GENERR; | |
159 | } | |
160 | ||
161 | if (reginfo->rootoid_len != OID_LENGTH(questionsOID) + 1) { | |
162 | return SNMP_ERR_GENERR; | |
163 | } | |
164 | ||
165 | return RecursorSNMPAgent::setCounter64Value(requests, 0); | |
166 | } | |
167 | ||
72259676 | 168 | static void registerCounter64Stat(const std::string& name, const oid statOID[], size_t statOIDLength) |
d705aad9 RG |
169 | { |
170 | if (statOIDLength != OID_LENGTH(questionsOID)) { | |
5e08df89 | 171 | g_log<<Logger::Error<<"Invalid OID for SNMP Counter64 statistic "<<name<<endl; |
d705aad9 RG |
172 | return; |
173 | } | |
174 | ||
175 | if (s_statsMap.find(statOID[statOIDLength - 1]) != s_statsMap.end()) { | |
5e08df89 | 176 | g_log<<Logger::Error<<"OID for SNMP Counter64 statistic "<<name<<" has already been registered"<<endl; |
d705aad9 RG |
177 | return; |
178 | } | |
179 | ||
5e08df89 RG |
180 | s_statsMap[statOID[statOIDLength - 1]] = name.c_str(); |
181 | netsnmp_register_scalar(netsnmp_create_handler_registration(name.c_str(), | |
72259676 | 182 | isStatBlacklisted(StatComponent::SNMP, name) ? handleCounter64Stats : handleDisabledCounter64Stats, |
d705aad9 RG |
183 | statOID, |
184 | statOIDLength, | |
185 | HANDLER_CAN_RONLY)); | |
186 | } | |
187 | ||
188 | #endif /* HAVE_NET_SNMP */ | |
189 | ||
190 | std::shared_ptr<RecursorSNMPAgent> g_snmpAgent{nullptr}; | |
191 | ||
192 | bool RecursorSNMPAgent::sendCustomTrap(const std::string& reason) | |
193 | { | |
194 | #ifdef HAVE_NET_SNMP | |
195 | netsnmp_variable_list* varList = nullptr; | |
196 | ||
197 | snmp_varlist_add_variable(&varList, | |
198 | snmpTrapOID, | |
199 | snmpTrapOIDLen, | |
200 | ASN_OBJECT_ID, | |
201 | customTrapOID, | |
202 | OID_LENGTH(customTrapOID) * sizeof(oid)); | |
203 | ||
204 | snmp_varlist_add_variable(&varList, | |
205 | trapReasonOID, | |
206 | OID_LENGTH(trapReasonOID), | |
207 | ASN_OCTET_STR, | |
208 | reason.c_str(), | |
209 | reason.size()); | |
210 | ||
211 | return sendTrap(d_trapPipe[1], varList); | |
212 | #endif /* HAVE_NET_SNMP */ | |
213 | return true; | |
214 | } | |
215 | ||
216 | ||
72259676 | 217 | RecursorSNMPAgent::RecursorSNMPAgent(const std::string& name, const std::string& masterSocket): SNMPAgent(name, masterSocket) |
d705aad9 RG |
218 | { |
219 | #ifdef HAVE_NET_SNMP | |
220 | /* This is done so that the statistics maps are | |
221 | initialized. */ | |
b0b37121 | 222 | registerAllStats(); |
d705aad9 | 223 | |
72259676 RG |
224 | registerCounter64Stat("questions", questionsOID, OID_LENGTH(questionsOID)); |
225 | registerCounter64Stat("ipv6-questions", ipv6QuestionsOID, OID_LENGTH(ipv6QuestionsOID)); | |
226 | registerCounter64Stat("tcp-questions", tcpQuestionsOID, OID_LENGTH(tcpQuestionsOID)); | |
227 | registerCounter64Stat("cache-hits", cacheHitsOID, OID_LENGTH(cacheHitsOID)); | |
228 | registerCounter64Stat("cache-misses", cacheMissesOID, OID_LENGTH(cacheMissesOID)); | |
229 | registerCounter64Stat("cache-entries", cacheEntriesOID, OID_LENGTH(cacheEntriesOID)); | |
230 | registerCounter64Stat("cache-bytes", cacheBytesOID, OID_LENGTH(cacheBytesOID)); | |
231 | registerCounter64Stat("packetcache-hits", packetcacheHitsOID, OID_LENGTH(packetcacheHitsOID)); | |
232 | registerCounter64Stat("packetcache-misses", packetcacheMissesOID, OID_LENGTH(packetcacheMissesOID)); | |
233 | registerCounter64Stat("packetcache-entries", packetcacheEntriesOID, OID_LENGTH(packetcacheEntriesOID)); | |
234 | registerCounter64Stat("packetcache-bytes", packetcacheBytesOID, OID_LENGTH(packetcacheBytesOID)); | |
235 | registerCounter64Stat("malloc-bytes", mallocBytesOID, OID_LENGTH(mallocBytesOID)); | |
236 | registerCounter64Stat("servfail-answers", servfailAnswersOID, OID_LENGTH(servfailAnswersOID)); | |
237 | registerCounter64Stat("nxdomain-answers", nxdomainAnswersOID, OID_LENGTH(nxdomainAnswersOID)); | |
238 | registerCounter64Stat("noerror-answers", noerrorAnswersOID, OID_LENGTH(noerrorAnswersOID)); | |
239 | registerCounter64Stat("unauthorized-udp", unauthorizedUdpOID, OID_LENGTH(unauthorizedUdpOID)); | |
240 | registerCounter64Stat("unauthorized-tcp", unauthorizedTcpOID, OID_LENGTH(unauthorizedTcpOID)); | |
241 | registerCounter64Stat("tcp-client-overflow", tcpClientOverflowOID, OID_LENGTH(tcpClientOverflowOID)); | |
242 | registerCounter64Stat("client-parse-errors", clientParseErrorsOID, OID_LENGTH(clientParseErrorsOID)); | |
243 | registerCounter64Stat("server-parse-errors", serverParseErrorsOID, OID_LENGTH(serverParseErrorsOID)); | |
244 | registerCounter64Stat("too-old-drops", tooOldDropsOID, OID_LENGTH(tooOldDropsOID)); | |
245 | registerCounter64Stat("query-pipe-full-drops", queryPipeFullDropsOID, OID_LENGTH(queryPipeFullDropsOID)); | |
246 | registerCounter64Stat("truncated-drops", truncatedDropsOID, OID_LENGTH(truncatedDropsOID)); | |
247 | registerCounter64Stat("empty-queries", emptyQueriesOID, OID_LENGTH(emptyQueriesOID)); | |
248 | registerCounter64Stat("variable-responses", variableResponsesOID, OID_LENGTH(variableResponsesOID)); | |
249 | registerCounter64Stat("answers0-1", answers01OID, OID_LENGTH(answers01OID)); | |
250 | registerCounter64Stat("answers1-10", answers110OID, OID_LENGTH(answers110OID)); | |
251 | registerCounter64Stat("answers10-100", answers10100OID, OID_LENGTH(answers10100OID)); | |
252 | registerCounter64Stat("answers100-1000", answers1001000OID, OID_LENGTH(answers1001000OID)); | |
253 | registerCounter64Stat("answers-slow", answersSlowOID, OID_LENGTH(answersSlowOID)); | |
254 | registerCounter64Stat("auth4-answers0-1", auth4Answers01OID, OID_LENGTH(auth4Answers01OID)); | |
255 | registerCounter64Stat("auth4-answers1-10", auth4Answers110OID, OID_LENGTH(auth4Answers110OID)); | |
256 | registerCounter64Stat("auth4-answers10-100", auth4Answers10100OID, OID_LENGTH(auth4Answers10100OID)); | |
257 | registerCounter64Stat("auth4-answers100-1000", auth4Answers1001000OID, OID_LENGTH(auth4Answers1001000OID)); | |
258 | registerCounter64Stat("auth4-answers-slow", auth4AnswersslowOID, OID_LENGTH(auth4AnswersslowOID)); | |
259 | registerCounter64Stat("auth6-answers0-1", auth6Answers01OID, OID_LENGTH(auth6Answers01OID)); | |
260 | registerCounter64Stat("auth6-answers1-10", auth6Answers110OID, OID_LENGTH(auth6Answers110OID)); | |
261 | registerCounter64Stat("auth6-answers10-100", auth6Answers10100OID, OID_LENGTH(auth6Answers10100OID)); | |
262 | registerCounter64Stat("auth6-answers100-1000", auth6Answers1001000OID, OID_LENGTH(auth6Answers1001000OID)); | |
263 | registerCounter64Stat("auth6-answers-slow", auth6AnswersSlowOID, OID_LENGTH(auth6AnswersSlowOID)); | |
264 | registerCounter64Stat("qa-latency", qaLatencyOID, OID_LENGTH(qaLatencyOID)); | |
265 | registerCounter64Stat("unexpected-packets", unexpectedPacketsOID, OID_LENGTH(unexpectedPacketsOID)); | |
266 | registerCounter64Stat("case-mismatches", caseMismatchesOID, OID_LENGTH(caseMismatchesOID)); | |
267 | registerCounter64Stat("spoof-prevents", spoofPreventsOID, OID_LENGTH(spoofPreventsOID)); | |
268 | registerCounter64Stat("nsset-invalidations", nssetInvalidationsOID, OID_LENGTH(nssetInvalidationsOID)); | |
269 | registerCounter64Stat("resource-limits", resourceLimitsOID, OID_LENGTH(resourceLimitsOID)); | |
270 | registerCounter64Stat("over-capacity-drops", overCapacityDropsOID, OID_LENGTH(overCapacityDropsOID)); | |
271 | registerCounter64Stat("policy-drops", policyDropsOID, OID_LENGTH(policyDropsOID)); | |
272 | registerCounter64Stat("no-packet-error", noPacketErrorOID, OID_LENGTH(noPacketErrorOID)); | |
273 | registerCounter64Stat("dlg-only-drops", dlgOnlyDropsOID, OID_LENGTH(dlgOnlyDropsOID)); | |
274 | registerCounter64Stat("ignored-packets", ignoredPacketsOID, OID_LENGTH(ignoredPacketsOID)); | |
275 | registerCounter64Stat("max-mthread-stack", maxMthreadStackOID, OID_LENGTH(maxMthreadStackOID)); | |
276 | registerCounter64Stat("negcache-entries", negcacheEntriesOID, OID_LENGTH(negcacheEntriesOID)); | |
277 | registerCounter64Stat("throttle-entries", throttleEntriesOID, OID_LENGTH(throttleEntriesOID)); | |
278 | registerCounter64Stat("nsspeeds-entries", nsspeedsEntriesOID, OID_LENGTH(nsspeedsEntriesOID)); | |
279 | registerCounter64Stat("failed-host-entries", failedHostEntriesOID, OID_LENGTH(failedHostEntriesOID)); | |
280 | registerCounter64Stat("concurrent-queries", concurrentQueriesOID, OID_LENGTH(concurrentQueriesOID)); | |
281 | registerCounter64Stat("security-status", securityStatusOID, OID_LENGTH(securityStatusOID)); | |
282 | registerCounter64Stat("outgoing-timeouts", outgoingTimeoutsOID, OID_LENGTH(outgoingTimeoutsOID)); | |
283 | registerCounter64Stat("outgoing4-timeouts", outgoing4TimeoutsOID, OID_LENGTH(outgoing4TimeoutsOID)); | |
284 | registerCounter64Stat("outgoing6-timeouts", outgoing6TimeoutsOID, OID_LENGTH(outgoing6TimeoutsOID)); | |
285 | registerCounter64Stat("tcp-outqueries", tcpOutqueriesOID, OID_LENGTH(tcpOutqueriesOID)); | |
286 | registerCounter64Stat("all-outqueries", allOutqueriesOID, OID_LENGTH(allOutqueriesOID)); | |
287 | registerCounter64Stat("ipv6-outqueries", ipv6OutqueriesOID, OID_LENGTH(ipv6OutqueriesOID)); | |
288 | registerCounter64Stat("throttled-outqueries", throttledOutqueriesOID, OID_LENGTH(throttledOutqueriesOID)); | |
289 | registerCounter64Stat("dont-outqueries", dontOutqueriesOID, OID_LENGTH(dontOutqueriesOID)); | |
290 | registerCounter64Stat("unreachables", unreachablesOID, OID_LENGTH(unreachablesOID)); | |
291 | registerCounter64Stat("chain-resends", chainResendsOID, OID_LENGTH(chainResendsOID)); | |
292 | registerCounter64Stat("tcp-clients", tcpClientsOID, OID_LENGTH(tcpClientsOID)); | |
d705aad9 | 293 | #ifdef __linux__ |
72259676 RG |
294 | registerCounter64Stat("udp-recvbuf-errors", udpRecvbufErrorsOID, OID_LENGTH(udpRecvbufErrorsOID)); |
295 | registerCounter64Stat("udp-sndbuf-errors", udpSndbufErrorsOID, OID_LENGTH(udpSndbufErrorsOID)); | |
296 | registerCounter64Stat("udp-noport-errors", udpNoportErrorsOID, OID_LENGTH(udpNoportErrorsOID)); | |
297 | registerCounter64Stat("udp-in-errors", udpinErrorsOID, OID_LENGTH(udpinErrorsOID)); | |
d705aad9 | 298 | #endif /* __linux__ */ |
72259676 RG |
299 | registerCounter64Stat("edns-ping-matches", ednsPingMatchesOID, OID_LENGTH(ednsPingMatchesOID)); |
300 | registerCounter64Stat("edns-ping-mismatches", ednsPingMismatchesOID, OID_LENGTH(ednsPingMismatchesOID)); | |
301 | registerCounter64Stat("dnssec-queries", dnssecQueriesOID, OID_LENGTH(dnssecQueriesOID)); | |
302 | registerCounter64Stat("dnssec-authentic-data-queries", dnssecAuthenticDataQueriesOID, OID_LENGTH(dnssecAuthenticDataQueriesOID)); | |
303 | registerCounter64Stat("dnssec-check-disabled-queries", dnssecCheckDisabledQueriesOID, OID_LENGTH(dnssecCheckDisabledQueriesOID)); | |
304 | registerCounter64Stat("noping-outqueries", nopingOutqueriesOID, OID_LENGTH(nopingOutqueriesOID)); | |
305 | registerCounter64Stat("noedns-outqueries", noednsOutqueriesOID, OID_LENGTH(noednsOutqueriesOID)); | |
306 | registerCounter64Stat("uptime", uptimeOID, OID_LENGTH(uptimeOID)); | |
307 | registerCounter64Stat("real-memory-usage", realMemoryUsageOID, OID_LENGTH(realMemoryUsageOID)); | |
308 | registerCounter64Stat("fd-usage", fdUsageOID, OID_LENGTH(fdUsageOID)); | |
309 | registerCounter64Stat("user-msec", userMsecOID, OID_LENGTH(userMsecOID)); | |
310 | registerCounter64Stat("sys-msec", sysMsecOID, OID_LENGTH(sysMsecOID)); | |
311 | registerCounter64Stat("dnssec-validations", dnssecValidationsOID, OID_LENGTH(dnssecValidationsOID)); | |
312 | registerCounter64Stat("dnssec-result-insecure", dnssecResultInsecureOID, OID_LENGTH(dnssecResultInsecureOID)); | |
313 | registerCounter64Stat("dnssec-result-secure", dnssecResultSecureOID, OID_LENGTH(dnssecResultSecureOID)); | |
314 | registerCounter64Stat("dnssec-result-bogus", dnssecResultBogusOID, OID_LENGTH(dnssecResultBogusOID)); | |
315 | registerCounter64Stat("dnssec-result-indeterminate", dnssecResultIndeterminateOID, OID_LENGTH(dnssecResultIndeterminateOID)); | |
316 | registerCounter64Stat("dnssec-result-nta", dnssecResultNtaOID, OID_LENGTH(dnssecResultNtaOID)); | |
317 | registerCounter64Stat("policy-result-noaction", policyResultNoactionOID, OID_LENGTH(policyResultNoactionOID)); | |
318 | registerCounter64Stat("policy-result-drop", policyResultDropOID, OID_LENGTH(policyResultDropOID)); | |
319 | registerCounter64Stat("policy-result-nxdomain", policyResultNxdomainOID, OID_LENGTH(policyResultNxdomainOID)); | |
320 | registerCounter64Stat("policy-result-nodata", policyResultNodataOID, OID_LENGTH(policyResultNodataOID)); | |
321 | registerCounter64Stat("policy-result-truncate", policyResultTruncateOID, OID_LENGTH(policyResultTruncateOID)); | |
322 | registerCounter64Stat("policy-result-custom", policyResultCustomOID, OID_LENGTH(policyResultCustomOID)); | |
323 | registerCounter64Stat("special-memory-usage", specialMemoryUsageOID, OID_LENGTH(specialMemoryUsageOID)); | |
596bf482 | 324 | registerCounter64Stat("rebalanced-queries", rebalancedQueriesOID, OID_LENGTH(rebalancedQueriesOID)); |
d705aad9 RG |
325 | #endif /* HAVE_NET_SNMP */ |
326 | } |