Comments (3)
Hi aradhell,
I'm assuming you have a monitor that has a trigger and an action with a slack destination (if wrong let me know!). When the trigger evaluates to true, you are sending the alert information to slack. The first time it is null, and the second time it has no alert id.
Currently the alert being provided to the trigger context and action context variables is the "current" alert that exists as the trigger is being evaluated (which is basically the previous alert if there is one). This is poor wording on our part, and we can look into providing both alerts.
Regarding the missing alert.id, could you provide what your action message looks like?
Thanks,
Drew
from alerting.
Hi @dbbaughe
You are right.
Please correct me if I am providing wrong message.
If it helps, my action configuration http://prntscr.com/n6vr63 and I also tried with Webhook but the result is same.
first alert message (ctx - context object)
array (
'monitor' =>
array (
'_id' => 'qR_WxGkBTgUv7vc0rrKA',
'_version' => 7,
'name' => 'xx Critical',
'enabled' => true,
),
'trigger' =>
array (
'id' => '-h_cxGkBTgUv7vc0ibUf',
'name' => 'xx critical trigger',
'severity' => '1',
'actions' =>
array (
0 =>
array (
'name' => 'Web Alert',
),
1 =>
array (
'name' => 'notify slack xx critical channel',
),
),
),
'results' =>
array (),
'periodStart' => '2019-03-29T10:04:37.564Z',
'periodEnd' => '2019-03-29T10:05:37.564Z',
'alert' => NULL,
'error' => NULL,
)
and the second one
'monitor' =>
array (
'_id' => 'qR_WxGkBTgUv7vc0rrKA',
'_version' => 7,
'name' => 'xx Critical',
'enabled' => true,
),
'trigger' =>
array (
'id' => '-h_cxGkBTgUv7vc0ibUf',
'name' => 'xx critical trigger',
'severity' => '1',
'actions' =>
array (
0 =>
array (
'name' => 'Web Alert',
),
1 =>
array (
'name' => 'notify slack xx critical channel',
),
),
),
'results' =>
array (),
'periodStart' => '2019-03-29T10:05:37.564Z',
'periodEnd' => '2019-03-29T10:06:37.564Z',
'alert' =>
array (
'state' => 'ACTIVE',
'error_message' => NULL,
'acknowledged_time' => NULL,
'last_notification_time' => 1553853937999,
),
'error' => NULL,
)
from alerting.
Hi aradhell,
Thanks for finding this issue, it looks like we only bring back those values currently as noted here.
I will make an issue to allow the full alert to be sent.
from alerting.
Related Issues (20)
- [BUG] Cannot send message to Azure service bus topic with shared sas key HOT 1
- [BUG]"Propagate exception from publishing Email notifications to Action run result" HOT 1
- Slack ACK url HOT 1
- Create Monitors using PPL, similar to use of query DSL HOT 2
- [BUG] Can not see monitors, destinations, email groups etc in GUI after installing through API HOT 1
- Support K8s service name as a valid web-hook destination URL HOT 1
- ctx.alert.isAcknowledged not accessible with trigger HOT 1
- UI notification for failed test of alert and destinations HOT 1
- Alerting with email as a destination not working in version 13.1.0.1. HOT 1
- Joining two queries
- [BUG] Alerting Webhooks incorrectly rejecting URL's HOT 2
- [BUG] Can not create monitor in the coordinating cluster when it involves remote indices HOT 1
- [BUG] No setting available for Monitor max triggers HOT 1
- Point people to OpenSearch
- [BUG] {{period_start}} and {{period_end}} seems not respected HOT 1
- Configuring cross-cluster domain across 2 OpenSearch 1.0 cluster throws TCP connection error HOT 2
- contents of fields of query resulting dataset from monitor
- Facing an issue in elasticsearch container logs for alerting is Could not convert socket to TLS, statuscode: 1 HOT 1
- Custom Alert Configure
- [BUG] Kibana alerting not working properly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alerting.