Go to file
2018-04-27 07:21:42 +01: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
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 plugin/example: add health 2018-04-27 07:21:42 +01: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 also 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.