Skip to content

Instantly share code, notes, and snippets.

@mcastelino
Created February 3, 2020 23:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mcastelino/c4e4308c96d41f85efabfec0f918f900 to your computer and use it in GitHub Desktop.
Save mcastelino/c4e4308c96d41f85efabfec0f918f900 to your computer and use it in GitHub Desktop.
Prometheus - POD Monitor for Fluentd
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
  name: fluentd-es
  labels:
    k8s-app: fluentd-es
spec:
  selector:
    matchLabels:
      k8s-app: fluentd-es
  namespaceSelector:
    matchNames:
    - default
  podMetricsEndpoints:
  - port: metrics
    interval: 10s
---
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  name: prometheus
spec:
  serviceAccountName: prometheus
  podMonitorSelector:
    matchLabels:
      k8s-app: fluentd-es
  resources:
    requests:
      memory: 400Mi
  enableAdminAPI: false
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment