\n archived\n \u003C/tags>\n \u003C/tsRequest>\n\n - id: send_slack_alert\n type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook\n url: \"{{ secret('SLACK_WEBHOOK') }}\"\n payload: |\n {\n \"channel\": \"#alerts\",\n \"text\": \"The Tableau workbook {{ vars.workbook_luid }} hasn't been usued in the last two weeks! It's has been tagged as 'archived' \"\n }\n\ntriggers:\n - id: http\n type: io.kestra.plugin.fs.http.Trigger\n uri: https://tableau.example.com/api/-/content/usage-stats/workbooks/{vars.workbook_luid}\n responseCondition: \"{{ json(response.body).hitsLastTwoWeeksTotal \u003C= 10 }}\"\n interval: PT1M\n\n",[64,122,120],{"__ignoreMap":75},[24,124,125],{},[81,126],{"alt":127,"src":128},"tableau topology","/blogs/2024-04-11-http-trigger/tableau-topology.png",[37,130,132],{"id":131},"setup-the-war-room-in-case-of-infrastructure-urgency","Setup the War Room in case of Infrastructure Urgency",[24,134,135,136,141],{},"Incident management is usually spread over diverse teams and responsibilities. Some engineers have to be on duty. Some managers would like to get notified and stick to the last incident events. You usually want what's called a ",[48,137,140],{"href":138,"rel":139},"https://www.pagerduty.com/resources/learn/what-is-a-war-room/",[111],"\"war room\"",", to create a short-lived communication channel and gather all those responsible for managing the issue.",[24,143,144],{},"This involves several tools and processes. Depending on the the level of maturity and complexity of the company it can be hard to streamline the “war room” process and improve the Mean Time To Repair metric. An automation platform like Kestra allows to manage all this setup and interconnect all the necessary tools during the process.",[24,146,147,148,153,154,158,159,164],{},"Here is an example of Kestra flow that listens to ",[48,149,152],{"href":150,"rel":151},"https://grafana.com/",[111],"Grafana"," metrics critical to the underlying business. When a metric is larger than the SLA threshold, it will automatically trigger a war room setup by creating a ticket with ",[48,155,157],{"href":156},"/plugins/plugin-servicenow","Service Now",", creating a dedicated “war room channel” in Slack, and sending an alert through ",[48,160,163],{"href":161,"rel":162},"https://pagerduty.com/",[111],"Pager Duty"," to easily head up the engineer in duty while managing team rotation.",[69,166,169],{"className":167,"code":168,"language":74,"meta":75},[72],"id: war-room-setup\nnamespace: company.team\n\ntasks:\n\n - id: service_now_post\n type: io.kestra.plugin.servicenow.Post\n domain: \"{{ secret('SERVICE_NOW_DOMAIN') }}\"\n username: \"{{ secret('SERVICE_NOW_USERNAME') }}\"\n password: \"{{ secret('SERVICE_NOW_PASSWORD') }}\"\n clientId: \"{{ secret('SERVICE_NOW_CLIENT_ID') }}\"\n clientSecret: \"{{ secret('SERVICE_NOW_CLIENT_SECRET') }}\"\n table: incident\n data:\n short_description: CPU usage hits set threshold.\n requester_id: f8266e2adb16fb00fa638a3a489619d2\n requester_for_id: a7ec77cbdefac300d322d182689619dc\n product_id: 01a2e3c1db15f340d329d18c689ed922\n\n - id: create_war_room_slack\n type: io.kestra.plugin.core.http.Request\n method: POST\n uri: https://slack.com/api/conversations.create\n headers:\n Authorization: \"{{ secret('SLACK_TOKEN') }}\"\n formData:\n name: war_room\n\n - id: invite_users\n type: io.kestra.plugin.core.http.Request\n method: POST\n uri: https://slack.com/api/conversations.invite\n headers:\n Authorization: \"{{ secret('SLACK_TOKEN') }}\"\n formData:\n users: \"W1234567890,U2345678901,U3456789012\"\n channel_id: \"{{ json(outputs.create_war_room_slack.body).channel.id }}\"\n\n - id: send_pagerduty_alert\n type: io.kestra.plugin.notifications.pagerduty.PagerDutyAlert\n url: \"{{ secret('PAGERDUTY_URL') }}\"\n payload: |\n {\n \"dedup_key\": \"\u003Csamplekey>\",\n \"routing_key\": \"\u003Csamplekey>\",\n \"event_action\": \"acknowledge\"\n }\n\ntriggers:\n - id: http\n type: io.kestra.plugin.fs.http.Trigger\n uri: https://your-grafana.com/api/datasources/name/prometheusmetrics?target=cpu.usage\n headers:\n Authorization: \"Bearer {{ secret('GRAPHANA_API_KEY') }}\"\n responseCondition: \"{{ json(response.body).result.metric.value >= 0.8 }}\"\n interval: PT5M\n",[64,170,168],{"__ignoreMap":75},[24,172,173],{},[81,174],{"alt":175,"src":176},"war room topology","/blogs/2024-04-11-http-trigger/war-room-topology.png",[37,178,180],{"id":179},"conclusion","Conclusion",[24,182,183],{},"The more we can automate tasks, the more time we have for important things that help the business. It's like a never-ending race to make things faster and smoother!",[24,185,186],{},"The key is to connect with the things that make your applications run, often through APIs. Kestra makes it easy to connect to any API and even start workflows based on real-world events!",[24,188,189],{},"So, what tasks can you automate? What tools would make your life easier?",[24,191,192,193,198],{},"Join the ",[48,194,197],{"href":195,"rel":196},"https://kestra.io/slack",[111],"Slack community"," where developers share ideas, request new features, and help each other out!",[24,200,201,202,207,208,213],{},"Follow us on ",[48,203,206],{"href":204,"rel":205},"https://twitter.com/kestra_io",[111],"Twitter"," for the latest news.\nCheck the code in our ",[48,209,212],{"href":210,"rel":211},"https://github.com/kestra-io/kestra",[111],"GitHub repository"," and give us a star if you like the project.",{"title":75,"searchDepth":215,"depth":215,"links":216},2,[217,218,219,220,221],{"id":39,"depth":215,"text":40},{"id":55,"depth":215,"text":56},{"id":93,"depth":215,"text":94},{"id":131,"depth":215,"text":132},{"id":179,"depth":215,"text":180},"Solutions","2024-04-11T17:00:00.000Z","How to trigger real actions through API connected to the real-world?","md","/blogs/2024-04-11-http-trigger.jpg",{},true,"/blogs/2024-04-11-http-trigger",{"title":15,"description":224},"blogs/2024-04-11-http-trigger","uaD6WtALDCVIXbENg9PFq7QMHvo1Mbq1huXq4e6xn6g",["Reactive",234],{"$ssite-config":235},{"_priority":236,"description":240,"env":241,"name":242,"url":243},{"name":237,"env":238,"description":237,"url":239},-10,-15,-4,"Kestra.io website","production","kestra.io","https://kestra.io/",["Set"],["ShallowReactive",246],{"header-annonces":-1,"Blog-Page-Item-/blogs/2024-04-11-http-trigger":-1}]