Agent-Konfiguration aktualisieren
Agent-Konfiguration aktualisiert.
Wenn Sie eine Agent-Konfiguration aktualisieren, können Sie auch die zugehörigen Tags aktualisieren. Ressourcentags.
Weitere Informationen zum Tagging finden Sie unterAktualisierungen der Agent-Konfiguration werden erkannt und automatisch geladen.
Verwenden Sie den Befehl oci logging agent-configuration update und die erforderlichen Parameter, um eine Agent-Konfiguration zu aktualisieren:
oci logging agent-configuration update --config-id config_ocid --display-name display_name --is-enabled is-enabled [true|false] --service-configuration service_configuration [OPTIONS]
Beispielbefehl und JSON-Dateienoci 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" } }
Eine vollständige Liste der Parameter und Werte für CLI-Befehle finden Sie in der CLI-Befehlsreferenz.
Führen Sie den Vorgang UpdateUnifiedAgentConfiguration aus, um eine Agent-Konfiguration zu aktualisieren.
Beispiel-API-AnforderungPUT /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" }