From d33a4681ff109170a0d89d1b7e0573ab05e4d01e Mon Sep 17 00:00:00 2001 From: Jayapriya Pai Date: Fri, 2 Feb 2024 18:38:21 +0530 Subject: [PATCH] update consulsd in README Signed-off-by: Jayapriya Pai --- scrape_config/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scrape_config/README.md b/scrape_config/README.md index c0de81b..c0f05ae 100644 --- a/scrape_config/README.md +++ b/scrape_config/README.md @@ -47,6 +47,26 @@ Look at each scrapeconfig file for various fields used. ![img](img/scrape_config_kube_sd_node.png) ![img](img/scrape_config_kube_sd_pod.png) +## consulSDConfigs + +- Available from Prometheus-Operator version `0.68`. In example a consul instance is created and a app is registered with consul. Both app and consul is running inside kubernetes but it will work similar for external consul instance as well. + +```bash + kubectl apply -f ./consul_sd +``` + +- Port forward consul UI + + ```bash + k port-forward svc/consul 8500 + ``` + + ![img](img/consul_ui.png) + +- Refresh prometheus target page it should show scrape config targets + + ![img](img/scrape_config_consul_sd.png) + ## dnsSDConfigs - Available from Prometheus-Operator version `0.68`