{"id":19541861,"url":"https://github.com/imcf/rlm-prometheus","last_synced_at":"2025-04-26T17:31:01.100Z","repository":{"id":64257450,"uuid":"567883141","full_name":"imcf/rlm-prometheus","owner":"imcf","description":"Prometheus exporter providing metrics from a Reprise License Manager (RLM) instance.","archived":false,"fork":false,"pushed_at":"2024-09-20T20:06:00.000Z","size":134,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-02T21:47:41.125Z","etag":null,"topics":["imaris","license-metrics","prometheus","python","reprise","rlm"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/rlm-prometheus/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imcf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-18T20:13:50.000Z","updated_at":"2025-02-25T22:54:28.000Z","dependencies_parsed_at":"2023-01-15T07:00:46.171Z","dependency_job_id":null,"html_url":"https://github.com/imcf/rlm-prometheus","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcf%2Frlm-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcf%2Frlm-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcf%2Frlm-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcf%2Frlm-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imcf","download_url":"https://codeload.github.com/imcf/rlm-prometheus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251025652,"owners_count":21524839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["imaris","license-metrics","prometheus","python","reprise","rlm"],"created_at":"2024-11-11T03:12:12.448Z","updated_at":"2025-04-26T17:31:00.843Z","avatar_url":"https://github.com/imcf.png","language":"HTML","readme":"# 📊 RLM-Prometheus 📊\n\n[Prometheus][1] exporter providing metrics from a Reprise License Manager (RLM)\ninstance.\n\nCurrently tested on [Debian Linux][4] only, but as it is based on pure\n[CPython][5] it should potentially also work on Windows - YMMV.\n\n## ⚙🔧 Installation ⚙🔧\n\nExample installation on Debian / Ubuntu:\n\n```bash\n# required for creating Python virtualenvs:\napt update\napt install -y python3-venv\n\n# create a virtualenv in /opt:\npython3 -m venv /opt/rlm-prometheus\n\n# update 'pip' and install the 'rlm-prometheus' package:\n/opt/rlm-prometheus/bin/pip install --upgrade pip\n/opt/rlm-prometheus/bin/pip install rlm-prometheus\n```\n\n## 🏃 Running in foreground mode 🏃\n\nThis is mostly relevant for testing configuration settings and checking if the\nexporter works as expected - to do this either activate the previously created\nPython environment or call the `rlm_exporter` script using the full path to that\nenvironment.\n\nFor convenience it is reasonable to use a configuration file in such a situation\ninstead of setting all the environment variables manually. Simply copy the\n[config-example.yaml][3] file to e.g. `config.yaml` and adjust the settings\nthere. Then run the exporter like this:\n\n```bash\nrlm_exporter -vvv --config config.yaml\n```\n\nThe exporter running in foreground can be terminated as usual via `Ctrl+C`.\n\n## 👟 Running as a service 👟\n\n```bash\nadduser --system rlmexporter\ncp -v /opt/rlm-prometheus/lib/python*/site-packages/resources/systemd/rlm-prometheus.service  /etc/systemd/system/\nsystemctl daemon-reload\nsystemctl edit rlm-prometheus.service\n```\n\nThe last command will open an editor with the override configuration of the\nservice's unit file. Add a section like this **at the top** of the override\nfile, with the bare minimum of setting `RLM_ISV` and most likely also `RLM_URI`.\nFor other options available check for the commented-out lines further down in\nthe unit file setting environment variables starting with `RLM_`. Please note\nthat on *Ubuntu 20.04* the `systemct edit` command will present you with an\nempty file, so you will have to copy the respective lines from below or the\nprovided *central* unit file.\n\n```text\n[Service]\n### specific configuration for the RLM exporter service:\nEnvironment=RLM_ISV=example_isv\nEnvironment=RLM_URI=http://license-server.example.xy:5054\n```\n\nFinally enable the service and start it right away. The second line will show\nthe log messages on the console until `Ctrl+C` is pressed. This way you should\nbe able to tell if the service has started up properly and is providing metrics\non the configured port:\n\n```bash\nsystemctl enable --now rlm-prometheus.service\njournalctl --follow --unit rlm-prometheus\n```\n\nOpen ports for the `rlm-prometheus` exporter:\n\n```bash\nSOURCE=\"any\"  # \u003c-- put an IP address here to restrict access more\nufw allow from $SOURCE to any port 8909\n```\n\n## 🔥🧱 Firewall settings for RLM on Windows 🔥🧱\n\nFor the metrics collection it is obviously necessary the exporter can gather\ndata from your RLM instance. The standard approach is to send requests to RLM's\nbuilt-in web server. By default access to it is blocked and those restrictions\nshould not be lifted more than necessary.\n\nThere is an example snippet in [Open-RlmFirewallPort.ps1][2] that demonstrates\nhow to adjust the Windows firewall so the collector's host IP address is allowed\nto connect to RLM.\n\n## 👾 CAUTION: memory leak in RLM 👾\n\nRepeatedly requesting data (e.g. every 5 minutes) from RLM's built-in web server\nhas shown to increase its memory consumption in a linear fashion over time on\nour side. This indicates a memory leak in RLM, which eventually made the license\nservice fail silently.\n\nTo avoid (or rather work around) this, we did set up a scheduled task on the\nserver hosting the RLM service that is restarting the service once a night while\nalso rotating its corresponding log files at the same time.\n\nExample code on how to achieve this via PowerShell is provided in\n[Restart-RlmService.ps1][6].\n\n## 🆙 Upgrading 🆙\n\nAssuming the exporter has been installed as described above, an upgrade to a\nnewer version could be done like this:\n\n```bash\n/opt/rlm-prometheus/bin/pip install --upgrade rlm-prometheus\n# check the changelog for potentially new configuration settings, integrate them\n# by calling `systemctl edit rlm-prometheus.service` if necessary and finally\n# restart the service:\nsystemctl restart rlm-prometheus.service\n```\n\n[1]: https://prometheus.io/\n[2]: resources/powershell/Open-RlmFirewallPort.ps1\n[3]: resources/config-example.yaml\n[4]: https://debian.org/\n[5]: https://github.com/python/cpython\n[6]: resources/powershell/Restart-RlmService.ps1\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcf%2Frlm-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimcf%2Frlm-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcf%2Frlm-prometheus/lists"}