Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common alerts to share? #226

Open
samber opened this issue Apr 28, 2023 · 2 comments
Open

Common alerts to share? #226

samber opened this issue Apr 28, 2023 · 2 comments

Comments

@samber
Copy link

samber commented Apr 28, 2023

Hi there 馃憢

@sfarwassim just opened an issue on samber/awesome-prometheus-alerts to request contributions.

Do you have nice Prometheus alerts to share, for NATS monitoring?

@Ruthercode
Copy link

Something like this?

groups:
- name: NATSAlerts
  rules:
  - alert: HighConnectionCount
    expr: gnatsd_varz_connections > 100
    for: 1m
    labels:
      severity: warning
    annotations:
      summary: "High number of NATS connections ({{ $value }})"
      description: "The number of NATS connections is greater than 100 for {{ $labels.instance }}"

  - alert: HighPendingBytes
    expr: gnatsd_connz_pending_bytes > 100000
    for: 5m
    labels:
      severity: warning
    annotations:
      summary: "High number of NATS pending bytes ({{ $value }})"
      description: "The number of NATS pending bytes is greater than 100000 for {{ $labels.instance }}"

  - alert: HighSubscriptionsCount
    expr: gnatsd_connz_subscriptions > 50
    for: 5m
    labels:
      severity: warning
    annotations:
      summary: "High number of NATS subscriptions ({{ $value }})"
      description: "The number of NATS subscriptions is greater than 50 for {{ $labels.instance }}"

  - alert: HighRoutesCount
    expr: gnatsd_routez_num_routes > 10
    for: 5m
    labels:
      severity: warning
    annotations:
      summary: "High number of NATS routes ({{ $value }})"
      description: "The number of NATS routes is greater than 10 for {{ $labels.instance }}"

@samber
Copy link
Author

samber commented Jul 29, 2023

Thanks, I just added these alerts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants