Install & Enable the Addon & Drivers
First, you’ll need to install the ARDI addon for Prometheus.
After that, you’ll need to set up the system and your driver.
Install the Addon
- Login as an Administrator
- Go to Administration | Extension Manager
- Install theĀ Prometheus addon
Enable the Addon
- Go to Administration | Addons
- Check the Prometheus checkbox and hit Save
Enable the Driver
- Go to Administration | Drivers
- Press Add New Driver
- Under Historical Drivers choose Prometheus Database.
- Leaving everything else empty, press Add New Driver
Setup the Addon
- In ARDI, go to Administration | Prometheus Settings
- Choose which data sources you want to record in Prometheus.
- Press Save Settings
Install & Run Prometheus
Windows
Download Prometheus from https://prometheus.io/download/ and double-click the installer.
When the installer is finished, you should be able to find the Prometheus program in your installation directory – ie C:\Program Files\Prometheus. Double click on prometheus.exe to start the server.
Linux/Ubuntu
On Linux, you have to manually configure the Prometheus package (at the time of writing, there is no pre-made package available for Ubuntu, our preferred distribution of Linux).
You can find a useful guide on the installation process here.
Configure Prometheus
ARDI offers two different targets for Prometheus to query for data.
Open the prometheus.yml file (located in the same folder as the executable on Windows platforms) with a text editor to add these to your configuration.
Under scrape_configs:, you’ll find a collection of jobs. Leave the existing jobs where they are and add the following…
- job_name: "ardi_core"
metrics_path: "/prometheus/metrics"
scrape_interval: 60s
scrape_timeout: 45s
static_configs:
- targets: ["ardiserver:80"]
- job_name: "ardi_recording"
metrics_path: "/prometheus/live"
scrape_interval: 5s
static_configs:
- targets: ["ardiserver:80"]
Note that in the above example, you would replace ardiserver with the name of your ARDI server (ie. localhost if you’re running Prometheus and ARDI on the same system), and /prometheus/ with the path to your specific ARDI site (ie. if you have multiple sub-sites and one is called ‘area4’, your path would be “/s/area4/prometheus/live“)
You can also adjust the sample timing by modifying the scrape_interval of the ‘ardi_recording’ job. Changing the 5s to 2s will give you 2-second sampling time instead of 5s.
Once you’ve restarted the Prometheus server, you should now be recording live data from ARDI.
ARDI data should now be recorded into Prometheus – you can double-check in the Prometheus web interface to confirm.
The only remaining step is to bring this recorded data back into ARDI, so you can use it for reports, playback and other analytics.
Setup History in ARDI
Add the Data Source to ARDI
- Add a new asset to represent your Prometheus Server.
- In the details for the asset, choose Data Sources
- In Actual – Historical, choose the Prometheus driver you set up earlier.
- Enter the details of your Prometheus server. The default port number is 9090, which should be included in the host line.
- To ensure your data doesn’t have visible ‘steps’ between samples, we suggest setting the Min Sample Time to the same sample rate as your Prometheus target.
Connect the Data Source
- Go back to Administration | Prometheus Settings
- Click Map History
All Done
And that’s everything done – you should now have data being recorded from ARDI to Prometheus.
If you add new properties or assets in the future, they’ll automatically start recording to Prometheus if they are eligible – you don’t have to do anything to start recording new information.
The only maintenance you need to do is pressing Map History in Administration | Prometheus Settings, to refresh ARDIs configuration so that it can access those new channels of history.