Alerts


/etc/prometheus/alert.rules > api
cash_credit_failed (0 active)
alert: cash_credit_failed
expr: cash_credit
annotations:
  ResolvedSummary: Not available
  Summary: cash_credit failed with device {{ $labels.device }}, error {{ $labels.error
    }}
cash_debit_failed (0 active)
alert: cash_debit_failed
expr: cash_debit
annotations:
  ResolvedSummary: Not available
  Summary: cash_debit failed with device {{ $labels.device }}, error {{ $labels.error
    }}
cash_inventory_update_failed (0 active)
alert: cash_inventory_update_failed
expr: cash_inventory_update
annotations:
  ResolvedSummary: Not available
  Summary: cash_inventory_update failed with transaction {{ $labels.transaction }},
    error {{ $labels.error }}
customer_feedback_failed (0 active)
alert: customer_feedback_failed
expr: customer_feedback
annotations:
  ResolvedSummary: Not available
  Summary: customer_feedback failed with transaction {{ $labels.transaction }}, error
    {{ $labels.error }}
delete_command_failed (0 active)
alert: delete_command_failed
expr: delete_command
annotations:
  ResolvedSummary: Not available
  Summary: delete_command failed with device {{ $labels.device }}, command {{ $labels.command
    }}, error {{ $labels.error }}
device_authentication_failed (0 active)
alert: device_authentication_failed
expr: device_authentication
annotations:
  ResolvedSummary: Not available
  Summary: device_authentication failed with device {{ $labels.device }}, error {{
    $labels.error }}
device_heartBeat_failed (0 active)
alert: device_heartBeat_failed
expr: device_heartBeat
annotations:
  ResolvedSummary: Not available
  Summary: device_heartBeat failed with device {{ $labels.device }}, error {{ $labels.error
    }}
device_inventory_failed (0 active)
alert: device_inventory_failed
expr: device_inventory
annotations:
  ResolvedSummary: Not available
  Summary: device_inventory failed with device {{ $labels.device }}, error {{ $labels.error
    }}
duplicate_sim_failed (0 active)
alert: duplicate_sim_failed
expr: duplicate_sim
annotations:
  ResolvedSummary: Not available
  Summary: duplicate_sim failed with transaction {{ $labels.transaction }}, error
    {{ $labels.error }}
feedback_detail_failed (0 active)
alert: feedback_detail_failed
expr: feedback_detail
annotations:
  ResolvedSummary: Not available
  Summary: feedback_detail failed with transaction {{ $labels.transaction }}, error
    {{ $labels.error }}
generate_transaction_id_failed (0 active)
alert: generate_transaction_id_failed
expr: generate_transaction_id
annotations:
  ResolvedSummary: Not available
  Summary: generate_transaction_id failed with device {{ $labels.device }}, error
    {{ $labels.error }}
get_all_content_failed (0 active)
alert: get_all_content_failed
expr: get_all_content
annotations:
  ResolvedSummary: Not available
  Summary: get_all_content failed with transaction {{ $labels.transaction }}, error
    {{ $labels.error }}
get_ticker_config_failed (0 active)
alert: get_ticker_config_failed
expr: get_ticker_config
annotations:
  ResolvedSummary: Not available
  Summary: get_ticker_config failed with transaction {{ $labels.transaction }}, error
    {{ $labels.error }}
inventory_update_failed (0 active)
alert: inventory_update_failed
expr: inventory_update
annotations:
  ResolvedSummary: Not available
  Summary: inventory_update failed with transaction {{ $labels.transaction }}, error
    {{ $labels.error }}
new_sim_sale_failed (0 active)
alert: new_sim_sale_failed
expr: new_sim_sale
annotations:
  ResolvedSummary: Not available
  Summary: new_sim_sale failed with transaction {{ $labels.transaction }}, error {{
    $labels.error }}
portal_login_failed (0 active)
alert: portal_login_failed
expr: portal_login
annotations:
  ResolvedSummary: Not available
  Summary: portal_login failed with transaction {{ $labels.transaction }}, username
    {{ $labels.username }}, error {{ $labels.error }}
post_trip_failed (0 active)
alert: post_trip_failed
expr: post_trip
annotations:
  ResolvedSummary: Not available
  Summary: post_trip failed with transaction {{ $labels.transaction }}, username {{
    $labels.username }}, TripCode {{ $labels.trip_code }}, error {{ $labels.error
    }}
top_up_failed (0 active)
alert: top_up_failed
expr: top_up
annotations:
  ResolvedSummary: Not available
  Summary: top_up failed with transaction {{ $labels.transaction }}, error {{ $labels.error
    }}
update_command_failed (0 active)
alert: update_command_failed
expr: update_command
annotations:
  ResolvedSummary: Not available
  Summary: update_command failed with device {{ $labels.device }}, command {{ $labels.command
    }}, status {{ $labels.status }}, error {{ $labels.error }}
validate_trip_failed (0 active)
alert: validate_trip_failed
expr: validate_trip
annotations:
  ResolvedSummary: Not available
  Summary: validate_trip failed with transaction {{ $labels.transaction }}, username
    {{ $labels.username }}, TripCode {{ $labels.trip_code }}, error {{ $labels.error
    }}
/etc/prometheus/alert.rules > health
DeviceDown (0 active)
alert: DeviceDown
expr: ((time()
  - device / 1000 > 300) and on(dummy) ((hour(vector(time())) + 5) > 8 and (hour(vector(time()))
  + 5) < 18))
for: 1m
annotations:
  ResolvedSummary: '{{ $labels.deviceId }} device is active again.'
  Summary: '{{ $labels.deviceId }} device is not active.'
PeripheralError (0 active)
alert: PeripheralError
expr: (peripheral{peripheralKey!~".+door$"}
  == 0 or peripheral{peripheralKey!~".+door$"} == 0)
for: 1m
annotations:
  ResolvedSummary: '{{ $labels.peripheralKey }} of {{ $labels.deviceId }} device has
    recovered from error state.'
  Summary: '{{ $labels.peripheralKey }} of {{ $labels.deviceId }} device has encountered
    an error.'
PeripheralOpen (0 active)
alert: PeripheralOpen
expr: (peripheral{peripheralKey=~".+door$"}
  == 0) and on(deviceId) (time() - device / 1000 < 300)
for: 1m
annotations:
  ResolvedSummary: '{{ $labels.peripheralKey }} of {{ $labels.deviceId }} device has
    been closed.'
  Summary: '{{ $labels.peripheralKey }} of {{ $labels.deviceId }} device is open.'
/etc/prometheus/alert.rules > inventory
CashAcceptorFull (0 active)
alert: CashAcceptorFull
expr: (cash_acceptor_count
  > 400)
for: 5m
annotations:
  ResolvedSummary: Cash acceptor has been emptied at {{ $labels.device }}
  Summary: Cash acceptor has {{ $value }} notes and is about to be reach full capacity
    at {{ $labels.device }}
SimDispenser (0 active)
alert: SimDispenser
expr: (sim_count < 10)
for: 5m
annotations:
  ResolvedSummary: Sim count is now {{ $value }} in device at {{ $labels.device }}
  Summary: Sim count is only {{ $value }} in device at {{ $labels.device }}
/etc/prometheus/alert.rules > system
service_down (5 active)
alert: service_down
expr: up == 0
for: 1m
annotations:
  ResolvedSummary: '{{ $labels.instance }} of job {{ $labels.job }} is up now'
  Summary: '{{ $labels.instance }} of job {{ $labels.job }} has been down for more
    than 1 minute.'
Labels State Active Since Value
alertname="service_down" instance="alert_notification_sender:9076" job="alert_notification_sender" firing 2024-09-06 07:43:26.762165139 +0000 UTC 0
alertname="service_down" instance="history_maker:9075" job="history_maker" firing 2024-09-06 07:43:26.762165139 +0000 UTC 0
alertname="service_down" instance="inventory-service:9065" job="inventory" firing 2024-09-06 07:43:26.762165139 +0000 UTC 0
alertname="service_down" instance="transaction-service:9062" job="transaction" firing 2024-09-06 07:43:26.762165139 +0000 UTC 0
alertname="service_down" instance="vendor-service:9068" job="vendor" firing 2024-09-06 07:43:26.762165139 +0000 UTC 0
high_memory_usage (0 active)
alert: high_memory_usage
expr: (sum(node_memory_MemTotal_bytes)
  - sum(node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes))
  / sum(node_memory_MemTotal_bytes) > 75
for: 1m
annotations:
  ResolvedSummary: '{{$labels.instance}}: Memory usage is now below 75%'
  Summary: '{{$labels.instance}}: Memory usage is above 75% (current value is: {{
    $value }})'
high_storage (0 active)
alert: high_storage
expr: (node_filesystem_size_bytes
  - node_filesystem_free_bytes) / node_filesystem_size_bytes * 100 > 85
for: 1m
annotations:
  ResolvedSummary: Docker host storage is back to below 85%
  Summary: Docker host storage usage is {{ humanize $value}}%. Reported by instance
    {{ $labels.instance }} of job {{ $labels.job }}.