vmware_exporter
vmware_exporter copied to clipboard
servicemonitor for multiple hosts?
Hey guys, does anyone know what the servicemonitor for use with prometheus operator would look like, i've tried the following but with no success:
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
annotations:
td/managed-by: flux
labels:
prometheus: k8s
name: thdks-prometheus-vmware-exporter-svcmon1
namespace: vmware-exporter
spec:
endpoints:
- honorLabels: true
interval: 30s
path: /metrics
port: http
scrapeTimeout: 30s
params:
target:
- default
- host2
metricRelabelings:
- sourceLabels: [__address__]
targetLabel: __param_target
- sourceLabels: [__param_target]
targetLabel: instance
jobLabel: thdks-vmware-exporter
selector:
matchLabels:
app: vmware-exporter
release: vmware-exporter
This isn't working at all, i'm assuming because it's not utilizing section
when calling the exporter itself.
i cannot add multiple section, just only receive default section
i cannot add multiple section, just only receive default section
Hey guys, does anyone know what the servicemonitor for use with prometheus operator would look like, i've tried the following but with no success:
apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: annotations: td/managed-by: flux labels: prometheus: k8s name: thdks-prometheus-vmware-exporter-svcmon1 namespace: vmware-exporter spec: endpoints: - honorLabels: true interval: 30s path: /metrics port: http scrapeTimeout: 30s params: target: - default - host2 metricRelabelings: - sourceLabels: [__address__] targetLabel: __param_target - sourceLabels: [__param_target] targetLabel: instance jobLabel: thdks-vmware-exporter selector: matchLabels: app: vmware-exporter release: vmware-exporter
This isn't working at all, i'm assuming because it's not utilizing
section
when calling the exporter itself.
use /metrics?section=xxx and
- source_labels: [__address__]
target_label: __param_section
replacement: xxx