Share on:

OpenAM Monitoring Using Prometheus

Original article


OpenAM can expose SNMP metrics. To expose these metrics to Prometheus we will use snmp_exporter tool, provided by the Prometheus community.

To follow the current manual Docker and Docker Compose should be installed

Configuration files located in this project

Just clone it and run with docker-compose:

git clone
cd ./openam-prometheus
docker-compose up

Setup OpenAM and SNMP Monitoring

Open OpenAM URL and create a basic configuration (see OpenAM Quick Start Gude){:target=”_blank”})

Enable SNMP in OpenAM. Login into OpenAM console, goto Configure -> Global Services -> Monitoring

OpenAM monitoring

Enable checkboxes Monitoring Status and Monitoring SNMP interface status

Restart OpenAM instance

Setup SNMP Exporter

Open SNMP exporter URL


SNMP exporter!

Fill the fields: Target: OpenAM hostname and port, for example openam:8085 Module: SNMP exporter module, for example openam

Press the Submit, then you should see something like this:

# HELP authenticationFailureCount Count of unsuccessful authentications -
# TYPE authenticationFailureCount counter
authenticationFailureCount 0
# HELP authenticationFailureRate Current Auth failure rate / second based on a fixed preconfigured window. -
# TYPE authenticationFailureRate gauge
authenticationFailureRate 0
# HELP authenticationSuccessCount Count of successful authentications -
# TYPE authenticationSuccessCount counter
authenticationSuccessCount 0
# HELP authenticationSuccessRate Current Auth success rate / second based on a fixed preconfigured window. -
# TYPE authenticationSuccessRate gauge
authenticationSuccessRate 0
# HELP averageDuration Average duration of tokens of the specified type in OpenAM in seconds -
# TYPE averageDuration counter
averageDuration{tokenTableIndex="1"} 1532
averageDuration{tokenTableIndex="10"} 0
averageDuration{tokenTableIndex="11"} 0
averageDuration{tokenTableIndex="12"} 0
averageDuration{tokenTableIndex="13"} 0
averageDuration{tokenTableIndex="14"} 0
averageDuration{tokenTableIndex="15"} 0
averageDuration{tokenTableIndex="16"} 340

Setup Prometheus

If you have an existing prometheus instance add to prometheus.yml job openam with a target to SNMP exporter host and port:

  - job_name: "openam"
      target: ["openam:8085"]
      module: ["openam"]
    metrics_path: /snmp
      - targets: ["snmp-exporter:9116"]

Run Prometheus and check targets:

http://localhost:9090/targets You should see something like this:

Prometheus target

Then go to Graph and you will be able to add OpenAM metrics to monitor.


Prometheus graph

If you have any additional questions, feel free to ask us!