Monitoring Installation & Setup

Monitoring requires two additional open-source software packages to be installed and configured.

  1. Prometheus
    1. Provides the metrics gathering from IMan and a time-series database of metrics.
  2. Grafana
    1. Provides the graphical front-end/metrics visualisation.

This guide describes the installation, setup & configuration required on a windows server.

These steps assume you are installing Prometheus & Grafana on the same server as IMan.

Prometheus Installation & Configuration

  1. Download Prometheus from their site.
  2. Prometheus for windows does not have an installation. So simply unblock, unzip the folder to a desirable location.
  3. Open prometheus.yml file in route of the unzipped folder in a text editor.
  4. Add the following at the very end of the file (within the scrape_configs) group.

  - job_name: "webapi"
    static_configs:
      - targets: ["localhost"]
    metrics_path: /IManWebAPI/metrics

Running Promethus (as a Service)

Prometheus must be running for monitoring/Grafana to update/report.

To run Prometheus,run Prometheus.exe found in the root folder.

If you are running IMan in a production scenario we recommend using a program such as Always Up to run Prometheus as a windows service.

Grafana Installation & Configuration

Grafana

  1. Download & Install Grafana following the instructions from the linked page.

Configuring DataSources

It is necessary to configure two datasources: Prometheus & a SQL Server connection to the IMan database.

Prometheus

  1. Open a browser (http://localhost:3000) and login to Grafana (User: admin, Password: admin).
  2. Go to the Datasources menu.
  3. Add a Prometheus Datasource.
  4. The key configuration is the URL. If Grafana is being installed on the same server as Prometheus with the default settings will be sufficient.
  5. Press Save & Test.

IMAN SQL SERVER DATASOURCE

To provide the list of endpoints, the Grafana dashboard requires a connection to the IMan database.

  1. Add a SQL Datasource (SQL Datasources are 2/3rds the way down the page).
  2. Set the host, database and authentication details.
  3. Save and test.

Importing IMan Dashboard

We have a preconfigured dashboard.

  1. From the left hand menu, select the Add option and then Import.
  2. Press the Upload JSON File and browse the dashboard file (C:\IMan\config\Realisable-WebAPI-Dashboard.json).
  3. Select the SQL server datasource created in the step above.
  4. Press Import. If successful you will be shown the Dashboard.