|
1 |
| -# check-dns |
| 1 | +# check-dns |
| 2 | + |
| 3 | +## Description |
| 4 | + |
| 5 | +Monitor DNS response. |
| 6 | + |
| 7 | +## Synopsis |
| 8 | +``` |
| 9 | +check-dns -H example.com -s 8.8.8.8 |
| 10 | +``` |
| 11 | + |
| 12 | +## Installation |
| 13 | + |
| 14 | +First, build this program. |
| 15 | + |
| 16 | +``` |
| 17 | +go get github.com/mackerelio/go-check-plugins |
| 18 | +cd $(go env GOPATH)/src/github.com/mackerelio/go-check-plugins/check-dns |
| 19 | +go install |
| 20 | +``` |
| 21 | + |
| 22 | +Or you can use this program by installing the official Mackerel package. See [Using the official check plugin pack for check monitoring - Mackerel Docs](https://mackerel.io/docs/entry/howto/mackerel-check-plugins). |
| 23 | + |
| 24 | + |
| 25 | +Next, you can execute this program :-) |
| 26 | + |
| 27 | +``` |
| 28 | +check-dns -H example.com -s 8.8.8.8 |
| 29 | +``` |
| 30 | + |
| 31 | + |
| 32 | +## Setting for mackerel-agent |
| 33 | + |
| 34 | +If there are no problems in the execution result, add a setting in mackerel-agent.conf . |
| 35 | + |
| 36 | +``` |
| 37 | +[plugin.checks.fileage-sample] |
| 38 | +command = ["check-dns", "-H", "example.com", "-s", "8.8.8.8"] |
| 39 | +``` |
| 40 | + |
| 41 | +## Usage |
| 42 | +### Options |
| 43 | + |
| 44 | +``` |
| 45 | + -H, --host= The name or address you want to query |
| 46 | + -s, --server= DNS server you want to use for the lookup |
| 47 | + -p, --port= Port number you want to use (default: 53) |
| 48 | + -q, --querytype= DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY) (default: A) |
| 49 | + -c, --queryclass= DNS record class type where TYPE =(IN, CS, CH, HS, NONE, ANY) (default: IN) |
| 50 | + --norec Set not recursive mode |
| 51 | +``` |
| 52 | + |
| 53 | +## For more information |
| 54 | + |
| 55 | +Please execute `check-dns -h` and you can get command line options. |
0 commit comments