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