エージェント構成の更新

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

    1. ナビゲーション・メニューを開き、「監視および管理」をクリックします。「モニタリング」で、「エージェント構成」をクリックします。
    2. 「リスト範囲」で、作業する権限があるコンパートメントを選択します。
    3. 必要なエージェント構成の名前をクリックします。
    4. エージェント構成の詳細ページで、「編集」をクリックします。
    5. 「エージェント構成の編集」パネルで、必要に応じて値を更新します。
      各フィールドの詳細は、エージェント構成の作成を参照してください。
    6. 「変更の保存」をクリックします。
  • エージェント構成を更新するには、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"
    }