- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Supported OS
This check collects metrics from Open Policy Agent.
Follow the instructions below to install and configure this check for an Agent running on a Kubernetes cluster. See also the Autodiscovery Integration Templates for guidance on applying these instructions.
To install the open_policy_agent check on your Kubernetes cluster:
Install the developer toolkit.
Clone the integrations-extras
repository:
git clone https://github.com/DataDog/integrations-extras.git.
Update your ddev
config with the integrations-extras/
path:
ddev config set extras ./integrations-extras
To build the open_policy_agent
package, run:
ddev -e release build open_policy_agent
Download the Agent manifest to install the Datadog Agent as a DaemonSet.
Create two PersistentVolumeClaim
s, one for the checks code, and one for the configuration.
Add them as volumes to your Agent pod template and use them for your checks and configuration:
env:
- name: DD_CONFD_PATH
value: "/confd"
- name: DD_ADDITIONAL_CHECKSD
value: "/checksd"
[...]
volumeMounts:
- name: agent-code-storage
mountPath: /checksd
- name: agent-conf-storage
mountPath: /confd
[...]
volumes:
- name: agent-code-storage
persistentVolumeClaim:
claimName: agent-code-claim
- name: agent-conf-storage
persistentVolumeClaim:
claimName: agent-conf-claim
Deploy the Datadog Agent in your Kubernetes cluster:
kubectl apply -f agent.yaml
Copy the integration artifact .whl file to your Kubernetes nodes or upload it to a public URL.
Run the following command to install the integrations wheel with the Agent:
kubectl exec ds/datadog -- agent integration install -w <PATH_OF_OPEN_POLICY_AGENT_ARTIFACT_>/<OPEN_POLICY_AGENT_ARTIFACT_NAME>.whl
Run the following commands to copy the checks and configuration to the corresponding PVCs:
kubectl exec ds/datadog -- sh
# cp -R /opt/datadog-agent/embedded/lib/python2.7/site-packages/datadog_checks/* /checksd
# cp -R /etc/datadog-agent/conf.d/* /confd
Restart the Datadog Agent pods.
The default dashboard includes some graphs related to a metric around OPA decisions, called open_policy_agent.decisions
. This metric is created based on the OPA “Decision Logs”. To generate this metric and populate this part of the dashboard, create a new log-generated metric in Datadog.
First, create a facet for the msg
field of the OPA logs, as it only generates metrics for the “Decision Logs” type of log entry. For that, select any of the log entries coming from OPA, click on the engine log near the msg
field and select “Create facet for @msg”:
Create two facets, one for the input.request.kind.kind
field and one for the result.response.allowed
field, both available in any of the log entries type “Decision Log”.
Once you have created the facets, generate the needed metric for the Dashboard to be complete. Click on the menu “Logs -> Generate Metrics”. Click on “Add a new metric” and fill in the form with the following data:
Edit the open_policy_agent/conf.yaml
file, in the /confd
folder that you added to the Agent pod to start collecting your OPA performance data. See the sample open_policy_agent/conf.yaml for all available configuration options.
Run the Agent’s status subcommand and look for open_policy_agent
under the Checks section.
open_policy_agent.request.duration.count (count) | The count of the HTTP request latencies in seconds for the OPA service Shown as second |
open_policy_agent.request.duration.sum (count) | The sum of the HTTP request latencies in seconds for the OPA service Shown as second |
open_policy_agent.policies (gauge) | The number of policies enabled in the OPA server |
open_policy_agent does not include any events.
open_policy_agent.prometheus.health
Returns CRITICAL
if the agent fails to connect to the Prometheus endpoint, otherwise OK
.
Statuses: ok, critical
open_policy_agent.health
Returns CRITICAL
if the agent fails to connect to the OPA health endpoint, OK
if it returns 200, WARNING
otherwise.
Statuses: ok, warning, critical
open_policy_agent.bundles_health
Returns CRITICAL
if the agent fails to connect to the OPA bundles health endpoint, OK
if it returns 200, WARNING
otherwise.
Statuses: ok, warning, critical
open_policy_agent.plugins_health
Returns CRITICAL
if the agent fails to connect to the OPA plugins health point, OK
if it returns 200, WARNING
otherwise.
Statuses: ok, warning, critical
Need help? Contact Datadog support.