pulsar-telegraf-plugin

module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2022 License: MIT

README

Telegraf input plugin for Pulsar-M pulse registrators.

Coverage Status lint and test Go Report Card

This is a Pulsar-M pulse registrator input plugin for Telegraf, meant to be compiled separately and used externally with telegraf's execd input plugin.

It reads channel current values and health status from the registrator using Pulsar-M protocol wrapper via tcp.

Install Instructions

Download release for your target architectrue.

Extract archieve and edit plugin.conf file.

You should be able to call this from telegraf now using execd:

[[inputs.execd]]
  command = ["/path/to/pulsar", "-config", "plugin.conf", "-poll_interval", "1m"]
  signal = "none"

# sample output: write metrics to stdout
[[outputs.file]]
  files = ["stdout"]

Build from sources

Download the repo somewhere

$ git clone https://github.com/srgsf/pulsar-telegraf-plugin.git

Build the binary for your platform using make

$ make build

The binary will be avalilable at ./dist/pulsar

Plugin configuration example

## Gather data from Pulsar-M pulse registrator ##
[[inputs.pulsar]]
    ## tcp socket address for rs485 to ethernet converter.
    socket ="localhost:4001"
    ## device address.
    address = "00112233"
    ## Status request interval - don't request if ommited or 0
    status_interval = "1d"
    ## Timezone of device system time.
    systime_tz = "Europe/Moscow"
    ## should protocol be logged as debug output.
    # log_protocol = true
    ## log level. Possible values are error,warning,info,debug
    #log_level = "info"
    ## query only the following channels starts with 1 for summary.
    channels_include = [1,2]
    ## value prefix for a channel
    chanel_prefix = "chan_"

Directories

Path Synopsis
plugins

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL