03 Jul 2025 04:17 AM
How can I generate a custom event from a shell script to be ingested into dynatrace. This event is after a shell script invoked by Jenkins job found that an API integration from one of the nodes has broken.. This is part of proactive monitoring the system integration, so as to minimize customer impact.
03 Jul 2025 06:42 AM
Hi @JobyJob
Yes, there are several ways to directly create a custom alert using the APIs provided by Dynatrace when a script fails.
POST https://{environmentid}.live.dynatrace.com/api/v1/events
Alternatively, if your script sends logs, you can forward those logs to Dynatrace and then trigger an alert based on them.
POST https://{environmentid}.live.dynatrace.com/api/v2/logs/ingest
04 Jul 2025 09:23 PM
@lubrman @JobyJob this is actually the comprehensive docs https://docs.dynatrace.com/docs/shortlink/extend-events
One should not forget the option to ingest the event locally on a host with OneAgent. It does not need any API token in such case.