telegraf-exec-nut

command module
v0.0.0-...-5aa6b49 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 7 Imported by: 0

README

telegraf-exec-nut

This is a simple tool to extract Network UPS Tools (NUT) output and output Influx line protocol; it is designed to be used with a telegraf exec plugin.

This parses the output of the NUT TCP daemon and has been developed against Ubuntu 21.10.

Interactive Run Example

The compiled tool can be run interactively.

./telegraf-exec-nut -help

Usage of telegraf-exec-nut:
  -host string
        NUT host (default "localhost")
  -password string
        NUT password
  -port int
        NUT port (default 3493)
  -username string
        NUT username

Telegraf Run Example

This is a sample telegraf exec input that assumes the binary has been installed to /usr/local/bin/telegraf-exec-nut:

[[inputs.exec]]                                                                 
  commands = ["/usr/local/bin/telegraf-exec-nut -username upsmon -password hunter2"]
  timeout = "5s"                                                                
  data_format = "influx"      

Then in InfluxDB, the nut measurement will have these tags:

battery.type
device.mfr
device.model
device.serial
device.type

And these fields:

battery.charge
battery.charge.low
battery.runtime
input.frequency
input.transfer.high
input.transfer.low
input.voltage
output.frequency
output.frequency.nominal
output.voltage
output.voltage.nominal
ups.beeper.status
ups.delay.shutdown
ups.delay.start
ups.firmware
ups.load
ups.power
ups.power.nominal
ups.realpower
ups.status
ups.timer.shutdown
ups.timer.start

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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