エージェント構成の更新
エージェント構成を更新します。
エージェント構成を更新するときに、そのタグを更新することもできます。タグ付けの詳細は、リソース・タグを参照してください。コンソールを使用してエージェント構成のタグを更新するには、その詳細を取得し、「タグ」を選択します。
エージェント構成の更新が検出され、自動的にロードされます。
oci logging agent-configuration updateコマンドと必要なパラメータを使用して、エージェント構成を更新します:
oci logging agent-configuration update --config-id config_ocid --display-name display_name --is-enabled is-enabled [true|false] --service-configuration service_configuration [OPTIONS]
コマンドおよびJSONファイルの例oci logging agent-configuration update --config-id <config_ocid> \ --display-name <display_name> --is-enabled true \ --service-configuration file://update-service-configuration.json \ --wait-for-state SUCCEEDED --max-wait-seconds 60
update-service-configuration.json
:{ "sourceType": "KUBERNETES", "source": { "name": "KUBERNETES-uniqueid", "scrapeTargets": [ { "resourceType": "PODS", "k8sNamespace": "k8s-ns" } ] }, "destination": { "compartmentId": "<compartment_id>", "metricsNamespace": "metricsnns" }, "filter": { "allowList": [ "regex-test" ], "denyList": [], "filterType": "KUBERNETES_FILTER", "name": "test" } }
CLIコマンドのパラメータおよび値の完全なリストは、CLIコマンド・リファレンスを参照してください。
UpdateUnifiedAgentConfiguration操作を実行して、エージェント構成を更新します。
APIリクエストの例PUT /20200531/unifiedAgentConfigurations/<unifiedagentconfiguration_ocid> Host: https://logging.us-phoenix-1.oci.oraclecloud.com <authorization and other headers> { "serviceConfiguration": { "configurationType": "MONITORING", "applicationConfigurations": [ { "sourceType": "KUBERNETES", "source": { "name": "KUBERNETES-uniqueid", "scrapeTargets": [ { "resourceType": "PODS", "k8sNamespace": "k8s-ns" } ] }, "destination": { "compartmentId": "<compartment_id>", "metricsNamespace": "metricsnns" }, "filter": { "allowList": [ "regex-test" ], "denyList": [], "filterType": "KUBERNETES_FILTER", "name": "test" } } ] }, "displayName": "mar-test", "isEnabled": true, "groupAssociation": { "groupList": [ "<dynamic_group_id>" ] }, "definedTags": {}, "freeformTags": {}, "description": "test update" }