resourced

command module
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2015 License: MIT Imports: 3 Imported by: 0

README

GoDoc license

ResourceD collects resources data inside host machine and perform the following:

  • Serves the data as HTTP+JSON.

  • Sends the data using custom programs.

Installation

  1. Download the binary release here.

  2. Use supervisor/upstart/systemd to daemonize. You can follow examples here.

Running in Development Environment

To find out what ResourceD has to offer, run the following command:

RESOURCED_CONFIG_READER_DIR=$GOPATH/src/github.com/resourced/resourced/tests/data/config-reader \
RESOURCED_CONFIG_WRITER_DIR=$GOPATH/src/github.com/resourced/resourced/tests/data/config-writer \
go run $GOPATH/src/github.com/resourced/resourced/resourced.go

Configuration

ResourceD accepts a few environment variables as configuration:

  • RESOURCED_ADDR: The HTTP server host and port. Default: ":55555"

  • RESOURCED_CERT_FILE: Path to cert file. Default: ""

  • RESOURCED_KEY_FILE: Path to key file. Default: ""

  • RESOURCED_CONFIG_READER_DIR: Path to readers config directory. Default: ""

  • RESOURCED_CONFIG_WRITER_DIR: Path to writers config directory. Default: ""

  • RESOURCED_TAGS: Comma separated tags. Default: ""

Collecting Data

ResourceD data collector is called a reader. The quickest way to configure a reader is to use a script.

  1. Write your script following this one requirement: Output the JSON data through STDOUT

  2. Write ResourceD config file. See examples here.

For more info, follow this link.

Reading Data from HTTP Interface

If you follow the install instruction above, you should be able to GET load average data via cURL:

curl -X GET -H "Content-type: application/json" http://localhost:55555/r/load-avg

RESTful Endpoints

  • GET / Displays full JSON data of all readers and writers.

  • GET /paths Displays paths to all readers and writers data.

  • GET /r Displays full JSON data of all readers.

  • GET /r/paths Displays paths to all readers data.

  • GET /w Displays full JSON data of all writers.

  • GET /w/paths Displays paths to all writers data.

Third Party Data Source

Here are list of 3rd party data source that ResourceD use. Big thanks to these authors, without whom this project would not be possible.

Contributors

Are you a contributor, or looking to be one? Go here!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/boltdb/bolt
Package bolt implements a low-level key/value store in pure Go.
Package bolt implements a low-level key/value store in pure Go.
_workspace/src/github.com/cloudfoundry/gosigar/psnotify
Go interface to the Linux netlink process connector.
Go interface to the Linux netlink process connector.
_workspace/src/github.com/go-fsnotify/fsnotify
Package fsnotify provides a platform-independent interface for file system notifications.
Package fsnotify provides a platform-independent interface for file system notifications.
_workspace/src/github.com/julienschmidt/httprouter
Package httprouter is a trie based high performance HTTP request router.
Package httprouter is a trie based high performance HTTP request router.
_workspace/src/github.com/shirou/gopsutil/common
gopsutil is a port of psutil(http://pythonhosted.org/psutil/).
gopsutil is a port of psutil(http://pythonhosted.org/psutil/).
Package agent runs readers, writers, and HTTP server.
Package agent runs readers, writers, and HTTP server.
Package config provides data structure for storing resourced reader/writer configurations.
Package config provides data structure for storing resourced reader/writer configurations.
Package host provides data structure for storing resourced host information.
Package host provides data structure for storing resourced host information.
Package libdocker provides docker related library functions.
Package libdocker provides docker related library functions.
Package libprocess provides process related library functions.
Package libprocess provides process related library functions.
Package libstring provides string related library functions.
Package libstring provides string related library functions.
Package libtime provides time related library functions.
Package libtime provides time related library functions.
Package readers provides objects that gathers resource data from a host.
Package readers provides objects that gathers resource data from a host.
Package writers provides objects that can send colected resource data to external place.
Package writers provides objects that can send colected resource data to external place.

Jump to

Keyboard shortcuts

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