- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
",t};e.buildCustomizationMenuUi=t;function n(e){let t='
",t}function s(e){let n=e.filter.currentValue||e.filter.defaultValue,t='${e.filter.label}
`,e.filter.options.forEach(s=>{let o=s.id===n;t+=``}),t+="${e.filter.label}
`,t+=`This page explains how to use the private action runner (PAR), which allows you to run custom scripts and Linux binaries within your Datadog workflows and apps. Unlike standard private actions that call specific APIs or services, the script action gives you the flexibility to execute arbitrary commands, shell scripts, and command-line tools directly from the private action runner in your private network.
scriptuser
for enhanced security. Datadog enforces container sandboxing and only accepts signed tasks, but you decide which binaries and scripts are allowed. Always review every command you add to the script action allow-list, especially ones that take dynamic user input. Ensure that your actions are configured with the least privileged commands, and carefully review the permissions you share through connections. For more information, see connection security considerations.The following table outlines supported and unsupported use cases for the script action:
Use Case | Supported | Notes |
---|---|---|
Running Linux binaries (ls , rm , find , curl ) | Yes | In order to run native Linux binaries, the relevant files must be accessible to the container. |
Running CLIs (aws , terraform , kubectl ) | Yes | The CLI and your CLI credentials must be added to your custom image. |
Running scripts (bash , python ) | Yes | Scripts can be mounted inside the container. Interpreters such as Python must be installed on your custom image. |
Running privileged commands (systemctl restart ) | No | Because the PAR runs inside a container, it does not have high privilege permissions on the host. |
Windows tools (PowerShell) | No | Because the PAR runs inside a Linux container, native Windows tools are not supported. |
To use the script action, you need:
Configure script actions through your runner’s config.yaml
file and the script connection (credentials/script.yaml
by default). If you create a new runner and select the script bundle, you get a default configuration.
# Add the script action to the allowlist (`config.yaml`)
actionsAllowlist:
- com.datadoghq.script.runPredefinedScript
# Configure your script connection (`credentials/script.yaml`)
schemaId: script-credentials-v1
runPredefinedScript:
# use "echo" as the "Script name" in the action configuration
echo:
# use an array to specify the command
command: ["echo", "Hello world"]
# another script
echo-parametrized:
# you can use workflow syntax (https://docs.datadoghq.com/actions/workflows/variables/) to retrieve values from the parameters object
command: [ "echo", "{{ parameters.echoValue }}" ]
# you can use JSON schema (https://json-schema.org/) to validate the parameters
parameterSchema:
properties:
echoValue:
type: string
const: "world"
required:
- echoValue
In your workflow or app, configure the action to use the runPredefinedScript
with the script name you defined (for example, echo
or echo-parametrized
).
Note: There are two levels of variable resolution: one at the workflow level and one at the action level inside the runner.
For binaries not available in the base runner image, create a custom image:
# Dockerfile example
FROM gcr.io/datadoghq/private-action-runner:v1.9.0
USER root
RUN apt update && apt install -y python3
USER dog
You can mount complex scripts inside the runner:
# docker-compose example
services:
runner:
image: gcr.io/datadoghq/private-action-runner:v1.9.0
# build: . # if you are using a custom Dockerfile
volumes:
- "./config:/etc/dd-action-runner/config"
# credentials/script.yaml
schemaId: script-credentials-v1
runPredefinedScript:
python:
command: ["python3", "/etc/dd-action-runner-script/scripts/script.py"]
shell:
command: [ "bash", "/etc/dd-action-runner-script/scripts/script.sh" ]
# scripts/script.sh
echo "Hello from the shell script!"
# scripts/script.py
print("Hello from Python script!")