diff --git a/content/en/integrations/_index.md b/content/en/integrations/_index.md index 97c84a903be0a..8a07e6d575dd9 100644 --- a/content/en/integrations/_index.md +++ b/content/en/integrations/_index.md @@ -13,6 +13,7 @@ aliases: - /integrations/shoreline_software_license/ - /integrations/pingdom_v3/ - /integrations/perimeterx/ + - /integrations/open-policy-agent/ description: Gather data from all of your systems, apps, & services algolia: tags: ['integration', 'integration setup'] diff --git a/content/es/integrations/open_policy_agent.md b/content/es/integrations/open_policy_agent.md deleted file mode 100644 index 549d338bcf6c8..0000000000000 --- a/content/es/integrations/open_policy_agent.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -app_id: open-policy-agent -app_uuid: 98c54837-27eb-48ca-9780-29bb593eecb8 -assets: - dashboards: - OPA base dashboard: assets/dashboards/open_policy_agent_overview.json - integration: - auto_install: true - configuration: - spec: assets/configuration/spec.yaml - events: - creates_events: false - metrics: - check: open_policy_agent.policies - metadata_path: metadata.csv - prefix: open_policy_agent. - service_checks: - metadata_path: assets/service_checks.json - source_type_id: 10142 - source_type_name: open_policy_agent - logs: - source: opa -author: - homepage: https://github.com/DataDog/integrations-extras - name: Comunidad - sales_email: ara.pulido@datadoghq.com - support_email: ara.pulido@datadoghq.com -categories: -- conformidad -- configuración y despliegue -- rastreo -- recopilación de logs -- seguridad -custom_kind: integración -dependencies: -- https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/README.md -display_on_public_website: true -draft: false -git_integration_title: open_policy_agent -integration_id: open-policy-agent -integration_title: Open Policy Agent -integration_version: 0.0.1 -is_public: true -manifest_version: 2.0.0 -name: open_policy_agent -public_title: Open Policy Agent -short_description: Integración de OPA -supported_os: -- Linux -tile: - changelog: CHANGELOG.md - classifier_tags: - - Categoría::Cumplimiento - - Categoría::Configuración y despliegue - - Categoría::Contenedores - - Categoría::Recopilación de logs - - Categoría::Seguridad - - Sistema operativo compatible::Linux - - Oferta::Integración - configuration: README.md#Configuración - description: Integración de OPA - media: [] - overview: README.md#Información general - support: README.md#Soporte - title: Open Policy Agent ---- - - - - -## Información general - -Este check recopila métricas de [Open Policy Agent][1]. - -## Configuración - -Sigue las instrucciones que se indican a continuación para instalar y configurar este check para un Agent que se ejecuta en un clúster de Kubernetes. Consulta también las [plantillas de integración de Autodiscovery][2] para obtener orientación sobre la aplicación de estas instrucciones. - -### Instalación - -Para instalar el check open_policy_agent en tu clúster de Kubernetes: - -1. Instala el [kit de herramientas para desarrolladores][3]. -2. Clona el repositorio `integrations-extras`: - - ```shell - git clone https://github.com/DataDog/integrations-extras.git. - ``` - -3. Actualiza la configuración de `ddev` con la ruta de `integrations-extras/`: - - ```shell - ddev config set repos.extras ./integrations-extras - ``` - -4. Para compilar el paquete `open_policy_agent`, ejecuta: - - ```shell - ddev -e release build open_policy_agent - ``` - -5. [Descarga el manifiesto del Agent para instalar el Datadog Agent como DaemonSet][4]. -6. Crea dos `PersistentVolumeClaim`, uno para el código de checks y otro para la configuración. -7. Añádelos como volúmenes a tu plantilla de pods del Agent y úsalos para los checks y configuración: - - ```yaml - 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 - ``` - -8. Despliega el Datadog Agent en tu clúster de Kubernetes: - - ```shell - kubectl apply -f agent.yaml - ``` - -9. Copia el archivo .whl del artefacto de integración en tus nodos de Kubernetes o súbelo a una URL pública. - -10. Ejecuta el siguiente comando para instalar la rueda de integraciones con el Agent: - - ```shell - kubectl exec ds/datadog -- agent integration install -w /.whl - ``` - -11. Ejecuta los siguientes comandos para copiar los checks y la configuración en los PVCs correspondientes: - - ```shell - 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 - ``` - -12. Reinicia los pods del Datadog Agent. - -### Métricas generadas por logs - -El dashboard por defecto incluye algunos gráficos relacionados con una métrica sobre las decisiones del OPA, llamada `open_policy_agent.decisions`. Esta métrica se crea basándose en los "Logs de decisión" del OPA. Para generar esta métrica y poblar esta parte del dashboard, crea una nueva métrica generada por logs en Datadog. - -En primer lugar, crea una faceta para el campo `msg` de los logs del OPA, ya que solo genera métricas para el tipo de entrada de log "Logs de decisión". Para ello, selecciona cualquiera de las entradas de log procedentes del OPA, haz clic en el log de motor cerca del campo `msg` y selecciona "Create facet for @msg" (Crear faceta para @msg): - -![Faceta de mensaje][5] - -Crea dos facetas, una para el campo `input.request.kind.kind` y otra para el campo `result.response.allowed`, ambas disponibles en cualquiera de las entradas de log de tipo "Log de decisión". - -![Faceta Tipo][6] -![Faceta Permitida][7] - -Una vez creadas las facetas, genera las métrica necesarias para que el dashboard esté completo. Haz clic en el menú "Logs -> Generate Metrics" (Logs > Generar métricas). Haz clic en "Add a new metric** (Añadir una nueva métrica) y rellena el formulario con los siguientes datos: - -![Métrica de decisión del OPA][8] - -### Configuración - -1. Edita el archivo `open_policy_agent/conf.yaml`, en la carpeta `/confd` que has añadido al pod del Agent para empezar a recopilar tus datos de rendimiento del OPA. Consulta el [open_policy_agent/conf.yaml de ejemplo][9] para todas las opciones disponibles de configuración. - -2. [Reinicia el Agent][10]. - -### Validación - -[Ejecuta el subcomando de estado del Agent][11] y busca `open_policy_agent` en la sección Checks. - -## Datos recopilados - -### Métricas -{{< get-metrics-from-git "open-policy-agent" >}} - - -### Eventos - -open_policy_agent no incluye ningún evento. - -### Checks de servicios -{{< get-service-checks-from-git "open-policy-agent" >}} - - -## Solucionar problemas - -¿Necesitas ayuda? Ponte en contacto con el [servicio de asistencia de Datadog][14]. - - -[1]: https://www.openpolicyagent.org/ -[2]: https://docs.datadoghq.com/es/agent/kubernetes/integrations/ -[3]: https://docs.datadoghq.com/es/developers/integrations/python/ -[4]: https://docs.datadoghq.com/es/agent/kubernetes/daemonset_setup/?tab=k8sfile -[5]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/msg_facet.png -[6]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/kind_facet.png -[7]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/allowed_facet.png -[8]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/metric.png -[9]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/datadog_checks/open_policy_agent/data/conf.yaml.example -[10]: https://docs.datadoghq.com/es/agent/guide/agent-commands/#start-stop-and-restart-the-agent -[11]: https://docs.datadoghq.com/es/agent/guide/agent-commands/#agent-status-and-information -[12]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/metadata.csv -[13]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/assets/service_checks.json -[14]: https://docs.datadoghq.com/es/help/ \ No newline at end of file diff --git a/content/fr/integrations/open_policy_agent.md b/content/fr/integrations/open_policy_agent.md deleted file mode 100644 index c1ac9fbebe829..0000000000000 --- a/content/fr/integrations/open_policy_agent.md +++ /dev/null @@ -1,185 +0,0 @@ ---- -assets: - configuration: - spec: assets/configuration/spec.yaml - dashboards: - OPA base dashboard: assets/dashboards/open_policy_agent_overview.json - logs: - source: opa - metrics_metadata: metadata.csv - monitors: {} - saved_views: {} - service_checks: assets/service_checks.json -categories: -- security -- containers -- configuration & deployment -- log collection -creates_events: false -ddtype: check -dependencies: -- https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/README.md -display_name: open_policy_agent -draft: false -git_integration_title: open_policy_agent -guid: 73fdfc40-51ea-11eb-ae93-0242ac130002 -integration_id: open-policy-agent -integration_title: Open Policy Agent -integration_version: 0.0.1 -is_public: true -custom_kind: integration -maintainer: ara.pulido@datadoghq.com -manifest_version: 1.0.0 -metric_prefix: open_policy_agent. -metric_to_check: open_policy_agent.policies -name: open_policy_agent -public_title: Open Policy Agent -short_description: Intégration d'OPA -support: contrib -supported_os: -- linux ---- - - - -## Présentation - -Ce check recueille des métriques à partir d'[Open Policy Agent][1]. - -## Configuration - -Suivez les instructions ci-dessous pour installer et configurer ce check pour un Agent exécuté sur un cluster Kubernetes. Consultez également la [documentation relative aux modèles d'intégration Autodiscovery][2] pour découvrir comment appliquer ces instructions. - -### Installation - -Pour installer le check open_policy_agent sur votre cluster Kubernetes : - -1. Installez le [kit de développement][3]. -2. Clonez le dépôt `integrations-extras` : - - ```shell - git clone https://github.com/DataDog/integrations-extras.git. - ``` - -3. Mettez à jour votre configuration `ddev` avec le chemin `integrations-extras/` : - - ```shell - ddev config set extras ./integrations-extras - ``` - -4. Pour générer le package `open_policy_agent`, exécutez : - - ```shell - ddev -e release build open_policy_agent - ``` - -5. [Téléchargez le manifeste de l'Agent pour installer l'Agent Datadog en tant que DaemonSet][4]. -6. Créez deux `PersistentVolumeClaim`, un pour le code des checks et l'autre pour la configuration. -7. Ajoutez-les en tant que volumes au modèle de pod de l'Agent, puis utilisez-les pour vos checks et votre configuration : - - ```yaml - 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 - ``` - -8. Déployez l'Agent Datadog sur votre cluster Kubernetes : - - ```shell - kubectl apply -f agent.yaml - ``` - -9. Copiez le fichier d'artefact de l'intégration (.whl) sur vos nœuds Kubernetes ou importez-le sur une URL publique. - -10. Exécutez la commande suivante pour installer le wheel de l'intégration à l'aide de l'Agent : - - ```shell - kubectl exec ds/datadog -- agent integration install -w /.whl - ``` - -11. Exécutez les commandes suivantes pour copier les checks et la configuration sur les PVC correspondants : - - ```shell - 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 - ``` - -12. Redémarrez les pods de l'Agent Datadog. - -### Métriques générées par des logs - -Le dashboard par défaut inclut des graphiques représentant une métrique portant sur les décisions d'OPA, à savoir `open_policy_agent.decisions`. Cette métrique est créée à partir des « logs de décision » d'OPA. Pour générer cette métrique et l'ajouter à cette section du dashboard, vous devez créer une nouvelle métrique générée par des logs dans Datadog. - -Commencez par créer une facette pour le champ `msg` des logs OPA. En effet, OPA génère uniquement des métriques pour les entrées de log de type « log de décision ». Pour ce faire, sélectionnez une entrée de log provenant d'OPA, cliquez sur l'icône de réglages en regard du champ `msg` et sélectionnez « Create facet for @msg » : - -![Facette de msg][5] - -Créez deux facettes, pour les champs `input.request.kind.kind` et `result.response.allowed`. Ces deux facettes doivent être disponibles dans les entrées de log de type « log de décision ». - -![Facette kind][6] -![Facette allowed][7] - -Une fois les facettes créées, générez la métrique souhaitée afin de compléter le dashboard. Cliquez sur le menu Logs, puis sur Generate Metrics. Cliquez sur « Add a new metric » et remplissez le formulaire avec les données suivantes : - -![Métrique de décision OPA][8] - -### Configuration - -1. Modifiez le fichier `open_policy_agent/conf.yaml` dans le dossier `/confd` que vous avez ajouté au pod de l'Agent pour commencer à recueillir vos données de performance OPA. Consultez le [fichier d'exemple open_policy_agent/conf.yaml][9] pour découvrir toutes les options de configuration disponibles. - -2. [Redémarrez l'Agent][10]. - -### Validation - -[Lancez la sous-commande status de l'Agent][11] et cherchez `open_policy_agent` dans la section Checks. - -## Données collectées - -### Métriques -{{< get-metrics-from-git "open-policy-agent" >}} - - -### Événements - -open_policy_agent n'inclut aucun événement. - -### Checks de service -{{< get-service-checks-from-git "open-policy-agent" >}} - - -## Dépannage - -Besoin d'aide ? Contactez [l'assistance Datadog][14]. - - -[1]: https://www.openpolicyagent.org/ -[2]: https://docs.datadoghq.com/fr/agent/kubernetes/integrations/ -[3]: https://docs.datadoghq.com/fr/developers/integrations/new_check_howto/#developer-toolkit -[4]: https://docs.datadoghq.com/fr/agent/kubernetes/daemonset_setup/?tab=k8sfile -[5]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/msg_facet.png -[6]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/kind_facet.png -[7]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/allowed_facet.png -[8]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/metric.png -[9]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/datadog_checks/open_policy_agent/data/conf.yaml.example -[10]: https://docs.datadoghq.com/fr/agent/guide/agent-commands/#start-stop-and-restart-the-agent -[11]: https://docs.datadoghq.com/fr/agent/guide/agent-commands/#agent-status-and-information -[12]: https://github.com/DataDog/integrations-core/blob/master/open_policy_agent/metadata.csv -[13]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/assets/service_checks.json -[14]: https://docs.datadoghq.com/fr/help/ \ No newline at end of file diff --git a/content/ja/integrations/open_policy_agent.md b/content/ja/integrations/open_policy_agent.md deleted file mode 100644 index 296a235dd6298..0000000000000 --- a/content/ja/integrations/open_policy_agent.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -app_id: open-policy-agent -app_uuid: 98c54837-27eb-48ca-9780-29bb593eecb8 -assets: - dashboards: - OPA base dashboard: assets/dashboards/open_policy_agent_overview.json - integration: - auto_install: true - configuration: - spec: assets/configuration/spec.yaml - events: - creates_events: false - metrics: - check: open_policy_agent.policies - metadata_path: metadata.csv - prefix: open_policy_agent. - service_checks: - metadata_path: assets/service_checks.json - source_type_id: 10142 - source_type_name: open_policy_agent - logs: - source: opa -author: - homepage: https://github.com/DataDog/integrations-extras - name: コミュニティ - sales_email: ara.pulido@datadoghq.com - support_email: ara.pulido@datadoghq.com -categories: -- コンプライアンス -- 構成とデプロイ -- incident-teams -- ログの収集 -- security -custom_kind: インテグレーション -dependencies: -- https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/README.md -display_on_public_website: true -draft: false -git_integration_title: open_policy_agent -integration_id: open-policy-agent -integration_title: Open Policy Agent -integration_version: 0.0.1 -is_public: true -manifest_version: 2.0.0 -name: open_policy_agent -public_title: Open Policy Agent -short_description: OPA インテグレーション -supported_os: -- linux -tile: - changelog: CHANGELOG.md - classifier_tags: - - カテゴリ::コンプライアンス - - Category::Configuration & Deployment - - Category::Containers - - Category::Log Collection - - Category::Security - - Supported OS::Linux - - Offering::Integration - configuration: README.md#Setup - description: OPA インテグレーション - media: [] - overview: README.md#Overview - support: README.md#Support - title: Open Policy Agent ---- - - - - -## 概要 - -このチェックは、[Open Policy Agent][1] からメトリクスを収集します。 - -## セットアップ - -Kubernetes クラスターで実行されている Agent 用にこのチェックをインストールおよび構成する場合は、以下の手順に従ってください。[オートディスカバリーのインテグレーションテンプレート][2]のガイドも参照してこの手順を行ってください。 - -### インストール - -open_policy_agent チェックを Kubernetes クラスターにインストールするには: - -1. [開発ツールキット][3]をインストールします。 -2. `integrations-extras` リポジトリを複製します。 - - ```shell - git clone https://github.com/DataDog/integrations-extras.git. - ``` - -3. `ddev` 構成を `integrations-extras/` パスで更新します。 - - ```shell - ddev config set repos.extras ./integrations-extras - ``` - -4. `open_policy_agent` パッケージをビルドするには、以下を実行します: - - ```shell - ddev -e release build open_policy_agent - ``` - -5. [Agent マニフェストをダウンロードして、Datadog Agent を DaemonSet としてインストールします][4]。 -6. チェックコード用と構成用の 2 つの `PersistentVolumeClaim` を作成します。 -7. それらをボリュームとして Agent ポッドテンプレートに追加し、チェックと構成に使用します。 - - ```yaml - 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 - ``` - -8. Kubernetes クラスターに Datadog Agent をデプロイします。 - - ```shell - kubectl apply -f agent.yaml - ``` - -9. インテグレーションアーティファクトの .whl ファイルを Kubernetes ノードにコピーするか、パブリック URL にアップロードします。 - -10. 次のコマンドを実行して、Agent でインテグレーション Wheel をインストールします。 - - ```shell - kubectl exec ds/datadog -- agent integration install -w /.whl - ``` - -11. 以下のコマンドを実行して、チェックと構成を対応する PVC にコピーします。 - - ```shell - 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 - ``` - -12. Datadog Agent ポッドを再起動します。 - -### ログ生成メトリクス - -デフォルトのダッシュボードには、OPA の決定メトリクス `open_policy_agent.decisions` に関連するグラフがいくつか表示されます。このメトリクスは OPA の "Decision Log" に基づいて作成されます。このメトリクスを生成してダッシュボードの該当する部分に入力するには、Datadog でログ生成メトリクスを新規作成します。 - -ログエントリの "Decision Log" タイプに対応するメトリクスのみを生成するために、まず OPA ログの `msg` フィールドに対応するファセットを作成します。OPA を起点とするログエントリのいずれかを選択し、`msg` フィールド付近にあるエンジンログをクリックして "Create facet for @msg" を選択します。 - -![Message ファセット][5] - -`input.request.kind.kind` フィールドと `result.response.allowed` フィールド用に合計 2 つのファセットを作成します。どちらのフィールドも "Decision Log" タイプのすべてのログエントリで利用可能です。 - -![Kind ファセット][6] -![Allowed ファセット][7] - -ファセットを作成したら、ダッシュボードを完成させるために必要なメトリクスを生成します。メニューで "Logs -> Generate Metrics" をクリックし、"Add a new metric" をクリックして以下のデータをフォームに入力してください。 - -![OPA 決定メトリクス][8] - -### 構成 - -1. OPA パフォーマンスデータの収集を開始するには、Agent ポッドに追加した `/confd` フォルダーの `open_policy_agent/conf.yaml` ファイルを編集します。使用可能なすべてのコンフィギュレーションオプションの詳細については、[サンプル open_policy_agent/conf.yaml][9] を参照してください。 - -2. [Agent を再起動します][10]。 - -### 検証 - -[Agent の status サブコマンドを実行][11]し、Checks セクションで `open_policy_agent` を探します。 - -## 収集データ - -### メトリクス -{{< get-metrics-from-git "open-policy-agent" >}} - - -### イベント - -open_policy_agent には、イベントは含まれません。 - -### サービスチェック -{{< get-service-checks-from-git "open-policy-agent" >}} - - -## トラブルシューティング - -ご不明な点は、[Datadog のサポートチーム][14]までお問合せください。 - - -[1]: https://www.openpolicyagent.org/ -[2]: https://docs.datadoghq.com/ja/agent/kubernetes/integrations/ -[3]: https://docs.datadoghq.com/ja/developers/integrations/python/ -[4]: https://docs.datadoghq.com/ja/agent/kubernetes/daemonset_setup/?tab=k8sfile -[5]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/msg_facet.png -[6]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/kind_facet.png -[7]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/allowed_facet.png -[8]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/metric.png -[9]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/datadog_checks/open_policy_agent/data/conf.yaml.example -[10]: https://docs.datadoghq.com/ja/agent/guide/agent-commands/#start-stop-and-restart-the-agent -[11]: https://docs.datadoghq.com/ja/agent/guide/agent-commands/#agent-status-and-information -[12]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/metadata.csv -[13]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/assets/service_checks.json -[14]: https://docs.datadoghq.com/ja/help/ \ No newline at end of file diff --git a/content/ko/integrations/open_policy_agent.md b/content/ko/integrations/open_policy_agent.md deleted file mode 100644 index cd11c56198748..0000000000000 --- a/content/ko/integrations/open_policy_agent.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -app_id: open-policy-agent -app_uuid: 98c54837-27eb-48ca-9780-29bb593eecb8 -assets: - dashboards: - OPA base dashboard: assets/dashboards/open_policy_agent_overview.json - integration: - auto_install: true - configuration: - spec: assets/configuration/spec.yaml - events: - creates_events: false - metrics: - check: open_policy_agent.policies - metadata_path: metadata.csv - prefix: open_policy_agent. - service_checks: - metadata_path: assets/service_checks.json - source_type_id: 10142 - source_type_name: open_policy_agent - logs: - source: opa -author: - homepage: https://github.com/DataDog/integrations-extras - name: 커뮤니티 - sales_email: ara.pulido@datadoghq.com - support_email: ara.pulido@datadoghq.com -categories: -- compliance -- 설정 및 배포 -- 컨테이너 -- 로그 수집 -- security -custom_kind: 통합 -dependencies: -- https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/README.md -display_on_public_website: true -draft: false -git_integration_title: open_policy_agent -integration_id: open-policy-agent -integration_title: Open Policy Agent -integration_version: 0.0.1 -is_public: true -manifest_version: 2.0.0 -name: open_policy_agent -public_title: Open Policy Agent -short_description: OPA 통합 -supported_os: -- linux -tile: - changelog: CHANGELOG.md - classifier_tags: - - Category::Compliance - - Category::Configuration & Deployment - - Category::Containers - - Category::Log Collection - - Category::Security - - Supported OS::Linux - - Offering::Integration - configuration: README.md#Setup - description: OPA 통합 - media: [] - overview: README.md#Overview - support: README.md#Support - title: Open Policy Agent ---- - - - - -## 개요 - -본 점검은 [Open Policy Agent][1]에서 메트릭을 수집합니다. - -## 설정 - -아래 지침을 따라 쿠버네티스 클러스터에서 실행되는 에이전트에 이 점검을 설치하고 설정하세요. 지침을 적용하는 데 가이드가 필요하면 [자동탐지 통합 템플릿][2]을 참고하세요. - -### 설치 - -다음과 같이 쿠버네티스(Kubernetes) 클러스터에서 open_policy_agent 점검을 설치합니다. - -1. [개발자 툴킷][3]을 설치합니다. -2. `integrations-extras` 리포지토리를 복제합니다. - - ```shell - git clone https://github.com/DataDog/integrations-extras.git. - ``` - -3. `integrations-extras/` 경로로 `ddev` config을 업데이트합니다. - - ```shell - ddev config set repos.extras ./integrations-extras - ``` - -4. `open_policy_agent` 패키지를 빌드하려면 다음을 실행합니다. - - ```shell - ddev -e release build open_policy_agent - ``` - -5. [에이전트 매니페스트를 다운로드해 Datadog 에이전트를 DaemonSet으로 설치][4]합니다. -6. `PersistentVolumeClaim`을 두 개 생성합니다. 하나는 점검 코드용, 다른 하나는 구성용입니다. -7. 생성한 두 파일을 에이전트 포드 템플릿에 볼륨으로 추가하고 내 점검과 구성에 사용하세요. - - ```yaml - 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 - ``` - -8. Datadog 에이전트를 쿠버네티스(Kubernetes) 클러스터에 배포합니다. - - ```shell - kubectl apply -f agent.yaml - ``` - -9. 통합 아티팩트 .whl 파일을 내 쿠버네티스(Kubernetes) 노드에 복사하거나 공용 URL에 업로드합니다. - -10. 다음 명령을 실행해 통합 에이전트와 통합 휠을 설치하세요. - - ```shell - kubectl exec ds/datadog -- agent integration install -w /.whl - ``` - -11. 다음 명령을 실행해 점검과 구성을 복사해 해당 PVC로 붙여넣으세요. - - ```shell - 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 - ``` - -12. Datadog 에이전트 포드를 재시작하세요. - -### 로그 생성 메트릭 - -기본 대시보드에는 `open_policy_agent.decisions` OPA 결정에 대한 메트릭과 연관된 그래프가 포함되어 있습니다. 본 메트릭은 OPA '결정 로그'에 기반하여 생성됩니다. 메트릭을 생성하고 대시보드의 해당 부분을 채우려면, Datadog의 신규 로그 생성 메트릭을 새로 만듭니다. - -먼저, OPA 로그의 `msg` 필드에 대한 패싯을 생성합니다. 로그 엔트리의 "결정 로그" 유형에 대해서만 메트릭을 생성하기 때문입니다. 해당 작업을 하려면 OPA에서 수신하는 로그 엔트리 중 하나를 선택하고, `msg` 필드 근처의 엔진 로그를 클릭한 다음 "@msg에 대한 패싯 생성하기"를 선택합니다. - -![메시지 패싯][5] - -`input.request.kind.kind` 필드용 패싯 하나와`result.response.allowed` 필드용 패싯 하나, 이렇게 두 개의 패싯을 생성하고, 둘 다 "결정 로그" 로그 엔트리 유형에서 사용할 수 있습니다. - -![유형 패싯][6] -![허용 패싯][7] - -패싯을 생성한 다음 필요한 메트릭을 생성하여 대시보드를 완성합니다. "로그 -> 메트릭 생성" 메뉴를 클릭합니다. "새 메트릭 추가"를 클릭하고 다음 데이터로 양식을 채웁니다. - -![OPA 결정 메트릭][8] - -### 설정 - -1. 에이전트 포드에 추가한 `/confd` 폴더에 있는 `open_policy_agent/conf.yaml` 파일을 편집해 OPA 성능 데이터 수집을 시작하세요. 사용할 수 있는 설정 옵션을 모두 보려면 [open_policy_agent/conf.yaml 샘플][9]을 참고하세요. - -2. [에이전트를 다시 시작합니다][10]. - -### 검증 - -[에이전트 상태 하위 명령][11]을 실행하고 점검 섹션에서 `open_policy_agent`을 찾습니다. - -## 수집한 데이터 - -### 메트릭 -{{< get-metrics-from-git "open-policy-agent" >}} - - -### 이벤트 - -Open_policy_agent는 이벤트를 포함하지 않습니다. - -### 서비스 점검 -{{< get-service-checks-from-git "open-policy-agent" >}} - - -## 트러블슈팅 - -도움이 필요하신가요? [Datadog 지원 팀][14]에 문의하세요. - - -[1]: https://www.openpolicyagent.org/ -[2]: https://docs.datadoghq.com/ko/agent/kubernetes/integrations/ -[3]: https://docs.datadoghq.com/ko/developers/integrations/python/ -[4]: https://docs.datadoghq.com/ko/agent/kubernetes/daemonset_setup/?tab=k8sfile -[5]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/msg_facet.png -[6]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/kind_facet.png -[7]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/allowed_facet.png -[8]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/open_policy_agent/images/metric.png -[9]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/datadog_checks/open_policy_agent/data/conf.yaml.example -[10]: https://docs.datadoghq.com/ko/agent/guide/agent-commands/#start-stop-and-restart-the-agent -[11]: https://docs.datadoghq.com/ko/agent/guide/agent-commands/#agent-status-and-information -[12]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/metadata.csv -[13]: https://github.com/DataDog/integrations-extras/blob/master/open_policy_agent/assets/service_checks.json -[14]: https://docs.datadoghq.com/ko/help/ \ No newline at end of file