mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Added __meta_gce_instance_id discovery label
Populated from instance.ID. I will follow up with a change to the documentation. Signed-off-by: Javier Kohen <jkohen@google.com>
This commit is contained in:
parent
d6c590018b
commit
7e9549b398
|
@ -40,6 +40,7 @@ const (
|
||||||
gceLabelSubnetwork = gceLabel + "subnetwork"
|
gceLabelSubnetwork = gceLabel + "subnetwork"
|
||||||
gceLabelPublicIP = gceLabel + "public_ip"
|
gceLabelPublicIP = gceLabel + "public_ip"
|
||||||
gceLabelPrivateIP = gceLabel + "private_ip"
|
gceLabelPrivateIP = gceLabel + "private_ip"
|
||||||
|
gceLabelInstanceID = gceLabel + "instance_id"
|
||||||
gceLabelInstanceName = gceLabel + "instance_name"
|
gceLabelInstanceName = gceLabel + "instance_name"
|
||||||
gceLabelInstanceStatus = gceLabel + "instance_status"
|
gceLabelInstanceStatus = gceLabel + "instance_status"
|
||||||
gceLabelTags = gceLabel + "tags"
|
gceLabelTags = gceLabel + "tags"
|
||||||
|
@ -209,6 +210,7 @@ func (d *Discovery) refresh() (tg *targetgroup.Group, err error) {
|
||||||
labels := model.LabelSet{
|
labels := model.LabelSet{
|
||||||
gceLabelProject: model.LabelValue(d.project),
|
gceLabelProject: model.LabelValue(d.project),
|
||||||
gceLabelZone: model.LabelValue(inst.Zone),
|
gceLabelZone: model.LabelValue(inst.Zone),
|
||||||
|
gceLabelInstanceID: model.LabelValue(inst.Id),
|
||||||
gceLabelInstanceName: model.LabelValue(inst.Name),
|
gceLabelInstanceName: model.LabelValue(inst.Name),
|
||||||
gceLabelInstanceStatus: model.LabelValue(inst.Status),
|
gceLabelInstanceStatus: model.LabelValue(inst.Status),
|
||||||
gceLabelMachineType: model.LabelValue(inst.MachineType),
|
gceLabelMachineType: model.LabelValue(inst.MachineType),
|
||||||
|
|
Loading…
Reference in a new issue