Giter VIP home page Giter VIP logo

telegraf-execd-openvpn's Introduction

OpenVPN Plugin for Telegraf execd input

This repository contains an template project for building a Telegraf plugin as a standalone binary that can be ran using the execd input plugin.

Following this method you can generate binary packages for plugins currently written as a Telegraf built-in input plugin without modifying the plugin. This allows you to have an open PR against the Telegraf repository and in the meantime produce binaries that will work with execd.

The code for the plugin is contained in another repository and referenced in the go.mod file.

If you are interested in using this plugin to monitor OpenVPN, the state of the plugin is pre-alpha and is not recommended for production use.

Usage

  • Download the latest release package for your platform.

  • Unpack the build to your system:

    mkdir /var/lib/telegraf
    chown telegraf:telegraf /var/lib/telegraf
    tar xf openvpn-linux-amd64.tar.gz -C /var/lib/telegraf
  • Edit execd plugin configuration as needed:

    vi /var/lib/telegraf/openvpn-linux-amd64/openvpn.conf
  • Add to /etc/telegraf/telegraf.conf or into file in /etc/telegraf/telegraf.d

    [[inputs.execd]]
      command = ["/var/lib/telegraf/openvpn-linux-amd64/openvpn --config /var/lib/telegraf/openvpn-linux-amd64/openvpn.conf"]
      signal = "STDIN"
  • Restart or reload Telegraf.

Development

When updating the plugin the replace directive in go.mod will need updated.

Generally it is expected that no tag will exist and the plugin will reside in a branch.

go mod edit -replace github.com/influxdata/telegraf=github.com/danielnelson/telegraf@openvpn-input
go mod tidy

Packages are generated by a GitHub action whenever a new tag is pushed to the repository.

git tag v0.0.10
git push origin v0.0.10

telegraf-execd-openvpn's People

Contributors

danielnelson avatar kacperk avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kacperk

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.