You can use the local http://localhost:<port>/v2/logs/ingest API endpoint to push locally retrieved logs to Dynatrace over a secure and authenticated channel. This endpoint is available only to local clients and cannot be reached from remote hosts.
The OneAgent log ingest endpoint mimics the behavior of the public Log Monitoring API - POST ingest logs endpoint.
You need to enable the OneAgent log ingest API at the environment or host level. Note that the host-level configuration overrides the environment configuration.
Host group and select the host group you want to configure.
The Host group property is not displayed when the selected host doesn't belong to any host group.
<group name> link, where <group name> is the name of the host group that you want to configure.The request consumes an application/json payload with the charset=utf-8 character set. For more information on the format, see Log Monitoring API - POST ingest logs.
The log events pushed to Dynatrace using the OneAgent log ingest API are subject to the same limits as those for the public Log Monitoring API - POST ingest logs.
With this curl command, you'll ingest the Exception: Custom error log sent via OneAgent log ingest event, with the severity set to error and a custom attribute set to attribute value. As the timestamp isn't provided, the event is automatically timestamped with the event reading time. You'll be able to access the event in Log viewer (Logs Classic).
curl -i -X POST "http://127.0.0.1:14499/v2/logs/ingest" -H "Content-Type: application/json; charset=utf-8" -d "{\"content\":\"Exception: Custom error log sent via Generic Log Ingest\",\"custom.attribute\":\"attribute value\",\"severity\": \"error\"}"
Successful response returns the 204 code.
HTTP/1.1 204 No ContentContent-Type: application/jsonServer: EECContent-Length: 116
Starting with OneAgent version 1.267+, AIX systems also support metric ingestion.
The default metric ingestion port is 14499. If necessary, you can use the oneagentctl command to check or change the port. Changing the metric ingestion port requires restart of OneAgent. Add --restart-service to the command to restart OneAgent automatically.
Use the --get-extensions-ingest-port parameter to show the current local ingestion port, 14499 by default.
./oneagentctl --get-extensions-ingest-port.\oneagentctl.exe --get-extensions-ingest-portUse the --set-extensions-ingest-port=<arg> parameter to set a custom local ingestion port.
./oneagentctl --set-extensions-ingest-port=14499 --restart-service.\oneagentctl.exe --set-extensions-ingest-port=14499 --restart-serviceConfigure your host proxy to allow localhost traffic going to the metric ingestion port, 14499 by default.
Note that changing the port for the OneAgent log ingest API also affects OneAgent metric API, Metric scripting integration, and Telegraf metrics integration.