extras/prometheus/gmp/rules.yaml (58 lines of code) (raw):

# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. --- apiVersion: monitoring.googleapis.com/v1 kind: Rules metadata: name: uptime-rule spec: groups: - name: Micro services uptime interval: 60s rules: - alert: BalancereaderUnavailable expr: probe_success{job="balancereader-probe"} == 0 for: 1m annotations: summary: Balance Reader Service is unavailable description: Check Balance Reader pods and its logs labels: severity: 'critical' - alert: ContactsUnavailable expr: probe_success{job="contacts-probe"} == 0 for: 1m annotations: summary: Contacts Service is unavailable description: Check Contacts pods and its logs labels: severity: 'warning' - alert: FrontendUnavailable expr: probe_success{job="frontend-probe"} == 0 for: 1m annotations: summary: Frontend Service is unavailable description: Check Frontend pods and its logs labels: severity: 'critical' - alert: LedgerwriterUnavailable expr: probe_success{job="ledgerwriter-probe"} == 0 for: 1m annotations: summary: Ledger Writer Service is unavailable description: Check Ledger Writer pods and its logs labels: severity: 'critical' - alert: TransactionhistoryUnavailable expr: probe_success{job="transactionhistory-probe"} == 0 for: 1m annotations: summary: Transaction History Service is unavailable description: Check Transaction History pods and its logs labels: severity: 'critical' - alert: UserserviceUnavailable expr: probe_success{job="userservice-probe"} == 0 for: 1m annotations: summary: User Service is unavailable description: Check User Service pods and its logs labels: severity: 'critical'