cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom Event ingestion from external script

JobyJob
Newcomer

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.

3 REPLIES 3

lubrman
Advisor

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

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

You can use Metric scripting integration also.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Julius_Loman
DynaMight Legend
DynaMight Legend

@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.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts