Go to file
2019-07-10 12:19:00 +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 Migrating example to newer libraries 2019-07-10 00:39:00 -07:00
go.sum Migrating example to newer libraries 2019-07-10 00:39:00 -07: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 Migrating example to newer libraries 2019-07-10 00:39:00 -07:00
setup.go Migrating example to newer libraries 2019-07-10 00:39:00 -07: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.