Code Monkey home page Code Monkey logo

snap-plugin-collector-df's Introduction

snap-plugin-collector-df

snap plugin for collecting free space metrics from df linux tool

  1. Getting Started
  1. Documentation
  1. Community Support
  2. Contributing
  3. License
  4. Acknowledgements

Getting Started

Plugin collects specified metrics in-band on OS level.

System Requirements

  • Linux system with df command

Operating systems

All OSs currently supported by snap:

  • Linux/amd64

Installation

Download df plugin binary:

You can get the pre-built binaries for your OS and architecture at snap's Github Releases page.

To build the plugin binary:

Fork https://github.com/intelsdi-x/snap-plugin-collector-df

Clone repo into $GOPATH/src/github/intelsdi-x/:

$ git clone https://github.com/<yourGithubID>/snap-plugin-collector-df

Build the plugin by running make in repo:

$ make

This builds the plugin in /build/rootfs

Configuration and Usage

Documentation

Collected Metrics

List of collected metrics is described in METRICS.md.

Examples

Example running snap-plugin-collector-df plugin and writing data to a file.

Make sure that your $SNAP_PATH is set, if not:

$ export SNAP_PATH=<snapDirectoryPath>/build

Other paths to files should be set according to your configuration, using a file you should indicate where it is located.

In one terminal window, open the snap daemon (in this case with logging set to 1, trust disabled):

$ $SNAP_PATH/bin/snapd -l 1 -t 0

In another terminal window:

Load snap-plugin-collector-df plugin:

$ $SNAP_PATH/bin/snapctl plugin load snap-plugin-collector-df

Load file plugin for publishing:

$ $SNAP_PATH/bin/snapctl plugin load $SNAP_PATH/plugin/snap-publisher-file

See available metrics:

$ $SNAP_PATH/bin/snapctl metric list

Create a task manifest file to use snap-plugin-collector-df plugin (exemplary file in [examples/task/] (https://github.com/intelsdi-x/snap-plugin-collector-df/blob/master/examples/task/)):

{
    "version": 1,
    "schedule": {
        "type": "simple",
        "interval": "5s"
    },
    "workflow": {
        "collect": {
            "metrics": {
		        "/intel/procfs/filesystem/rootfs/space_free": {},
                "/intel/procfs/filesystem/rootfs/space_reserved": {},
                "/intel/procfs/filesystem/rootfs/inodes_percent_free": {},
                "/intel/procfs/filesystem/rootfs/inodes_percent_used": {},
                "/intel/procfs/filesystem/rootfs/device_name": {},
                "/intel/procfs/filesystem/sys_fs_cgroup/inodes_used": {}
           },
            "config": {
            },
            "process": null,
            "publish": [
                {
                    "plugin_name": "file",
                    "config": {
                        "file": "/tmp/published_df"
                    }
                }
            ]
        }
    }
}

Create a task:

$ $SNAP_PATH/bin/snapctl task create -t df-file.json

Roadmap

There isn't a current roadmap for this plugin, but it is in active development. As we launch this plugin, we do not have any outstanding requirements for the next release.

If you have a feature request, please add it as an issue and/or submit a pull request.

Community Support

This repository is one of many plugins in snap, a powerful telemetry framework. See the full project at http://github.com/intelsdi-x/snap To reach out to other users, head to the main framework or visit snap Gitter channel.

Contributing

We love contributions!

There's more than one way to give back, from examples to blogs to code updates. See our recommended process in CONTRIBUTING.md.

And thank you! Your contribution, through code and participation, is incredibly important to us.

License

snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.

Acknowledgements

snap-plugin-collector-df's People

Contributors

andrzej-k avatar geauxvirtual avatar lmroz avatar marcin-krolik avatar patrykmatyjasek avatar

Watchers

 avatar  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.