How to migrate prometheus to metrics directive?

1. The problem I’m having:

prometheus unrecognized directive:

2. Error messages and/or full log output:

Error: adapting config using caddyfile: /etc/caddy/Caddyfile:17: unrecognized directive: prometheus

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

3. Caddy version:

v2.x

4. How I installed and ran Caddy:

helm upgrade

a. System environment:

Docker

b. Command:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

c. Service/unit/compose file:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

d. My complete Caddy config:

:9090 {                                                                                                                                                                                                         ││   prometheus {                                                                                                                                                                                                  ││     address :9095                                                                                                                                                                                               ││     path /metrics                                                                                                                                                                                               ││   }      
}

5. Links to relevant resources:

I don’t know where you got prometheus from.

Read the docs:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.