GithubHelp home page GithubHelp logo

isabella232 / snap-plugin-collector-memcache Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raintank/snap-plugin-collector-memcache

0.0 0.0 0.0 18 KB

Memcach stat collector plugin for Snap

License: Apache License 2.0

Shell 19.09% Go 79.78% Makefile 1.14%

snap-plugin-collector-memcache's Introduction

snap collector plugin - memcache

This plugin collects memcache performance metrics.

It's used in the snap framework.

  1. Getting Started
  1. Documentation
  1. License
  2. Acknowledgements

Getting Started

System Requirements

Operating systems

All OSs currently supported by snap:

  • Linux/amd64

Installation

Download memcache plugin binary:

TODO

To build the plugin binary:

Fork https://github.com/raintank/snap-plugin-collector-memcache
Clone repo into $GOPATH/src/github.com/raintank/:

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

Build the plugin by running make within the cloned repo:

$ make

This builds the plugin in /build/rootfs/

Configuration and Usage

Documentation

###Global config Global configuration files are described in snap's documentation. You have to add "memcache" section with following entries:

  • "server" - host:port of the memcached server. eg 127.0.0.1:11211
  • "proto" - Protocol to use to connect to Memcached. tcp, tcp4, or tcp6

See exemplary Global configuration files in [examples/configs/] (https://github.com/raintank/snap-plugin-collector-memcache/blob/master/examples/configs/).

Collected Metrics

List of collected metrics is described in METRICS.md.

Example

Example running memcache collector 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 and global configuration saved in config.json ):

$ $SNAP_PATH/bin/snapd -l 1 -t 0 --config config.json

In another terminal window: Load memcache plugin

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

See available metrics for your system

$ $SNAP_PATH/bin/snapctl metric list

Create a task manifest file (exemplary files in [examples/tasks/] (https://github.com/raintank/snap-plugin-collector-memcache/blob/master/examples/tasks/)):

{
    "version": 1,
    "schedule": {
        "type": "simple",
        "interval": "1s"
    },
    "workflow": {
        "collect": {
            "metrics": {
                "/raintank/memcache/*": {}
            },
            "process": null,
            "publish": [
                {
                    "plugin_name": "file",
                    "config": {
                        "file": "/tmp/published_memcache"
                    }
                }
            ]
        }
    }
}

Load file plugin for publishing:

$ $SNAP_PATH/bin/snapctl plugin load $SNAP_PATH/plugin/snap-publisher-file
Plugin loaded
Name: file
Version: 3
Type: publisher
Signed: false
Loaded Time: Fri, 20 Nov 2015 11:41:39 PST

Create a task:

$ $SNAP_PATH/bin/snapctl task create -t examples/tasks/memcache-file.json
Using task manifest to create task
Task created
ID: 02dd7ff4-8106-47e9-8b86-70067cd0a850
Name: Task-02dd7ff4-8106-47e9-8b86-70067cd0a850
State: Running

Stop previously created task:

$ $SNAP_PATH/bin/snapctl task stop 02dd7ff4-8106-47e9-8b86-70067cd0a850
Task stopped:
ID: 02dd7ff4-8106-47e9-8b86-70067cd0a850

License

This plugin is Open Source software released under the Apache 2.0 License.

Acknowledgements

snap-plugin-collector-memcache's People

Contributors

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