I have been researching this and wanted to know if anyone has setup log ingestion rules for a file share that is not attached to a pc. We have software that writes its logs to a NFS share drive, however these shares are not attached to the PC, they are browsable from the host.
I assume the one agent need to be able to see the share location somehow, essentially the location to ingest logs will be something like \\hostname\testLogs\test.json
any documentation or guidance will be appreciated.
The Dynatrace OpenTelemetry collector distribution includes two components I think may help here. The filelog receiver (point it at the network share?) and the syslog receiver (if you’re looking at syslog formatted data?)
config.yaml
<span class="pl-ent">receivers</span>:
<span class="pl-ent">filelog</span>:
<span class="pl-ent">include</span>:
- <span class="pl-s"><span>\\dcptest01\testLogs\*.json</span></span><span class="pl-s"><br><br></span><span class="pl-ent">processors:<br> transform/add_timestamps</span>:<br><span class="pl-ent"> error_mode</span>: <span class="pl-s">ignore<br></span><span class="pl-ent"> log_statements</span>:<br> - <span class="pl-ent">context</span>: <span class="pl-s">string<br></span> statements:<br><span> - set(observed_time, Now())<br> - set(time, Now())<br>exporters:<br> otlphttp/dynatrace:<br> endpoint: "${env:DT_ENDPOINT}/api/v2/otlp"<br> headers:<br> Authorization: "Api-Token ${env:DT_API_TOKEN}"<br>service:<br> pipelines:<br> logs:<br> receivers: [filelog]<br> processors: [<span class="pl-ent">transform/add_timestamps</span>]<br> exporters: [otlphttp/dynatrace]<br></span>
Then run it in any way you like (Kubernetes cluster, standalone binary on the host, docker etc.)
// Example running as a standalone binary<br>export DT_ENDPOINT=https://abc12345.live.dynatrace.com<br>export DT_API_TOKEN=dt0c01.****.**** // This token has logs.ingest permissions<br>./dynatrace-otel-collector --config=config.yaml
I would like to see this moved into the Dynatrace UI as an extension. Should be as simple as provide full path and a credential from the cred vault. Assign it to a location of Activegates so the workload can be HA.