`entity_mapper` is a Python service that queries Dynatrace for different entity types.
417
entity_mapper is a Python service that queries the Dynatrace Entities API for different entity types (hosts, process groups, process group instances, …) and writes the entityId mappings into Redis/Valkey.
These mappings are later used by other services (such as alert_streamer) to correlate alerts with the right Dynatrace entities.
ENTITY_TYPES env var| Variable | Required | Example value | Description |
|---|---|---|---|
DT_API_URL | Y | https://<tenant>.live.dynatrace.com | Dynatrace environment base URL |
DT_API_TOKEN | Y | dt0c01... | Dynatrace API Token |
VALKEY_HOST | X | valkey (default: localhost) | Redis/Valkey hostname |
VALKEY_PORT | X | 6379 | Redis/Valkey port |
ENTITY_TYPES | X | HOST,PROCESS_GROUP,PROCESS_GROUP_INSTANCE | Comma-separated list of entity types to fetch |
With explicit env vars:
docker run --rm \
-e DT_API_URL=https://<tenant>.live.dynatrace.com \
-e DT_API_TOKEN=*** \
-e VALKEY_HOST=valkey \
-e VALKEY_PORT=6379 \
-e ENTITY_TYPES=HOST,PROCESS_GROUP,PROCESS_GROUP_INSTANCE \
leontoetenel/entity_mapper:latest
apiVersion: v1
kind: ConfigMap
metadata:
name: entity-mapper-config
data:
VALKEY_HOST: "valkey"
VALKEY_PORT: "6379"
ENTITY_TYPES: "HOST,PROCESS_GROUP,PROCESS_GROUP_INSTANCE"
apiVersion: v1
kind: Secret
metadata:
name: entity-mapper-secrets
type: Opaque
stringData:
DT_API_URL: "https://<tenant>.live.dynatrace.com"
DT_API_TOKEN: "<your-api-token>"
With additional CRON properties.
apiVersion: batch/v1
kind: CronJob
metadata:
name: entity-mapper-cron
spec:
# Run every day at 23:00
schedule: "0 23 * * *"
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 3
jobTemplate:
spec:
backoffLimit: 2
template:
metadata:
labels:
app: entity-mapper
spec:
restartPolicy: Never
containers:
- name: entity-mapper
image: docker.io/leontoetenel/entity_mapper:latest
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
Content type
Image
Digest
sha256:652c2628a…
Size
74 MB
Last updated
11 months ago
docker pull leontoetenel/entity_mapper