Questions tagged [servicemonitor]
24 questions
8
votes
2 answers
Add PodMonitor or ServiceMonitor outside of kube-prometheus-stack helm values
Using kube-prometheus-stack helm chart, version 35.2.0. So far, I add my custom PrometheusRules, PodMonitor and ServiceMonitor via helm custom values.
helm install my-kubpromstack prometheus-community/kube-prometheus-stack -n monitoring \
-f…

Polymerase
- 6,311
- 11
- 47
- 65
4
votes
1 answer
How to add static labels to jobs in service monitors
In prometheus we have the option to add a label to every metric of a job with something like this,
- job_name: 'your_job'
honor_labels: true
static_configs:
- targets: …

Luv33preet
- 1,686
- 7
- 33
- 66
2
votes
1 answer
Unable to add a K8s service as prometheus target
I want my prometheus server to scrape metrics from a pod.
I followed these steps:
Created a pod using deployment - kubectl apply -f sample-app.deploy.yaml
Exposed the same using kubectl apply -f sample-app.service.yaml
Deployed Prometheus server…

chandraSiri
- 71
- 6
1
vote
2 answers
ServiceMonitor Prometheus not working in another namespace
I just installed prometheus operator as indicated here: https://github.com/prometheus-operator/kube-prometheus:
kubectl apply --server-side -f manifests/setup
kubectl wait \
--for condition=Established \
--all CustomResourceDefinition \
…

Joan
- 101
- 1
- 9
1
vote
2 answers
How can I drop a specific label in a specific Prometheus ServiceMonitor metric using relabeling/metricRelabeling?
For example, I have teo metrics with different label
node_metrics_first{foo="bar",AAA="aaa"}
node_metrics_second{BBB="bbb",CCC="ccc"}
how can I use relabeling/metricRelabeling drop/labeldrop in servicemonitor to remove foo label in…

chocho li
- 11
- 2
1
vote
1 answer
configure prometheus service monitor for external services like confluent cloud kafka
I'm trying to configure prometheus service monitor to fetch confluent cloud(kafka) metrics.
According to their documentation…

santosh.a
- 503
- 5
- 20
1
vote
1 answer
Servicemonitor with multiple targets
I have kube-prometheus-stack running on a kubernetes cluster along with prometheus-blackbox-exporter. I want to monitor multiple http targets. I have tried setting this up with an servicemonitor but when I add a target the target does not get the…

jasper sikkema
- 21
- 1
- 5
1
vote
0 answers
Getting duplicate target while monitoring external service with in kubernetes deployed Prometheus
I'm trying to monitor a server external to kubernetes, which works. The problem is i'm getting a duplicate target and a second scrapejob. It's the same target with slightly different scrape intervals and metric paths. I don't know where it's coming…

George
- 11
- 1
0
votes
0 answers
Selecting Operator-managed services with ServiceMonitor
I'm trying to set up some prometheus metric collection on my kubernetes cluster using ServiceMonitors.
Among the services I want to collect from are services provisioned by operators, such as Cockroach and EMQX. I'm having some issues working out…

user3896248
- 347
- 1
- 5
- 16
0
votes
0 answers
Blackbox exporter with probe to monitor external endpoints
I have installed blackbox exporter and prometheus using helm charts.
I want know how to monitor external endpoints using blackbox exporter and get the data to prometheus dashboard. How to do using servicemonitor and probe CRDs

Thisura
- 23
- 5
0
votes
0 answers
Metrics not exporting for cp-ksql-server and cp-zookeeper for confluent kafka installation from cp-helm-charts
I'm trying to setup monitoring for confluent kafka installed from latest cp-helm-charts.
The issue is that metrics are exported fine for cp-kafka but not cp-ksql-server and cp-zookeeper.
JMX prom exporter side car is configured…

Naveen Karnam
- 433
- 2
- 9
- 26
0
votes
0 answers
Enable Annotation-Based scrape for user-workloads in Openshift
I have a Openshift cluster and want to enable annotation-based scrape for Prometheus for openshift-user-workload-monitoring. I.e. I want Prometheus to scrape any pod annotated as follows:
prometheus.io/port: "9100"
prometheus.io/scrape:…

AntMor
- 417
- 6
- 18
0
votes
0 answers
How can I use config map parameter in ServiceMonitor spec.endpoints.basicAuth?
I am struggling with using basic auth credentials in Service Monitor. Here is what I have tried:
Creating Secrets.yaml and using static string as secrets and using the same in basicAuth
basicAuth:
password:
name: username
key:…

Aakanksha
- 65
- 7
0
votes
1 answer
How to add servicemonitor for pgbouncer-exporter metrics
I have added pgbouncer-exporter container to my deployment. It is emitting the metrics on port 9100.
I want to add a scraper for these metrics so that it becomes visible in Prometheus.
How can I do it by using Kubernetes ServiceMonitor?

Dev
- 794
- 1
- 9
- 21
0
votes
0 answers
wget : can't connect to remote host when connecting to kubernetes service in separate namespace
I have setup my API for Prometheus monitoring using client instrumentation but when I check the endpoint in PromUI it is in DOWN status as below :
I checked for connectivity issues by exec into the prometheus pod and trying a wget. When I do so I…

Golide
- 835
- 3
- 13
- 36