Getting Started with AM 5.5 Graphite Monitoring Reporter

Explore ForgeRock Access Manager 5.5 metrics using the demo Grafana dashboards...

Setup Graphite and Grafana

If you're not already using Graphite and Grafana, the best way to get started is using a Docker image.

Configure AM to report metrics to Graphite


  • Login to the admin console as amadmin
  • In the admin console, select Configure > Global Services > Monitoring
  • Ensure Monitoring Status is enabled
  • Select the Secondary Configurations tab
  • Select Add Secondary Configuration
  • Give the configuration a name (e.g. Graphite)
  • Enter the hostname (e.g. if running locally in Vagrant or Docker, enter localhost)
  • Select Create
Graphite stores metrics in a time-series database and can be configured to store at varying resolutions. For best results, set the Frequency at which AM sends metrics to Graphite to match Graphite's storage resolution - If AM sends metrics less frequently, there will be holes in the time-series database and you won't see anything plotted in Grafana; if AM sends metrics more frequently than Graphite is configured to store them, then by default Graphite will store an average of all the values it receives for a given time period (which may lead to confusion). [1] [2] [3]

Configure Grafana

  • Login to Grafana (the default username and password are both admin)
  • Open the main menu by selecting the Grafana icon (top-left)
  • Select Dashboards > Import
  • Select Upload .json File
  • Select one of the files included in the demo-dashboard project
  • Select Load
In the next post, we'll pick apart the authentication dashboard shown above...

FAQ

I've configured AM but I don't see any metrics in Grafana

  • AM sends metrics to Graphite using the Pickle protocol.  Double check that the port on which Graphite accepts metrics using the Pickle protocol (port 2004 by default) is accessible to AM.
  • Ensure that the frequency at which AM sends metrics to Graphite matches the resolution at which metrics are saved to the whisper time-series database by Graphite.

I'd like to send metrics from multiple instances of AM running on the same host

  • In order to distinguish metrics reported to Graphite by different instances of AM, metrics are automatically given a prefix based on their hostname. Therefore, if you have multiple instances of AM running on the same host, they'll receive the same prefix and Graphite will overwrite the metric values provided by each instance. To avoid this, you can manually set the metric prefix using the advanced system property monitoring.reporters.graphite.metric.prefix
    or the environment variable:
    MONITORING_REPORTERS_GRAPHITE_METRIC_PREFIX

The recommended Docker container fails to start Graphite

  • If the dokkupaas Docker container fails to start, it may be that you need to manually create the /opt/graphite/storage/log/graphite/webapp directory. I'm using this bash script to start my container.

References

Comments

Popular Posts