Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Micro Focus Expert
Micro Focus Expert

Monitoring Mobile Center with Prometheus and Grafana


Mobile Center have build-in integration with Prometheus for monitoring purposes.

The following guide will help you to configure Prometheus to scrape metrics that MC is exposing.

Mobile Connectors can report metrics to the MC Server and Prometheus can be configured to scrape those metrics.

  1. Enable Mobile Connectors to report metrics to Prometheus: edit configuraiton file metrics-config.properties (located at /connector/conf folder) and modify the following line: 

    METRICS_PROMETHEUS_ENABLE=true. Restart the connector service.

  2. Enable Mobile Center Server to expose metrics to Prometheus: edit setEnv.sh configuration file for linux user (located at /home/<user> directory): 

    export METRICS_PROMETHEUS_ENABLE=true. Restart the MC service.

  3. Install Prometheus - there are plenty of guidelines how to do it. See example https://www.enigma14.eu/martin/blog/2017/09/20/prometheus-installation-on-centos-7. It is possible to install Prometheus on the same machine as Mobile Center
  4. Modify Prometheus configuration file (prometheus.yml) to scrape metrics from MC. Add the follwing section: 

    - job_name:       'mc_console'

    scrape_interval: 5s

    metrics_path: /rest/prometheus


          - targets: ['<MC SERVER HOST>:<MC SERVER PORT>']

  5. Restart Prometheus
  6. Verify that scrape working: navigate to http://<PROMETHEUS HOST>:9090 and verify metric of "scrape_samples_scraped" - you should receive the data about job mc_console
  7. Install Grafana as visualization layer and configure it to work with Prometheus (see https://logz.io/blog/prometheus-monitoring/)

Few screenshots are attached for your convinience.

The following metrics are available (example):

  1. mc_connector: device connectivity gauge (1 - connected, 0 - disconnected)
  2. mc_connector: device wifi connectivity gauge
  3. mc_connector: vnc_enabled (actively open remote view on the device)
  4. mc_console: login_succeded (login to the tool)
  5. mc_console: reservation_succeded (create reservation for the device)   

Please free to share your ideas about what metrics should be exposed there!

Also, there is additional metrics reporting mechanizm using CSV files and statsD daemon (but I'll keep it for a different post).


Tags (1)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.