use of uk.gov.ida.hub.config.configuration.PrometheusClientServiceConfiguration in project verify-hub by alphagov.
the class PrometheusClientService method createCertificateExpiryDateCheckMetrics.
public void createCertificateExpiryDateCheckMetrics() {
final PrometheusClientServiceConfiguration configuration = configConfiguration.getCertificateExpiryDateCheckServiceConfiguration();
if (configuration.getEnable()) {
Gauge expiryDateGauge = Gauge.build(VERIFY_CONFIG_CERTIFICATE_EXPIRY_DATE, VERIFY_CONFIG_CERTIFICATE_EXPIRY_DATE_HELP).labelNames("entity_id", "use", "subject", "fingerprint", "serial").register();
Gauge lastUpdatedGauge = Gauge.build(VERIFY_CONFIG_CERTIFICATE_EXPIRY_DATE_LAST_UPDATED, VERIFY_CONFIG_CERTIFICATE_EXPIRY_DATE_LAST_UPDATED_HELP).register();
CertificateExpiryDateCheckService certificateExpiryDateCheckService = new CertificateExpiryDateCheckService(certificateService, expiryDateGauge, lastUpdatedGauge);
createScheduledExecutorService(configuration, VERIFY_CONFIG_CERTIFICATE_EXPIRY_DATE, certificateExpiryDateCheckService);
}
}
use of uk.gov.ida.hub.config.configuration.PrometheusClientServiceConfiguration in project verify-hub by alphagov.
the class PrometheusClientService method createCertificateOcspRevocationStatusCheckMetrics.
public void createCertificateOcspRevocationStatusCheckMetrics() {
final PrometheusClientServiceConfiguration configuration = configConfiguration.getCertificateOcspRevocationStatusCheckServiceConfiguration();
if (configuration.getEnable()) {
Gauge ocspStatusGauge = Gauge.build(VERIFY_CONFIG_CERTIFICATE_OCSP_REVOCATION_STATUS, VERIFY_CONFIG_CERTIFICATE_OCSP_REVOCATION_STATUS_HELP).labelNames("entity_id", "use", "subject", "fingerprint", "serial").register();
Gauge lastUpdatedGauge = Gauge.build(VERIFY_CONFIG_CERTIFICATE_OCSP_LAST_SUCCESS_TIMESTAMP, VERIFY_CONFIG_CERTIFICATE_OCSP_LAST_SUCCESS_TIMESTAMP_HELP).labelNames("entity_id", "use", "subject", "fingerprint", "serial").register();
OcspCertificateChainValidationService ocspCertificateChainValidationService = new OcspCertificateChainValidationService(ocspCertificateChainValidityChecker, certificateService, ocspStatusGauge, lastUpdatedGauge);
createScheduledExecutorService(configuration, VERIFY_CONFIG_CERTIFICATE_OCSP_REVOCATION_STATUS, ocspCertificateChainValidationService);
}
}
Aggregations