mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 22:49:40 -08:00
Add GCE Instance Status
This commit is contained in:
parent
0cf8586136
commit
c73aa82589
|
@ -40,6 +40,7 @@ const (
|
||||||
gceLabelPublicIP = gceLabel + "public_ip"
|
gceLabelPublicIP = gceLabel + "public_ip"
|
||||||
gceLabelPrivateIP = gceLabel + "private_ip"
|
gceLabelPrivateIP = gceLabel + "private_ip"
|
||||||
gceLabelInstanceName = gceLabel + "instance_name"
|
gceLabelInstanceName = gceLabel + "instance_name"
|
||||||
|
gceLabelInstanceStatus = gceLabel + "instance_status"
|
||||||
gceLabelTags = gceLabel + "tags"
|
gceLabelTags = gceLabel + "tags"
|
||||||
|
|
||||||
// Constants for instrumentation.
|
// Constants for instrumentation.
|
||||||
|
@ -167,6 +168,7 @@ func (gd *GCEDiscovery) refresh() (tg *config.TargetGroup, err error) {
|
||||||
gceLabelProject: model.LabelValue(gd.project),
|
gceLabelProject: model.LabelValue(gd.project),
|
||||||
gceLabelZone: model.LabelValue(inst.Zone),
|
gceLabelZone: model.LabelValue(inst.Zone),
|
||||||
gceLabelInstanceName: model.LabelValue(inst.Name),
|
gceLabelInstanceName: model.LabelValue(inst.Name),
|
||||||
|
gceLabelInstanceStatus: model.LabelValue(inst.Status),
|
||||||
}
|
}
|
||||||
priIface := inst.NetworkInterfaces[0]
|
priIface := inst.NetworkInterfaces[0]
|
||||||
labels[gceLabelNetwork] = model.LabelValue(priIface.Network)
|
labels[gceLabelNetwork] = model.LabelValue(priIface.Network)
|
||||||
|
|
Loading…
Reference in a new issue