-
Notifications
You must be signed in to change notification settings - Fork 71
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
Missing log labels: instance_id, zone #493
Comments
Have you followed the instructions here: https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/authorization#authorizing_the_ops_agent |
Yes, I have followed instructions. Without it there is a lot of errors about authorization in |
I am also facing this issue. I am in a similar situation as @b3nk3nobi where we don't run VMs with attached service accounts, and can't change that. I have followed the instructions in the authenticating the agent docs by creating a service account key, placing it in a secure location, and then setting I am also able to receive the instance ID and zone via the metadata.google.internal HTTP call on the VM in question. Without the Please let me know if more detail is needed. Thanks! UpdateGot clever and thought I'd found a workaround, but it didn't work. Unsure if this is related, or should be a separate issue (please let me know). Attempting to use the processors:
fix_missing_labels:
type: modify_fields
fields:
resource.labels.instance_id:
static_value: my-instance-name ...results in the following error:
My understanding based on the docs is that the destination field ( I did notice in the docs that the If so, I would suggest updating the documentation to include this information under that section as well. |
These are missing due to how fluent bit operates when it is not authenticated through the metadata server, since it will only auto populate these fields through the If you just want to be able to identify VMs, as a work-around, versions after 2.15.0 include #544 which auto populates the resource_name label Replying to @logicbomb421 's attempted work-around:
|
This issue was marked stale due to lack of activity. It will be closed in 14 days. |
In the Log Explorer there is no information about
instance_id
orzone
:I cannot filter logs by instance:
VMs don't have any service account assigned and it cannot be changed because they are in production (can't stop them), so I'm using file with SA private key located in
/etc/google/auth/application_default_credentials.json
.Using
curl
to get these values on the actual VM is working fine:logging-module.log
:google-cloud-ops-agent 2.12.0~ubuntu20.04
Am I missing something or is it working as it should be?
The text was updated successfully, but these errors were encountered: