Updating an Agent Configuration

Update an agent configuration.

Agent configuration updates are detected and automatically loaded.

    1. On the Agent configurations list page under Monitoring, select the agent configuration that you want to work with. If you need help finding the list page or the agent configuration, see Listing Agent Configurations.
      The agent configuration's details page opens.
    2. From the Actions menu (Actions Menu) for the agent configuration, select Edit.
    3. In the Edit agent configuration panel, update the values as needed.
      For more information about the fields, see Creating an Agent Configuration.
    4. Select 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"
    }