Go to file
Miek Gieben d3c26d1f5d Move to Go modules
Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-30 18:22:25 +00:00
example_test.go Document and cleanup 2018-02-25 08:52:52 +00:00
example.go comment updates 2018-04-26 21:56:11 +01:00
go.mod Move to Go modules 2019-03-30 18:22:25 +00:00
go.sum Move to Go modules 2019-03-30 18:22:25 +00:00
health.go plugin/example: add health 2018-04-27 07:21:42 +01:00
LICENSE Add license 2018-01-16 07:52:25 +00:00
metrics.go comment updates 2018-04-26 21:56:11 +01:00
README.md Move to Go modules 2019-03-30 18:22:25 +00:00
setup_test.go Document and cleanup 2018-02-25 08:52:52 +00:00
setup.go Use new function 2018-04-01 13:28:37 +01:00

example

Name

example - prints "example" on every query received.

Description

The example plugin prints "example" on every query received. It serves as documentation for writing CoreDNS plugins.

Syntax

example

Metrics

If monitoring is enabled (via the prometheus directive) the following metric is exported:

  • coredns_example_request_count_total{server} - query count to the example plugin.

The server label indicated which server handled the request, see the metrics plugin for details.

Health

This plugin implements dynamic health checking. It will always return healthy though.

Examples

In this configuration, we forward all queries to 9.9.9.9 and print "example" whenever we receive a query.

. {
  forward . 9.9.9.9
  example
}

Also See

See the manual.