Skip to content
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

[Q] How to add missing metadata to Google logging agent? #464

Open
raszkiewicz opened this issue Jun 16, 2021 · 1 comment
Open

[Q] How to add missing metadata to Google logging agent? #464

raszkiewicz opened this issue Jun 16, 2021 · 1 comment

Comments

@raszkiewicz
Copy link

I'm shipping logs from on-premise to the GCP using google-fluentd agent but on the GCP side it has missing few metadata like resource.labels.instance_id

Is there any way to have it set via funentd configuration?

@junkett
Copy link

junkett commented Mar 29, 2022

Hi have you figured this out?
I was able to set this up like this (this is my template for ansible - but I guess you will get the idea):

# Configure all sources to output to Google Cloud Logging
<match **>
  @type google_cloud
  buffer_type file
  buffer_path /var/log/td-agent/buffers
  buffer_chunk_limit 512KB
  flush_interval 5s
  disable_retry_limit false
  retry_limit 3
  retry_wait 10
  max_retry_wait 300
  num_threads 8
  use_grpc true
  partial_success true
  enable_monitoring true
  monitoring_type opencensus
  
  zone {{ region }}
  vm_id {{ ovh_id }}
  vm_name {{ ansible_hostname }}
  labels namespace:syslog,provider:{{ provider }},rack:{{ rack }}
  use_metadata_service false
</match>

I am however not able to convince the plugin to send data for type: "general_node" only for type:"gce_node"
I was able to send this via fluentbit but not fluentd...
If anyone has idea - I would be very grateful for any hints, thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants