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

Alerting on a Linux shell script


Hi. I am wondering what the best approach is to plug a shell script in to Dynatrace.

Our Linux sys admin is writing a shell script that returns a value (1 or 0). If the value is 1, then I would like to generate a problem within Dynatrace and raise a custom error alert. Is this possible and, if so, what series of steps would I need to implement?

Many thanks, Cam




Hello, it is possible to send an event to Dynatrace via the API. I recommend you this link :

Hiya. I shoudl have added - the shell script already exists (in fact there are many). It has no HTTP client provision to call in to APIs.

DynaMight Legend
DynaMight Legend

Apart from the API @ACKERMANN M. mentions, there is the option to write your own plugin that is executed by OneAgent. However, just for parsing 1/0 value from a single script, this is quite a big effort. If it's feasible for you, you can also use this generic execution template for that:

Dynatrace has no option to execute arbitrary scripts or commands on monitored systems, except for oneagents/activegate plugins for security reasons.

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

Hi Julius, I think this can certainly act a s a good starting point. Thank you so much for the github url.

Featured Posts