Documentation Index
Fetch the complete documentation index at: https://docs.flashcat.cloud/llms.txt
Use this file to discover all available pages before exploring further.
Sync OceanBase alert events to Flashduty via webhook for automated alert noise reduction
In Flashduty
You can obtain an integration push URL through either of these two methods:Using Private Integration
Choose this method when you don’t need to route alert events to different channels. It’s simpler and recommended.Using Shared Integration
Choose this method when you need to route alerts to different channels based on the alert event’s payload information.
In OceanBase
I. OceanBase Alert Push Configuration
- Log in to your OceanBase console and select Alert Center
- Go to Alert Channels, click New Channel to start creating
- Select Custom Script as the channel type
- Configure the basic settings as shown below:

- Copy the following script content into the channel configuration, and please add the integration_key value from your Flashduty push URL to the integration_key parameter in the script
#!/usr/bin/env bash
function sendToFlashduty() {
URL="${address}/event/push/alert/standard?integration_key=${integration_key}"
curl -s -X POST ${URL} -H 'Content-Type: application/json' -d '{
"event_status": "'${alert_level}'",
"alert_key": "'${alarm_id}'",
"description": "'"${alarm_description//\"/\\\"}"'",
"title_rule": "$app_types::$name::$alarm_targets",
"event_time":'${timestamp}',
"labels": {
"app_types":"'${app_type}'",
"id":"'${alarm_id}'",
"name":"'${alarm_name}'",
"alarm_level":"'${alarm_level}'",
"alarm_status":"'${alarm_status}'",
"alarm_active_at":"'${alarm_active_at}'",
"alarm_threshold":"'${alarm_threshold}'",
"alarm_type":"'${alarm_type}'",
"alarm_targets":"'${alarm_target}'",
"ob_cluster_group":"'${ob_cluster_group}'",
"ob_cluster":"'${ob_cluster}'",
"hostIP":"'${host_ip}'",
"app_cluster":"'${app_cluster}'",
"alarm_description":"'"${alarm_description//\"/\\\"}"'",
"alarm_url":"'${alarm_url}'"
}
}'
return $?
}
alarm_name=$(echo ${alarm_name} | sed "s/ /_/g")
alarm_target=$(echo ${alarm_target} | sed "s/ /_/g")
timestamp=$(TZ=UTC date -d "${alarm_updated_at}" +%s)
levelMd5=$(echo ${alarm_level} | md5sum | awk '{print$1}')
statusMd5=$(echo ${alarm_status} | md5sum | awk '{print$1}')
active="048d106318302b41372b4292b5696ad4"
Inactive="bf7da164d431439fe9668fbc964110c4"
down="2e1558b0a152fae2dd15884561b1508d"
critical="59b9b38574ca2ee4f5e264b56f49a83f"
alert="723931b03a5d1cec59eac40cf0703580"
caution="abf4d55ba8926eff32cb44065e634ed3"
info="6aae3f4254789d72aa0cc8ed55b8f11f"
address="https://api.flashcat.cloud"
integration_key=""
if [[ ${statusMd5} == ${Inactive} ]];then
alert_level="Ok"
timestamp=$(TZ=UTC date -d "${alarm_resolved_at}" +%s)
elif [[ ${statusMd5} == "${active}" ]];then
if [[ ${levelMd5} == ${down} || ${levelMd5} == ${critical} ]];then
alert_level="Critical"
elif [[ ${levelMd5} == ${alert} ]];then
alert_level="Warning"
elif [[ ${levelMd5} == ${caution} || ${levelMd5} == ${info} ]];then
alert_level="Info"
fi
fi
if [[ ${statusMd5} == ${active} || ${statusMd5} == ${Inactive} ]];then
sendToFlashduty
fi
- Fill in for Response validation
- Select Markdown for the alert message format in Message Configuration
- Select English for the alert message template, fill in the following content, and submit:
OCP Alert Notification - Single Alert
- Alert ID: ${alarm_id}
- Name: ${alarm_name}
- Severity: ${alarm_level}
- Alert Target: ${alarm_target}
- Service: ${service}
- Summary: ${alarm_summary}
- Triggered at: ${alarm_active_at}
- Updated at: ${alarm_updated_at}
- Resolved at: ${alarm_resolved_at}
- Details: ${alarm_description}
- Status: ${alarm_status}
- Alert Type: ${alarm_type}
- Alert Threshold: ${alarm_threshold}
- Cluster Group: ${ob_cluster_group}
- Cluster: ${ob_cluster}
- Host: ${host_ip}
- App Cluster: ${app_cluster}
- OCP Link: ${alarm_url}
- Create a new push configuration at: Alert Center=>Alert Push=>New Push Configuration
- Configure push type and specified objects as needed

- Select English for push language
- Select Flashduty for alert channel
- Enable Recovery Notification
- Submit

II. Status Mapping
| OceanBase | Flashduty | Status |
|---|
| Down | Critical | Critical |
| Critical | Warning | Critical |
| Warning | Warning | Warning |
| Caution | Info | Info |
| Notice | Info | Info |