Adam Sandor
Adam Sandor

Reputation: 412

Push Stackdriver metrics under custom ID

We are trying to use the Stackdriver Agent to send metrics from an application that is running in a container. We manage to run the agent as a sidecar container and it is pushing metrics successfully.

The problem is it is pushing them under an instance_id that doesn't make sense for us. What we want to do is simply configure the instance_id on our own.

My guess was we could do this by configuring the Hostname parameter in collectd-gcm.conf.tmpl but it seems like the write_gcm plugin is ignoring that. Next thing we could try is to configure the write_gcm plugin ourselves but I can't find any documentation or source code on that plugin to see how it works and what configuration options does it support. Any ideas where to go from here?

Our configuration looks like this now:

Interval 60

Hostname "ingestion"

LoadPlugin write_gcm
<Plugin "write_gcm">
   PrettyPrintJSON false
</Plugin>

Include "/opt/stackdriver/collectd/etc/collectd.d"

Upvotes: 1

Views: 165

Answers (1)

N Singh
N Singh

Reputation: 327

Instance-ids are default metadata entries. As per documentation, "Default metadata is always defined and set by the server. You cannot manually edit any of these metadata pairs." Currently, it is not possible to edit the instance-id or customize it. You can submit a feature-request on Google Cloud public issue tracker along with your use case, requirement and expected outcome.

Upvotes: 1

Related Questions