Merge pull request #401 from breed808/adfs_loop
ADFS: explicitly use first perflib result
This commit is contained in:
commit
2688847c2e
|
@ -119,72 +119,70 @@ func (c *adfsCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, adfs := range adfsData {
|
ch <- prometheus.MustNewConstMetric(
|
||||||
ch <- prometheus.MustNewConstMetric(
|
c.adLoginConnectionFailures,
|
||||||
c.adLoginConnectionFailures,
|
prometheus.CounterValue,
|
||||||
prometheus.CounterValue,
|
adfsData[0].AdLoginConnectionFailures,
|
||||||
adfs.AdLoginConnectionFailures,
|
)
|
||||||
)
|
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.certificateAuthentications,
|
c.certificateAuthentications,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
adfs.CertificateAuthentications,
|
adfsData[0].CertificateAuthentications,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.deviceAuthentications,
|
c.deviceAuthentications,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
adfs.DeviceAuthentications,
|
adfsData[0].DeviceAuthentications,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.extranetAccountLockouts,
|
c.extranetAccountLockouts,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
adfs.ExtranetAccountLockouts,
|
adfsData[0].ExtranetAccountLockouts,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.federatedAuthentications,
|
c.federatedAuthentications,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
adfs.FederatedAuthentications,
|
adfsData[0].FederatedAuthentications,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.passportAuthentications,
|
c.passportAuthentications,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
adfs.PassportAuthentications,
|
adfsData[0].PassportAuthentications,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.passiveRequests,
|
c.passiveRequests,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
adfs.PassiveRequests,
|
adfsData[0].PassiveRequests,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.passwordChangeFailed,
|
c.passwordChangeFailed,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
adfs.PasswordChangeFailed,
|
adfsData[0].PasswordChangeFailed,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.passwordChangeSucceeded,
|
c.passwordChangeSucceeded,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
adfs.PasswordChangeSucceeded,
|
adfsData[0].PasswordChangeSucceeded,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.tokenRequests,
|
c.tokenRequests,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
adfs.TokenRequests,
|
adfsData[0].TokenRequests,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.windowsIntegratedAuthentications,
|
c.windowsIntegratedAuthentications,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
adfs.WindowsIntegratedAuthentications,
|
adfsData[0].WindowsIntegratedAuthentications,
|
||||||
)
|
)
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue