# Custom Event ingestion from external script

**URL:** <https://community.dynatrace.com/t/custom-event-ingestion-from-external-script/52322>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, infrastructure-operations\
**Created:** [July 3, 2025, 3:17am UTC](https://community.dynatrace.com/t/custom-event-ingestion-from-external-script/52322 "2025-07-03T03:17:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JobyJob](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@JobyJob](https://community.dynatrace.com/u/JobyJob)\
**Post date:** [July 3, 2025, 3:17am UTC](https://community.dynatrace.com/t/custom-event-ingestion-from-external-script/52322/1 "2025-07-03T03:17:13Z")

</div>

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 a Jenkins job found that an API integration from one of the nodes has broken. This is part of proactive monitoring of the system integration, so as to minimize customer impact.

---

<div class="post-metadata">

**Author:** ![lubrman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/lubrman/32/7353_2.png) [@lubrman](https://community.dynatrace.com/u/lubrman)\
**Post date:** [July 3, 2025, 5:42am UTC](https://community.dynatrace.com/t/custom-event-ingestion-from-external-script/52322/2 "2025-07-03T05:42:06Z")

</div>

Hi [@JobyJob](https://community.dynatrace.com/user/92920)

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

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [July 3, 2025, 7:26am UTC](https://community.dynatrace.com/t/custom-event-ingestion-from-external-script/52322/3 "2025-07-03T07:26:24Z")

</div>

Hi,

You can use&nbsp;[Metric scripting integration](https://docs.dynatrace.com/docs/shortlink/pipe-metric-ingestion)&nbsp;also.

Best regards

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 4, 2025, 8:23pm UTC](https://community.dynatrace.com/t/custom-event-ingestion-from-external-script/52322/4 "2025-07-04T20:23:13Z")

</div>

[@lubrman](https://community.dynatrace.com/user/73905)&nbsp;[@JobyJob](https://community.dynatrace.com/user/92920)&nbsp;this is actually the comprehensive docs&nbsp;[https://docs.dynatrace.com/docs/shortlink/extend-events](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.
