---
templates:
  - name: pmm_mongodb_restarted
    version: 1
    summary: MongoDB restarted
    expr: |-
      mongodb_instance_uptime_seconds
      < [[ .threshold ]]
    params:
      - name: threshold
        summary: Seconds from the last restart
        unit: s
        type: float
        range: [0, 1800]
        value: 300
    for: 10s
    severity: warning
    annotations:
      summary: MongoDB restarted ({{ $labels.service_name }})
      description: |-
        MongoDB {{ $labels.service_name }} on {{ $labels.node_name }}
        was restarted {{ $value }} seconds ago.
