Links
Comment on page
🧩

Alerting API

For more details, please refer to the Alerting feature.
To use the Alerting API, it's necessary to generate an access token.
A comprehensive toolkit, with practical usage examples, is accessible on GitHub.
This toolkit comes pre-installed as a default component within the on-premises platform, located at /datasentinel/soft/datasentinel_toolkit.

Instance Alerting

get
https://<<platform-server>>/ds-api
/alerting/{pg-instance}/status
Status
// If not enabled, the reason is displayed
{
"enabled": false,
"reason": "The reason why the alerting is disabled"
}
If instance alerting is inactive, the reason field clarifies the cause. Several possibilities exist:
  • Global alerting is turned off on the Datasentinel platform.
  • An instance-specific silence is in effect.
  • A silence is active, covering the instance through its filters.
  • No corresponding alerting rule has been identified.
patch
https://<<platform-server>>/ds-api
/alerting/{pg-instance}/enable
Enable
Enabling instance alerting might not yield any impact under specific conditions.
Several reasons could contribute to this:
  • Global alerting is turned off on the Datasentinel platform.
  • A silence is active, covering the instance through its filters.
  • No corresponding alerting rule has been identified.
patch
https://<<platform-server>>/ds-api
/alerting/{pg-instance}/disable
Disable
get
https://<<platform-server>>/ds-api
/alerting/{pg-instance}/problems
Problems

Customized Alerts

post
https://<<platform-server>>/ds-api
/alerting/{pg-instance}/problems
Create
Example
cat > body.json << EOF
{
"message" : "Daily backup failed : No disk space"
}
EOF
export TOKEN=<<user_token>>
curl -k --header "user-token: $TOKEN" --header 'Content-Type: application/json' --request POST 'https://<<platform-server>>/ds-api/alerting/<<pg-instance>>/problems' -d @body.json
Last modified 3mo ago