Replies: 2 comments
-
My question exactly. I need something like a ServiceMonitor/PodMonitor where the spec part simply defines a URL to scrape. Is this really not possible? (The fact that this has not been answered for such a long time does not give me much hope, though.) I'm afraid the (ridiculously complicated) solution is this: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/additional-scrape-config.md. |
Beta Was this translation helpful? Give feedback.
0 replies
-
For external systems I use something like the following + node_exporter as daemon: apiVersion: v1
kind: Service
metadata:
name: <name>
namespace: <ns>
labels:
app: <name>
spec:
ports:
- name: metrics
port: 9100
protocol: TCP
targetPort: 9100
---
kind: "Endpoints"
apiVersion: "v1"
metadata:
name: <name>
namespace: <ns>
subsets:
- addresses:
- ip: <target-ip>
ports:
- name: metrics
port: 9100
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: <name>
namespace: <ns>
spec:
endpoints:
- port: metrics
selector:
matchLabels:
app: <name>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have my router configured to export Prometheus and wondered if it's possible to configure the kube-prometheus-stack to scrape it? Is there any docs/examples on how to scrape an external, none k8s system?
Beta Was this translation helpful? Give feedback.
All reactions