github.com/netdata/go.d.plugin@v0.58.1/modules/coredns/integrations/coredns.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/coredns/README.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/coredns/metadata.yaml" 4 sidebar_label: "CoreDNS" 5 learn_status: "Published" 6 learn_rel_path: "Data Collection/DNS and DHCP Servers" 7 most_popular: False 8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" 9 endmeta--> 10 11 # CoreDNS 12 13 14 <img src="https://netdata.cloud/img/coredns.svg" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: coredns 19 20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> 21 22 ## Overview 23 24 This collector monitors CoreDNS instances. 25 26 27 28 29 This collector is supported on all platforms. 30 31 This collector supports collecting metrics from multiple instances of this integration, including remote instances. 32 33 34 ### Default Behavior 35 36 #### Auto-Detection 37 38 This integration doesn't support auto-detection. 39 40 #### Limits 41 42 The default configuration for this integration does not impose any limits on data collection. 43 44 #### Performance Impact 45 46 The default configuration for this integration is not expected to impose a significant performance impact on the system. 47 48 49 ## Metrics 50 51 Metrics grouped by *scope*. 52 53 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. 54 55 56 57 ### Per CoreDNS instance 58 59 These metrics refer to the entire monitored application. 60 61 This scope has no labels. 62 63 Metrics: 64 65 | Metric | Dimensions | Unit | 66 |:------|:----------|:----| 67 | coredns.dns_request_count_total | requests | requests/s | 68 | coredns.dns_responses_count_total | responses | responses/s | 69 | coredns.dns_request_count_total_per_status | processed, dropped | requests/s | 70 | coredns.dns_no_matching_zone_dropped_total | dropped | requests/s | 71 | coredns.dns_panic_count_total | panics | panics/s | 72 | coredns.dns_requests_count_total_per_proto | udp, tcp | requests/s | 73 | coredns.dns_requests_count_total_per_ip_family | v4, v6 | requests/s | 74 | coredns.dns_requests_count_total_per_per_type | a, aaaa, mx, soa, cname, ptr, txt, ns, ds, dnskey, rrsig, nsec, nsec3, ixfr, any, other | requests/s | 75 | coredns.dns_responses_count_total_per_rcode | noerror, formerr, servfail, nxdomain, notimp, refused, yxdomain, yxrrset, nxrrset, notauth, notzone, badsig, badkey, badtime, badmode, badname, badalg, badtrunc, badcookie, other | responses/s | 76 77 ### Per server 78 79 These metrics refer to the DNS server. 80 81 Labels: 82 83 | Label | Description | 84 |:-----------|:----------------| 85 | server_name | Server name. | 86 87 Metrics: 88 89 | Metric | Dimensions | Unit | 90 |:------|:----------|:----| 91 | coredns.server_dns_request_count_total | requests | requests/s | 92 | coredns.server_dns_responses_count_total | responses | responses/s | 93 | coredns.server_request_count_total_per_status | processed, dropped | requests/s | 94 | coredns.server_requests_count_total_per_proto | udp, tcp | requests/s | 95 | coredns.server_requests_count_total_per_ip_family | v4, v6 | requests/s | 96 | coredns.server_requests_count_total_per_per_type | a, aaaa, mx, soa, cname, ptr, txt, ns, ds, dnskey, rrsig, nsec, nsec3, ixfr, any, other | requests/s | 97 | coredns.server_responses_count_total_per_rcode | noerror, formerr, servfail, nxdomain, notimp, refused, yxdomain, yxrrset, nxrrset, notauth, notzone, badsig, badkey, badtime, badmode, badname, badalg, badtrunc, badcookie, other | responses/s | 98 99 ### Per zone 100 101 These metrics refer to the DNS zone. 102 103 Labels: 104 105 | Label | Description | 106 |:-----------|:----------------| 107 | zone_name | Zone name. | 108 109 Metrics: 110 111 | Metric | Dimensions | Unit | 112 |:------|:----------|:----| 113 | coredns.zone_dns_request_count_total | requests | requests/s | 114 | coredns.zone_dns_responses_count_total | responses | responses/s | 115 | coredns.zone_requests_count_total_per_proto | udp, tcp | requests/s | 116 | coredns.zone_requests_count_total_per_ip_family | v4, v6 | requests/s | 117 | coredns.zone_requests_count_total_per_per_type | a, aaaa, mx, soa, cname, ptr, txt, ns, ds, dnskey, rrsig, nsec, nsec3, ixfr, any, other | requests/s | 118 | coredns.zone_responses_count_total_per_rcode | noerror, formerr, servfail, nxdomain, notimp, refused, yxdomain, yxrrset, nxrrset, notauth, notzone, badsig, badkey, badtime, badmode, badname, badalg, badtrunc, badcookie, other | responses/s | 119 120 121 122 ## Alerts 123 124 There are no alerts configured by default for this integration. 125 126 127 ## Setup 128 129 ### Prerequisites 130 131 No action required. 132 133 ### Configuration 134 135 #### File 136 137 The configuration file name for this integration is `go.d/coredns.conf`. 138 139 140 You can edit the configuration file using the `edit-config` script from the 141 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 142 143 ```bash 144 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 145 sudo ./edit-config go.d/coredns.conf 146 ``` 147 #### Options 148 149 The following options can be defined globally: update_every, autodetection_retry. 150 151 152 <details><summary>All options</summary> 153 154 | Name | Description | Default | Required | 155 |:----|:-----------|:-------|:--------:| 156 | update_every | Data collection frequency. | 1 | no | 157 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 158 | url | Server URL. | http://127.0.0.1:9153/metrics | yes | 159 | per_server_stats | Server filter. | | no | 160 | per_zone_stats | Zone filter. | | no | 161 | username | Username for basic HTTP authentication. | | no | 162 | password | Password for basic HTTP authentication. | | no | 163 | proxy_url | Proxy URL. | | no | 164 | proxy_username | Username for proxy basic HTTP authentication. | | no | 165 | proxy_password | Password for proxy basic HTTP authentication. | | no | 166 | timeout | HTTP request timeout. | 2 | no | 167 | method | HTTP request method. | GET | no | 168 | body | HTTP request body. | | no | 169 | headers | HTTP request headers. | | no | 170 | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no | 171 | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no | 172 | tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no | 173 | tls_cert | Client tls certificate. | | no | 174 | tls_key | Client tls key. | | no | 175 176 ##### per_server_stats 177 178 Metrics of servers matching the selector will be collected. 179 - Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4) 180 - Pattern syntax: [matcher](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format). 181 - Syntax: 182 183 ```yaml 184 per_server_stats: 185 includes: 186 - pattern1 187 - pattern2 188 excludes: 189 - pattern3 190 - pattern4 191 ``` 192 193 194 ##### per_zone_stats 195 196 Metrics of zones matching the selector will be collected. 197 - Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4) 198 - Pattern syntax: [matcher](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format). 199 - Syntax: 200 201 ```yaml 202 per_zone_stats: 203 includes: 204 - pattern1 205 - pattern2 206 excludes: 207 - pattern3 208 - pattern4 209 ``` 210 211 212 </details> 213 214 #### Examples 215 216 ##### Basic 217 218 An example configuration. 219 220 <details><summary>Config</summary> 221 222 ```yaml 223 jobs: 224 - name: local 225 url: http://127.0.0.1:9153/metrics 226 227 ``` 228 </details> 229 230 ##### Basic HTTP auth 231 232 Local server with basic HTTP authentication. 233 234 <details><summary>Config</summary> 235 236 ```yaml 237 jobs: 238 - name: local 239 url: http://127.0.0.1:9153/metrics 240 username: foo 241 password: bar 242 243 ``` 244 </details> 245 246 ##### Multi-instance 247 248 > **Note**: When you define multiple jobs, their names must be unique. 249 250 Collecting metrics from local and remote instances. 251 252 253 <details><summary>Config</summary> 254 255 ```yaml 256 jobs: 257 - name: local 258 url: http://127.0.0.1:9153/metrics 259 260 - name: remote 261 url: http://203.0.113.10:9153/metrics 262 263 ``` 264 </details> 265 266 267 268 ## Troubleshooting 269 270 ### Debug Mode 271 272 To troubleshoot issues with the `coredns` collector, run the `go.d.plugin` with the debug option enabled. The output 273 should give you clues as to why the collector isn't working. 274 275 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 276 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 277 278 ```bash 279 cd /usr/libexec/netdata/plugins.d/ 280 ``` 281 282 - Switch to the `netdata` user. 283 284 ```bash 285 sudo -u netdata -s 286 ``` 287 288 - Run the `go.d.plugin` to debug the collector: 289 290 ```bash 291 ./go.d.plugin -d -m coredns 292 ``` 293 294