Commit graph

16 commits

Author SHA1 Message Date
Pat Downey
ea293da1d6
Fix forward metrics for backwards compatibility (#6178) 2023-07-04 16:35:55 +02:00
Pat Downey
f823825f8a
plugin/forward: Allow Proxy to be used outside of forward plugin. (#5951)
* plugin/forward: Move Proxy into pkg/plugin/proxy, to allow forward.Proxy to be used outside of forward plugin.

Signed-off-by: Patrick Downey <patrick.downey@dioadconsulting.com>
2023-03-24 08:55:51 -04:00
Ondřej Benkovský
dcc3d76018
remove unused coredns_forward_sockets_open metric (#5431)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-06-13 07:30:34 -07:00
Miek Gieben
ed3f287fe8
metrics: remove RR type (#4534)
To combat label cardinality explosions remove the type from metrics.
This was most severe in the histogram for request duration, remove it
there.

It's also highlighted difference between grpc and forward code, where
forward did use type and grpc didn't; getting rid of all that "fixes"
that discrepancy

Move monitor.go back into the vars directory and make it private again.
Also name it slightly better

Fixes: #4507

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-19 12:59:26 +01:00
Maxime Ginters
b1173ed2a5
plugin/forward Add rcode and rtype to request_duration_seconds metric (#4391)
* plugin/forward Add rcode and rtype to request_duration_seconds metric

Signed-off-by: Maxime Ginters <maxime.ginters@shopify.com>

* Control the cardinality of query type

Signed-off-by: Maxime Ginters <maxime.ginters@shopify.com>
2021-01-28 16:37:17 +01:00
Ruslan Drozhdzh
30a4a87eaa
plugin/forward: add hit/miss metrics for connection cache (#4114)
Signed-off-by: Ruslan Drozhdzh <rdrozhdzh@infoblox.com>
2020-09-14 11:42:55 +02:00
Zou Nengren
4166dcc2fe
using promauto package to ensure all created metrics are properly registered (#4025)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-07-25 08:06:28 -07:00
Chris O'Haver
47d6e86f58
plugin/cache/forward: Clean up grammar/wording in forward & cache metrics descriptions. (#3971)
* tweak language

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* tweak language

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* typo

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-06-24 07:49:42 -07:00
Zou Nengren
73e927d6a8
completed metrics of cache and forward (#3962)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-06-24 06:54:03 +02:00
Miek Gieben
19cfa2960c
Cleanup metrics (#3776)
Cleanup a variety of metric issues.
* Eliminate department of redundancy "count_total" naming.
* Use the plural of the unit when appropriate. (ex, "requests")
* Remove label names from metric names where appropriate. (ex, "rcode")
* Simplify request metrics by consolidating type label in to the base
request counter.
* Re-generate man pages.

Signed-off-by: Ben Kochie <superq@gmail.com>

Co-authored-by: Ben Kochie <superq@gmail.com>
2020-03-26 09:17:33 +01:00
Chris O'Haver
22cd28a798
plugins/forward: Add max_concurrent option (#3640)
* count and limit concurrent queries

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add option

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* return servfail when limit exceeded

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* review feedback

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* move atomic counter to beginning of struct

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add comment for ErrLimitExceeded

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* rename option to max_concurrent

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add metric

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* response REFUSED; incl max in error; add more docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* avoid err setup race

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* respond SERVFAIL; doc memory usage

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-02-04 13:59:08 +01:00
ethan
5b74d0f957 metrics.go: hemp message correction (#3100)
Signed-off-by: ethan <guangming.wang@daocloud.io>
2019-08-08 18:27:53 +02:00
Francois Tur
f9bdd382dd Ensure Re-register of metrics variables after a reload (#2080)
* - ensure plugins that use prometheus.MustRegister, re-register after reload
- removing once.Do on the startup function was simplest way to do it.

* - fix underscored names (advice of bot)

* - tune existing UT for reload, and add a test verifying failing reload does not prevent correct registering for metrics

* - ensure different ports for tests that can run in same time ..
2018-09-19 02:11:24 -07:00
Tobias Schmidt
e3534205c7 Rename forward metrics socket_count_total to sockets_open (#1885)
The prometheus naming convention states only counters should have a
`_total` suffix, so that gagues and counters can be easily
distinguished.
2018-06-20 11:35:57 +01:00
Miek Gieben
455040c143
doc: some function/vars/const/package level updates (#1558)
* doc: some function/vars/const/package level updates

Various update that stood out while reading godoc.org for CoreDNS.

* Fix some misspellings as well
2018-02-23 15:02:05 +00:00
Miek Gieben
5b844b5017
plugin/forward: add it (#1447)
* plugin/forward: add it

This moves coredns/forward into CoreDNS. Fixes as a few bugs, adds a
policy option and more tests to the plugin.

Update the documentation, test IPv6 address and add persistent tests.

* Always use random policy when spraying

* include scrub fix here as well

* use correct var name

* Code review

* go vet

* Move logging to metrcs

* Small readme updates

* Fix readme
2018-02-05 22:00:47 +00:00