mxinden / modbus_exporter

Exporter which retrieves stats from a modbus system and exports them via HTTP for Prometheus consumption.
GNU General Public License v3.0
1 stars 0 forks source link

config&modbus: Specify modbus function by number not string #22

Closed mxinden closed 5 years ago

mxinden commented 5 years ago

Instead of specifying modbus functions by string e.g. "read holding registers" or "analog output", have the metric address prefixed by the function id e.g."3".

'1xxxx' for read coil / digital output, '2xxxx' for read discrete inputs / digital input, '3xxxx' read holding registers / analog output, '4xxxx' read input registers / analog input.

RichiH commented 5 years ago

Lgtm

Sent by mobile; please excuse my brevity.

On Thu, Jun 27, 2019, 17:34 Max Inden notifications@github.com wrote:

Instead of specifying modbus functions by string e.g. "read holding registers" or "analog output", have the metric address prefixed by the function id e.g."3".

'1xxxx' for read coil / digital output, '2xxxx' for read discrete inputs / digital input, '3xxxx' read holding registers / analog output, '4xxxx' read input registers / analog input.

You can view, comment on, or merge this pull request online at:

https://github.com/mxinden/modbus_exporter/pull/22 Commit Summary

  • config&modbus: Specify modbus function by number not string

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mxinden/modbus_exporter/pull/22?email_source=notifications&email_token=AAFYIIZUYLF6JBRHCXKDA4LP4TMXJA5CNFSM4H35IM52YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G4DO3MQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFYII3EQVMSJZCVVM7T6CTP4TMXJANCNFSM4H35IM5Q .