Hello IRIS Fans and Welcome to IRIS iRacing!
Here were going to take 3 laps of your time and demonstrate how I wired up my Racing SIM to IRIS for "As Real Time as It Gets" Metrics reporting. I missed the window for the contest, which happens quite often, but I still ended up 3rd I think in the demo race in the video below.
Technical Salad
Below are the technical ingredients for this demonstration for a salad you can post on Instragram.
- Python iRacing SDK ( https://github.com/kutu/
pyirsdk/tree/master ) - InterSystems IRIS Community / Python Interop
- Prometheus
- Grafana
- Custom Metric Class
Dont forget to do a:
set tSC = ##class(SYS.Monitor.SAM.Config).AddApplicationClass("User.iRacing", "USER")
Then you should see your new metrics on the /api/monitor/metrics endpoint.
Notable here is my python setup on Windows:
iris_site.py
[config]
LibPath=
MaxServerConn=1
MaxServers=2
Path=
PythonPath=c:\Python\Python313\python.exe
PythonRuntimeLibrary=C:\Python\Python313\python313.dll
PythonRuntimeLibraryVersion=3.13
UUIDv1RandomMac=0
bbsiz=-1
console=,
cpf
def set_site_path(platform_name):
sys.path = sys.path + __sitegetsitepackages(['C:\\Python\Python313'])
sys.path = sys.path + ["C:\\Python\Python313\\Lib"]
Racing SIM
Below is the SIM specifications, complete with Driver.
- Haptics Buttkicker ( https://thebuttkicker.com/
products/buttkicker-gamer-plus ) - Wheel Fanatec ( https://www.fanatec.com/us/en/
p/sim-racing-bundles/r2r_csl_ )dd_qr2_wrc_5nm_us/csl-dd-qr2- ready2race-wrc-bundle-5nm-us - NVIDIA 4080 ( https://www.nvidia.com/en-us/
geforce/graphics-cards/40- )series/rtx-4080-family/ - Rig Dardo ( https://www.amazon.com/dp/
B0DMNGF8X9?ref_=ppx_hzsearch_ )conn_dt_b_fed_asin_title_1 - Triples ( https://www.amazon.com/dp/
B0B398KZWJ?ref_=ppx_hzsearch_ )conn_dt_b_fed_asin_title_2&th= 1 - Driver @Ron.Sweeney, 1st year competing, ARCA series, drives a number 64 Ford ( https://s100.iracing.com/wp-
content/uploads/2025/03/ARCA_ ), mostly ovals.25_Manual_V1.pdf
Gluing it all together, we have a rolling SIM emitting, scraping and serving up iRacing metrics suitable for real time display.
As Real Time as It Gets
The excuse I made for myself to derive some real value of sorts out of this was I have always wanted to be as agressive as possible with data reporting from the source to the exporter, clear through the Prometheus Scrape and the eventual dashboard. The python sdk is wicked fast, as it reads from a memory mapped file while in session, and the other components can be configured to be agressive, but just are not by default and took some edits and daemon reloads.
In order to make this work, I found the following tweaks for necessary:
grafani.ini
min_refresh_interval = 1s
prometheus.yml
1s scrape
- job_name: 'iracing' # Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 1s
scrape_timeout: 1s # metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['192.168.1.193:52773']
metrics_path: '/api/monitor/metrics'
Dashboard
Newly added refresh rate can be added, and "Refresh Live Dashboards" should be enabled.
At rest it doesnt look like much, as its designed to be real time, but a screenshot is in order to see the 5 panels.
Demo
The video shows us putting the Dashboard and scraping to work in a quick 3 lap shootout at Darlington Motor Speedway.
🏆 This is considered an InterSystems Best Practice