Legamaster ETX as PJLink Exporter for Prometheus.
This exporter uses the RS-232 specifications according to Legamaster ETX usermanual.
For compatibility reason, it respond with the same values as the pjlink_exporter.
Legamaster ETX does not support status-querys and control via network yet. So you require a RS-232 to ethernet TCP-server. Default telnet-listening port is 4001.
./legaetx_exporterVisit http://localhost:2115/pjlink?target=terminalserver.localnetwork where mybeamername.localnetwork is the IP or DNS-Name of the your Display to get metrics from.
Clone this repository from github to your go directory. Within this repository run:
make build
Copy build to your /usr/local/bin
cp legatex_exporter /usr/local/bin
Change permissions
chown prometheus:prometheus /usr/local/bin/legaetx_exporter
Setup exporter as daemon
cp init.d.legaetx_exporter /etc/init.d/legaetx_exporter
chmod +x /etc/init.d/legaetx_exporter
update-rc.d legaetx_exporter defaults
vim /etc/default/legaetx_exporter
START=yes
The pjlink exporter needs to be passed the address as a parameter, this can be done with relabelling.
Example config:
scrape_configs:
- job_name: 'legaetx'
static_configs:
- targets:
- my-fancy-display1.localnetwork # Legamaster ETX device.
metrics_path: /pjlink
params:
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:2115 # The Legamaster ETX exporter's real hostname:port.Thanks to https://github.com/prometheus/snmp_exporter. This project was used as example and for inspriration while realizing this exporter.