Selenoid metrics Prometheus exporter
Selenoid project: https://aerokube.com/selenoid/ You can export available, used, queued and pending browsers to Prometheus.
To start your own selenoid instance with exporter use docker-compose
docker-compose up -d
Check metrics
curl http://localhost:8800
Response should be like this
...
# HELP selenoid_total Total
# TYPE selenoid_total gauge
selenoid_total 40.0
# HELP selenoid_used Used
# TYPE selenoid_used gauge
selenoid_used 24.0
# HELP selenoid_queued Queued
# TYPE selenoid_queued gauge
selenoid_queued 0.0
# HELP selenoid_pending Pending
# TYPE selenoid_pending gauge
selenoid_pending 0.0
Compare with json format from selenoid /status
curl http://localhost:4444/status
Response
{
"total": 40,
"used": 24,
"queued": 0,
"pending": 0,
"browsers": {
...
}
}
Set host and port in run.py file
# Host and port of your selenoid instance
# Metrics should be available here http://selenoid.local:4444/status
SELENOID_HOST = 'selenoid.local'
SELENOID_PORT = 4444
Start run.py file
python run.py