Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo on rcode SERVFAIL #627

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libs/visor_dns/dns.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static std::unordered_map<std::string, uint16_t> QTypeNumbers({
static std::unordered_map<uint16_t, std::string> RCodeNames({
{0, "NOERROR"},
{1, "FORMERR"},
{2, "SRVFAIL"},
{2, "SERVFAIL"},
{3, "NXDOMAIN"},
{4, "NOTIMP"},
{5, "REFUSED"},
Expand All @@ -242,7 +242,7 @@ static std::unordered_map<uint16_t, std::string> RCodeNames({
static std::unordered_map<std::string, uint16_t> RCodeNumbers({
{"NOERROR", 0},
{"FORMERR", 1},
{"SRVFAIL", 2},
{"SERVFAIL", 2},
{"NXDOMAIN", 3},
{"NOTIMP", 4},
{"REFUSED", 5},
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/dns/v1/DnsStreamHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class DnsMetricsBucket final : public visor::AbstractMetricsBucket
, IPv6(DNS_SCHEMA, {"wire_packets", "ipv6"}, "Total DNS wire packets received over IPv6 (ingress and egress)")
, NX(DNS_SCHEMA, {"wire_packets", "nxdomain"}, "Total DNS wire packets flagged as reply with return code NXDOMAIN (ingress and egress)")
, REFUSED(DNS_SCHEMA, {"wire_packets", "refused"}, "Total DNS wire packets flagged as reply with return code REFUSED (ingress and egress)")
, SRVFAIL(DNS_SCHEMA, {"wire_packets", "srvfail"}, "Total DNS wire packets flagged as reply with return code SRVFAIL (ingress and egress)")
, SRVFAIL(DNS_SCHEMA, {"wire_packets", "servfail"}, "Total DNS wire packets flagged as reply with return code SERVFAIL (ingress and egress)")
, RNOERROR(DNS_SCHEMA, {"wire_packets", "noerror"}, "Total DNS wire packets flagged as reply with return code NOERROR (ingress and egress)")
, NODATA(DNS_SCHEMA, {"wire_packets", "nodata"}, "Total DNS wire packets flagged as reply with return code NOERROR and no answer section data (ingress and egress)")
, total(DNS_SCHEMA, {"wire_packets", "total"}, "Total DNS wire packets matching the configured filter(s)")
Expand All @@ -150,7 +150,7 @@ class DnsMetricsBucket final : public visor::AbstractMetricsBucket
, _dns_topNX(DNS_SCHEMA, "qname", {"top_nxdomain"}, "Top QNAMES with result code NXDOMAIN")
, _dns_topREFUSED(DNS_SCHEMA, "qname", {"top_refused"}, "Top QNAMES with result code REFUSED")
, _dns_topSizedQnameResp(DNS_SCHEMA, "qname", {"top_qname_by_resp_bytes"}, "Top QNAMES by response volume in bytes")
, _dns_topSRVFAIL(DNS_SCHEMA, "qname", {"top_srvfail"}, "Top QNAMES with result code SRVFAIL")
, _dns_topSRVFAIL(DNS_SCHEMA, "qname", {"top_servfail"}, "Top QNAMES with result code SERVFAIL")
, _dns_topNODATA(DNS_SCHEMA, "qname", {"top_nodata"}, "Top QNAMES with result code NOERROR and no answer section")
, _dns_topNOERROR(DNS_SCHEMA, "qname", {"top_noerror"}, "Top QNAMES with result code NOERROR")
, _dns_topUDPPort(DNS_SCHEMA, "port", {"top_udp_ports"}, "Top UDP source port on the query side of a transaction")
Expand Down
28 changes: 14 additions & 14 deletions src/handlers/dns/v1/tests/window-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
],
"top_refused": [],
"top_qname_by_resp_bytes": [],
"top_srvfail": [],
"top_servfail": [],
"top_udp_ports": [
{
"estimate": 302,
Expand Down Expand Up @@ -161,7 +161,7 @@
"queries": 2930,
"refused": 0,
"replies": 2921,
"srvfail": 0,
"servfail": 0,
"tcp": 2880,
"total": 5851,
"udp": 2971,
Expand Down Expand Up @@ -307,7 +307,7 @@
],
"top_refused": [],
"top_qname_by_resp_bytes": [],
"top_srvfail": [],
"top_servfail": [],
"top_udp_ports": [
{
"estimate": 302,
Expand Down Expand Up @@ -361,7 +361,7 @@
"queries": 2930,
"refused": 0,
"replies": 2921,
"srvfail": 0,
"servfail": 0,
"tcp": 2880,
"total": 5851,
"udp": 2971
Expand Down Expand Up @@ -411,7 +411,7 @@
"top_rcode",
"top_refused",
"top_qname_by_resp_bytes",
"top_srvfail",
"top_servfail",
"top_udp_ports",
"wire_packets",
"xact"
Expand Down Expand Up @@ -849,18 +849,18 @@
"$id": "#/properties/dns/properties/top_qname_by_resp_bytes/items"
}
},
"top_srvfail": {
"$id": "#/properties/dns/properties/top_srvfail",
"top_servfail": {
"$id": "#/properties/dns/properties/top_servfail",
"type": "array",
"title": "The top_srvfail schema",
"title": "The top_servfail schema",
"description": "An explanation about the purpose of this instance.",
"default": [],
"examples": [
[]
],
"additionalItems": true,
"items": {
"$id": "#/properties/dns/properties/top_srvfail/items"
"$id": "#/properties/dns/properties/top_servfail/items"
}
},
"top_udp_ports": {
Expand Down Expand Up @@ -945,7 +945,7 @@
"queries": 2930,
"refused": 0,
"replies": 2921,
"srvfail": 0,
"servfail": 0,
"tcp": 2880,
"total": 5851,
"udp": 2971,
Expand All @@ -963,7 +963,7 @@
"queries",
"refused",
"replies",
"srvfail",
"servfail",
"tcp",
"total",
"udp",
Expand Down Expand Up @@ -1071,10 +1071,10 @@
2921
]
},
"srvfail": {
"$id": "#/properties/dns/properties/wire_packets/properties/srvfail",
"servfail": {
"$id": "#/properties/dns/properties/wire_packets/properties/servfail",
"type": "integer",
"title": "The srvfail schema",
"title": "The servfail schema",
"description": "An explanation about the purpose of this instance.",
"default": 0,
"examples": [
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/dns/v2/DnsStreamHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ struct DnsDirection {
, NX(DNS_SCHEMA, {"nxdomain_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code NXDOMAIN")
, ECS(DNS_SCHEMA, {"ecs_xacts"}, "Total DNS transactions (query/reply pairs) with the EDNS Client Subnet option set")
, REFUSED(DNS_SCHEMA, {"refused_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code REFUSED")
, SRVFAIL(DNS_SCHEMA, {"srvfail_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code SRVFAIL")
, SRVFAIL(DNS_SCHEMA, {"servfail_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code SERVFAIL")
, RNOERROR(DNS_SCHEMA, {"noerror_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code NOERROR")
, NODATA(DNS_SCHEMA, {"nodata_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code NOERROR but with an empty answers section")
, authData(DNS_SCHEMA, {"authenticated_data_xacts"}, "Total DNS transactions (query/reply pairs) with the AD flag set in the response")
Expand Down Expand Up @@ -258,7 +258,7 @@ struct DnsDirection {
, topNX(DNS_SCHEMA, "qname", {"top_nxdomain_xacts"}, "Top QNAMES with result code NXDOMAIN")
, topREFUSED(DNS_SCHEMA, "qname", {"top_refused_xacts"}, "Top QNAMES with result code REFUSED")
, topSizedQnameResp(DNS_SCHEMA, "qname", {"top_response_bytes"}, "Top QNAMES by response volume in bytes")
, topSRVFAIL(DNS_SCHEMA, "qname", {"top_srvfail_xacts"}, "Top QNAMES with result code SRVFAIL")
, topSRVFAIL(DNS_SCHEMA, "qname", {"top_servfail_xacts"}, "Top QNAMES with result code SERVFAIL")
, topNODATA(DNS_SCHEMA, "qname", {"top_nodata_xacts"}, "Top QNAMES with result code NOERROR and empty answer section")
, topNOERROR(DNS_SCHEMA, "qname", {"top_noerror_xacts"}, "Top QNAMES with result code NOERROR")
, topUDPPort(DNS_SCHEMA, "port", {"top_udp_ports_xacts"}, "Top UDP source port on the query side of a transaction")
Expand Down