エージェント構成の更新

エージェント構成を更新します。

エージェント構成を更新するときに、そのタグを更新することもできます。タグ付けの詳細は、リソース・タグを参照してください。コンソールを使用してエージェント構成のタグを更新するには、その詳細を取得し、「タグ」を選択します。

エージェント構成の更新が検出され、自動的にロードされます。

    1. 「エージェント構成」リスト・ページの「モニタリング」で、操作するエージェント構成を検索します。リスト・ページまたはエージェント構成の検索に関するヘルプが必要な場合は、エージェント構成のリストを参照してください。
    2. エージェント構成の「アクション」メニュー(アクション・メニュー)から、「編集」を選択します。
    3. 「エージェント構成の編集」パネルで、必要に応じて値を更新します。
      このフィールドの詳細は、「エージェント構成の作成」を参照してください。
    4. 「Save changes」を選択します。
  • 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"
    }