Events Monitoring
Athenz can be monitored by capturing events using an Event monitoring service.
Athenz Events¶
The following events can be sent by Athenz
- API HTTP Requests - Name of API method, status and duration
- Certificate Requests
- Email Reminders and Notifications
Enable ZMS Event Monitoring in Prometheus¶
Enable ZMS Event Monitoring in Prometheus for ZMS server by performing the following steps:
- Build the
athenz_metrics_prometheus
Java project located incontributions/metric/prometheus
- Place it in the ZMS Server classpath
- Edit the zms.properties file:
# Specifies the factory class that implements the Metrics interface
# used by the ZMS Server to report stats
athenz.zms.metric_factory_class=com.yahoo.athenz.common.metrics.impl.prometheus.PrometheusMetricFactory
Enable ZTS Event Monitoring in Prometheus¶
Enable ZTS Event Monitoring in Prometheus for ZTS server by performing the following steps:
- Build the
athenz_metrics_prometheus
Java project located incontributions/metric/prometheus
- Place it in the ZTS Server classpath
- Edit the zts.properties file:
# Specifies the factory class that implements the Metrics interface
# used by the ZTS Server to report stats
athenz.zts.metric_factory_class=com.yahoo.athenz.common.metrics.impl.prometheus.PrometheusMetricFactory
Enable Email Notifications Monitoring¶
You may also choose to enable Email Notifications and record the notifications sent in an Event Monitoring Service. The Event Monitoring Service may be the same one used to record other Athenz Events or can be a dedicated service that captures Notification Events only.
To enable Notification Events for Prometheus, perform the following steps:
- Enable Email Notifications by following the steps in Email Notifications
-
Edit the
athenz.zms.notification_service_factory_class
property to also include theMetricNotificationServiceFactory
class. For example, if the NotificationServiceFactory used iscom.yahoo.athenz.common.server.notification.impl.NotificationServiceFactoryImpl
(the default AWS Email Notification Service Factory), then the property should be:athenz.zms.notification_service_factory_class=com.yahoo.athenz.common.server.notification.impl.NotificationServiceFactoryImpl, com.yahoo.athenz.common.server.notification.impl.MetricNotificationServiceFactory
-
Build the
athenz_metrics_prometheus
Java project located incontributions/metric/prometheus
- Place it in the ZMS / ZTS Server classpath
- Edit the zts.properties file for ZTS and zms.properties file to ZMS:
# Specifies the factory class that implements the Metrics interface
# used to record Notification Events
athenz.notification.metric_factory_class=com.yahoo.athenz.common.metrics.impl.prometheus.PrometheusMetricFactory
Enable Event Monitoring using other Event Monitoring Services¶
To use Monitoring Services other than Prometheus, create a Jar file on the Athenz classpath with implementations for the following Interface:
com.yahoo.athenz.common.metrics.MetricFactory - A factory that creates a Notification Service based on a Notifications Provider.