Skip to content

Commit

Permalink
fix(metrics): remove unnecessary Prometheus ServiceMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
swiatekm committed Jul 24, 2023
1 parent b79242e commit 40aa3ce
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion deploy/helm/sumologic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an
| `kube-prometheus-stack.prometheus.prometheusSpec.initContainers` | InitContainers allows injecting additional Prometheus initContainers. | See [values.yaml] |
| `kube-prometheus-stack.prometheus.prometheusSpec.retention` | How long to retain metrics in Prometheus | `1d` |
| `kube-prometheus-stack.prometheus.prometheusSpec.scrapeInterval` | Prometheus metrics scrape interval. If not set, the Prometheus default scrape interval is used. | `30s` |
| `kube-prometheus-stack.prometheus.prometheusSpec.serviceMonitor.selfMonitor` | Enable scraping Prometheus metrics | `false` |
| `kube-prometheus-stack.prometheus.serviceMonitor.selfMonitor` | Enable scraping Prometheus metrics | `false` |
| `falco.enabled` | Flag to control deploying Falco Helm sub-chart. | `false` |
| `falco.fullnameOverride` | Used to override the chart's full name. | `Nil` |
| `falco.addKernelDevel` | Flag to control installation of `kernel-devel` on nodes using MachineConfig, required to build falco modules (only for OpenShift) | `true` |
Expand Down
15 changes: 7 additions & 8 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,15 @@ sumologic:
sumologic.com/scrape: "true"
- name: collection-sumologic-prometheus
endpoints:
- port: web
- port: http-web
path: /metrics
metricRelabelings:
- action: keep
regex: prometheus_remote_storage_.*
sourceLabels: [__name__]
selector:
matchLabels:
operated-prometheus: "true"
app: kube-prometheus-stack-prometheus

### Traces configuration
## Set the enabled flag to false to disable traces ingestion.
Expand Down Expand Up @@ -2186,7 +2190,7 @@ kube-prometheus-stack:
remoteTimeout: 5s
writeRelabelConfigs:
- action: keep
regex: (?:kube-state-metrics|kubelet|kube-scheduler|apiserver|coredns|kube-etcd|.+-sumologic-.+|.+-prometheus)
regex: (?:kube-state-metrics|kubelet|kube-scheduler|apiserver|coredns|kube-etcd|.+-sumologic-.+|.+-prometheus|.+-fluent-bit)
sourceLabels: [job]
## This is only used for recording rules
- action: drop
Expand Down Expand Up @@ -3289,11 +3293,6 @@ kube-prometheus-stack:
- action: labeldrop
regex: _sumo_forward_

service:
labels:
sumologic.com/app: prometheus
sumologic.com/scrape: "true"

serviceMonitor:
selfMonitor: false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ items:
sumologic.com/app: collection-fluent-bit
spec:
endpoints:
- path: /api/v1/metrics/prometheus
- metricRelabelings:
- action: keep
regex: fluentbit_.*
sourceLabels:
- __name__
path: /api/v1/metrics/prometheus
port: http
namespaceSelector:
matchNames:
Expand Down Expand Up @@ -282,11 +287,16 @@ items:
heritage: "Helm"
spec:
endpoints:
- path: /metrics
port: web
- metricRelabelings:
- action: keep
regex: prometheus_remote_storage_.*
sourceLabels:
- __name__
path: /metrics
port: http-web
namespaceSelector:
matchNames:
- sumologic
selector:
matchLabels:
operated-prometheus: "true"
app: kube-prometheus-stack-prometheus

0 comments on commit 40aa3ce

Please sign in to comment.