📚 Cheatsheet

Une collection organisée de snippets de code pour accélérer votre développement. Parcourez, recherchez et copiez en un clic.

Snippets 4

Retour
Monitoring - Alerte Prometheus CPU élevé
Intermédiaire
alert: HighCpuLoad
expr: 100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[2m])) * 100) > 80
for: 5m
Monitoring - Monitor Datadog pour la latence
Facile
avg(last_5m):p95:http.server.requests.time{service:my-app} > 200
Monitoring - Notification Slack en cas d'échec (GitHub Actions)
Facile
- name: Notify Slack on Failure
  if: failure()
  uses: 8398a7/action-slack@v3
  with:
    status: failure
  env:
    SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
Monitoring - Route Alertmanager vers Slack
Facile
route:
  receiver: 'slack-default'
receivers:
- name: 'slack-default'
  slack_configs:
  - api_url: 'https://hooks.slack.com/services/...' 
    channel: '#alerts'