Package: rlm-prometheus
📊 RLM-Prometheus 📊Prometheusexporter providing metrics from a Reprise License Manager (RLM)
instance.Currently tested onDebian Linuxonly, but as it is based on pureCPythonit should potentially also work on Windows - YMMV.⚙🔧 Installation ⚙🔧Example installation on Debian / Ubuntu:# required for creating Python virtualenvs:aptupdate
aptinstall-ypython3-venv# create a virtualenv in /opt:python3-mvenv/opt/rlm-prometheus# update 'pip' and install the 'rlm-prometheus' package:/opt/rlm-prometheus/bin/pipinstall--upgradepip
/opt/rlm-prometheus/bin/pipinstallrlm-prometheus🏃 Running in foreground mode 🏃This is mostly relevant for testing configuration settings and checking if the
exporter works as expected - to do this either activate the previously created
Python environment or call therlm_exporterscript using the full path to that
environment.For convenience it is reasonable to use a configuration file in such a situation
instead of setting all the environment variables manually. Simply copy theconfig-example.yamlfile to e.g.config.yamland adjust the settings
there. Then run the exporter like this:rlm_exporter-vvv--configconfig.yamlThe exporter running in foreground can be terminated as usual viaCtrl+C.👟 Running as a service 👟adduser--systemrlmexporter
cp-v/opt/rlm-prometheus/lib/python*/site-packages/resources/systemd/rlm-prometheus.service/etc/systemd/system/
systemctldaemon-reload
systemctleditrlm-prometheus.serviceThe last command will open an editor with the override configuration of the
service's unit file. Add a section like thisat the topof the override
file, with the bare minimum of settingRLM_ISVand most likely alsoRLM_URI.
For other options available check for the commented-out lines further down in
the unit file setting environment variables starting withRLM_. Please note
that onUbuntu 20.04thesystemct editcommand will present you with an
empty file, so you will have to copy the respective lines from below or the
providedcentralunit file.[Service]
### specific configuration for the RLM exporter service:
Environment=RLM_ISV=example_isv
Environment=RLM_URI=http://license-server.example.xy:5054Finally enable the service and start it right away. The second line will show
the log messages on the console untilCtrl+Cis pressed. This way you should
be able to tell if the service has started up properly and is providing metrics
on the configured port:systemctlenable--nowrlm-prometheus.service
journalctl--follow--unitrlm-prometheus🔥🧱 Firewall settings for RLM on Windows 🔥🧱For the metrics collection it is obviously necessary the exporter can gather
data from your RLM instance. The standard approach is to send requests to RLM's
built-in web server. By default access to it is blocked and those restrictions
should not be lifted more than necessary.There is an example snippet inOpen-RlmFirewallPort.ps1that demonstrates
how to adjust the Windows firewall so the collector's host IP address is allowed
to connect to RLM.👾 CAUTION: memory leak in RLM 👾Repeatedly requesting data (e.g. every 5 minutes) from RLM's built-in web server
has shown to increase its memory consumption in a linear fashion over time on
our side. This indicates a memory leak in RLM, which eventually made the license
service fail silently.To avoid (or rather work around) this, we did set up a scheduled task on the
server hosting the RLM service that is restarting the service once a night while
also rotating its corresponding log files at the same time.Example code on how to achieve this via PowerShell is provided inRestart-RlmService.ps1.🆙 Upgrading 🆙Assuming the exporter has been installed as described above, an upgrade to a
newer version could be done like this:/opt/rlm-prometheus/bin/pipinstall--upgraderlm-prometheus# check the changelog for potentially new configuration settings, integrate them# by calling `systemctl edit rlm-prometheus.service` if necessary and finally# restart the service:systemctlrestartrlm-prometheus.service