-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
documentation on accessing the json elements of the journald receiver logs in processors #34808
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hi @arnaudvre. Is the collector version correct? |
hey @sumo-drosiek what version is supported? I'm happy to use whatever the supported version is but don't think that will change the issue. |
@arnaudvre I look at it more carefully and I think you should use transform processor if you want to use body attributes:
|
Get this error:
tried escaping the underscore:
also tried with a period just in case that worked although was sure it wouldn't:
but the following does it!
Thanks a lot. @sumo-drosiek I'd like to abuse of your knowledge slightly if possible to ask if you know of how to collapse the encapsulating json element, in this case the hostname is coming in as attribute.hostname but I'd like hostname to be top level, not nested under the attribute element. |
@arnaudvre Do you relate strictly to the file exporter? Logs are structured in OTLP, and AFAIK you cannot create your own property on the top-level. Please see the following documentation |
@sumo-drosiek we're currently using lokiexporter but will soon move to otlphttp |
I think it's not possible to add top level property in the lokiexporter neither |
nor otlphttp correct? |
correct
śr., 4 wrz 2024, 16:48 użytkownik arnaudvre ***@***.***>
napisał:
… nor otlphttp correct?
—
Reply to this email directly, view it on GitHub
<#34808 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVMK4MNB5I66GF3IQBZO53ZU4MVBAVCNFSM6AAAAABM5R4RG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZGI3TIMJYHA>
.
You are receiving this because you commented.Message ID:
<open-telemetry/opentelemetry-collector-contrib/issues/34808/2329274188@
github.com>
|
Component(s)
receiver/journald
What happened?
Cannot figure out how to reference the name value pairs from the journald log in attributeprocessor
Documentation bug / request for documentation.
Collector version
0.6.0
Environment information
Environment
OS: Ubuntu 22.04
OpenTelemetry Collector configuration
Log output
No response
Additional context
Example log json when written to file using the file exporter:
The text was updated successfully, but these errors were encountered: