The boards are slightly different than what we used to do with ES reporter, as we count now on Prometheus to scrap metrics from the /metrics endpoint exposed from James.
This is just a rough conversion for starters, it will likely need more refining over time.
This is a collection of Grafana dashboards to display James metrics.
To enable James metrics, add extensions.routes to webadmin.properties file:
extensions.routes=org.apache.james.webadmin.dropwizard.MetricsRoutes
You need to set up Prometheus first to scrape James metrics.
Add Apache James WebAdmin Url or IP address to prometheus.yaml configuration file.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'WebAdmin url Example'
scrape_interval: 5s
metrics_path: /metrics
static_configs:
- targets: ['james-webamin-url']
- job_name: 'WebAdmin IP Example'
scrape_interval: 5s
metrics_path: /metrics
static_configs:
- targets: ['192.168.100.10:8000']
For Kubernetes deployment, we recommend using Prometheus ServiceMonitor to collect James metrics through James Webadmin service. Please see our James Helm-chart for more information.
Add Prometheus data source to Grafana.
You can do this either from Grafana UI or from a configuration file.
The following docker-compose.yaml will help you install a simple Prometheus/ Grafana stack :
version: '3'
#Metric monitoring
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
prometheus:
image: prom/prometheus:latest
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./conf/prometheus.yml:/etc/prometheus/prometheus.yml
All dasboards can be found HERE. Import the different JSON files in this directory to Grafana via UI.