Updating an Agent Configuration

Update an agent configuration.

    1. Open the navigation menu and click Observability & Management. Under Monitoring, click Agent Configurations.
    2. Under List Scope, select a compartment that you have permission to work in.
    3. Click the name of the agent configuration that you want.
    4. On the agent configuration details page, click Edit.
    5. In the Edit agent configuration panel, update the values as needed.
      For more information about the fields, see Creating an Agent Configuration.
    6. Click Save changes.
  • Use the oci logging agent-configuration update command and required parameters to update an agent configuration:

    oci logging agent-configuration update --config-id config_ocid --display-name display_name --is-enabled is-enabled [true|false] --service-configuration service_configuration [OPTIONS]
    Example command and JSON files
    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"
            }
          }

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the UpdateUnifiedAgentConfiguration operation to update an agent configuration.

    Example API request
    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"
    }