RousselTMLEARNING

Article · Dynatrace: From Discovery to Expertise

Workflows and AutomationEngine

This article is available in French.

1. Principe #

Déclencheur, tâches, conditions.

Structure #

Structure d'un workflow Dynatrace
DéclencheurExemple
ÉvénementOuverture d'un problème Davis, événement de sécurité, événement personnalisé
PlanificationChaque lundi à 8 h : rapport de coûts ; toutes les heures : vérification
À la demandeBouton dans une application ou appel d'API

Les tâches s'enchaînent avec des conditions ({{ result("query").records | length > 0 }}), des boucles, des nouvelles tentatives et des délais.

2. Exemple #

Notifier avec du contexte.

Tâche JavaScript #

import { execution } from '@dynatrace-sdk/automation-utils';

export default async function ({ execution_id }) {
  const ex = await execution(execution_id);
  const problem = ex.event();                       // l'événement déclencheur
  const critical = problem['event.category'] === 'AVAILABILITY';
  return {
    channel: critical ? '#astreinte' : '#ops',
    text: `${problem['display_id']} : ${problem['event.name']} (${problem['affected_entity_ids']?.length ?? 0} entités)`,
  };
}

La tâche suivante (Slack ou Teams) utilise {{ result("decide").channel }} et {{ result("decide").text }}.

À savoir : Les noms exacts des fonctions du SDK et des champs d'événement dépendent de la version : partez des modèles de workflows proposés dans l'application et adaptez-les.

3. Remédier sans risque #

Garde-fous.

Règles #

  • Commencer par des actions réversibles : redémarrer un pod, vider un cache, augmenter un réplica.
  • Ajouter une approbation humaine (tâche d'attente ou bouton) pour les actions destructrices.
  • Limiter la fréquence : un workflow qui redémarre un service en boucle aggrave l'incident.
  • Exécuter les workflows avec un acteur technique et des permissions minimales.
Erreur Courante : Un workflow tourne avec les droits de son acteur : un workflow créé par un administrateur et modifiable par tous est une élévation de privilèges.

📄 Workflows et AutomationEngine : automatiser notifications et remédiation →

My progress

  • ⏱ Estimated time : ≈ 4 min

Sign in to track your progress and take notes. Sign in

✉️ Ask a question

Course Glossary

AIOps (Artificial Intelligence for IT Operations)

The use of artificial intelligence and machine learning to automate and improve IT operations (e.g., anomaly detection, reducing alert noise).

OpenTelemetry

An open source framework providing standards, APIs, and SDKs to collect and export observability data (traces, metrics, logs) in an agnostic way.

Recommended Articles

Understanding the concept of score

The concept of score allows Elasticsearch to rank your documents by relevance during a search.

Understanding the Elastic Common Schema (ECS)

As always in our consulting engagements, we recommend that companies harmonise and standardise: k...

License consumption types

Understand the evolution of billing in Dynatrace: the difference between the old licensing model ...

Grafana Alloy: The importance of Self-Monitoring

Discover why and how to configure Grafana Alloy so that it monitors itself, collecting its own lo...

Grafana Alloy: Understanding and exploiting the User Interface (UI)

Discover how to enable, secure, and use Grafana Alloy's built-in web interface to visualize your ...

Grafana Alloy: Introduction and Architecture

Discover the fundamental concepts of Grafana Alloy, the transition from the static Agent to Alloy...

Grafana Alloy: Syntax and Configuration (Alloy Language: River)

As part of a Grafana training or observability training, master the declarative syntax of Grafana...

Grafana Alloy: Metrics Collection (Prometheus & Ecosystem)

Learn how to configure Grafana Alloy to collect, transform, and forward metrics using the Prometh...

Grafana Alloy: Log Management with Loki

Discover how to configure Grafana Alloy to read log files, journald, or network streams, process ...