-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
out_datadog: support configurable hostname #8971
Comments
jszwedko
added a commit
to jszwedko/fluent-bit
that referenced
this issue
Jun 20, 2024
This PR adds support for setting a static hostname in the Datadog output plugin. This field is analogous to the existing `dd_service` and `dd_source` configuration options that can be used to set a static value. If unset, the default behavior is backwards compatible. This behavior is to not set an explicity `hostname` field, but if the record has a field that is detected as the hostname in Datadog (such as `host` or `syslog.hostname`), it will be picked up. Closes: fluent#8971 Signed-off-by: Jesse Szwedko <[email protected]>
7 tasks
craig bot
pushed a commit
to cockroachdb/cockroach
that referenced
this issue
Jul 26, 2024
126601: drtprod: emit audit logs for drt-chaos r=sudomateo a=sudomateo This patch updates the Fluent Bit configuration for DRT clusters to emit audit logs. This is only configured for the `drt-chaos` cluster for now, but can easily be expanded to other clusters in the future. This patch also updates the way Fluent Bit sets the hostname on logs since Fluent Bit has not cut a release that contains the fix for fluent/fluent-bit#8971. Finally, this patch also fixes an issue with the Datadog agent configuration removal throwing a shell error. Epic: CLOUDOPS-9609 Release note: None 127533: sql/schemachanger: copy ALTER TABLE .. SET TYPE validation checks from legacy to DSC r=spilchen a=spilchen This duplicates various validation checks from the legacy schema changer's ALTER TABLE .. SET TYPE command for the declarative schema changer, which uses states from various schema changer elements. Additionally, it introduces more tests for validation-only type conversions. These conversions don't require data to be rewritten; instead, they validate existing rows against the new type. For example, changing from CHAR(20) to CHAR(10) requires ensuring each row is 10 characters or fewer. The actual implementation of validation-only type conversions in the DSC will be handled in a subsequent PR. Epic: CRDB-25314 Informs: #127516 Release note: None Co-authored-by: Matthew Sanabria <[email protected]> Co-authored-by: Matt Spilchen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The Datadog /api/v2/logs API accepts a request body that contains the
hostname
attribute, like so.However when Fluent Bit sends logs to Datadog it sets all of those attributes except
hostname
.fluent-bit/plugins/out_datadog/datadog.h
Lines 30 to 33 in 5ce9c43
This means that logs sent from Fluent Bit to Datadog will not be associated with a host. This is an issue because operators cannot query logs by host nor can they navigate from the infrastructure list of hosts to the logs for a particular host.
Describe the solution you'd like
Fluent Bit should support specifying the
hostname
attribute similar to how it already supportsdd_source
anddd_service
. A trivial diff of what this would look like is included below.Describe alternatives you've considered
There are 2 workarounds that operators can follow to associate logs with a host. One is rather non-functional and the other is a bit hidden from the average operator.
First, operators can explicitly set the
host
tag using thedd_tags
configuration option, like so.This will have logs show up with the host populated in Datadog but operators will still be unable to query logs by host nor can they navigate from the infrastructure list of hosts to the logs for a particular host. In my opinion this approach is a non-starter.
Second, operators can ensure their Fluent Bit records contain the field
hostname
.This will have logs show up with the host populated in Datadog and operators will finally be able to query logs by host and navigate from the infrastructure list of hosts to the logs for a particular host.
This approach works because Fluent Bit takes the entire MessagePack object, converts it to JSON, and sends it as the request body to the Datadog API. However, it's a bit hidden from operators and too "magical" to rely on.
fluent-bit/plugins/out_datadog/datadog.c
Lines 321 to 335 in 5ce9c43
Additional context
This additional context section contains Fluent Bit configuration and a screenshot of the resulting behavior in Datadog.
The text was updated successfully, but these errors were encountered: