Coder Social home page Coder Social logo

influx_nut's Introduction

influx_nut

An interface between Network UPS Tools and influxdb.

This allows sending metrics from NUT to an influxdb database.

Getting started

# cd /path/to/git/clone
# pip3 install .
# cp config.example.json /etc/influx_nut.json  # edit to set up for your needs
$ influx_nut --config /etc/influx_nut.json

Example configuration

UPS load and voltage reporting

{
  "nut_host": "nutcase",
  "nut_ups": "cp1500avr",
  "nut_vars": {
    "ups.load": {"type": "int", "measurement_name": "ups_load"},
    "input.voltage": {"type": "float", "measurement_name": "ups_voltage"}
  },
  "influx_host": "http://influxbox:8086",
  "influx_creds": ["user", "lamepassword"],
  "influx_db": "systems",
  "influx_tags": {
    "ups": "cp1500avr"
  }
}

Config documentation

interval

How frequently is the data sent to Influx in seconds? Default: 20.

nut_host

Hostname NUT is accessible at. Default: "127.0.0.1".

nut_port

Port number to use to connect to the NUT server. Default: 3493.

nut_ups

UPS name on that NUT server. Default: "ups1".

nut_vars

Variables to send from NUT to influxdb. Example:

"nut_vars": {
  "ups.realpower.nominal": {
     "type": "int",
     "measurement_name": "ups1_power"
  }
}

Valid types are "float", "int", "bool", and "str".

influx_host

URL of influxdb server to send data to, without a trailing slash. Default: "http://127.0.0.1:8086".

influx_db

Database on the influxdb server to put data in. Default: "systems".

influx_tags

Tags (in mapping form) to send to the influxdb server. These are static for all measurements sent from influx_nut. Example:

{"tag1": "value1", "tag2": "value2"}

influx_creds

Credentials to use to connect to the influxdb server. Example: ["user", "sekrit"]. Default is null (no authentication).

influx_nut's People

Contributors

lf- avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.