resourced-master

command module
v4.2.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2016 License: MIT Imports: 10 Imported by: 0

README

GoDoc license Imgur Album

ResourceD Master receives server data from ResourceD agents and serves them as HTTP+JSON.

NOTE: This README provides a quick start guide. For comprehensive documentation, checkout the main website.

Signup

Hosts

Installation for users

  1. Install PostgreSQL 9.5.x

  2. Create PostgreSQL databases.

    # This example shows you how to create databases under resourced user.
    # Make sure user, password, and pg_hba.conf are configured correctly.
    sudo su - postgres
    createuser -P -e resourced
    createdb --owner=resourced resourced-master
    createdb --owner=resourced resourced-master-hosts
    createdb --owner=resourced resourced-master-ts-checks
    createdb --owner=resourced resourced-master-ts-events
    createdb --owner=resourced resourced-master-ts-executor-logs
    createdb --owner=resourced resourced-master-ts-logs
    createdb --owner=resourced resourced-master-ts-metrics
    
  3. Download the tar.gz, unpack it, and run the binary using init/systemd/supervisord. You can follow the examples of init scripts here.

Installation for developers/contributors

See INSTALL.md and BUILD.md

Configuration

ResourceD Master needs to know path to its configuration directory.

You can set it via -c flag or RESOURCED_MASTER_CONFIG_DIR environment variable.

The .tar.gz file provides you with a default config directory. In there, you will see the following files:

  • general.toml All default settings are defined in general.toml.

  • hosts.toml All settings related to storing hosts data.

  • metrics.toml All settings related to storing metrics data.

  • events.toml All settings related to storing events data.

  • logs.toml All settings related to storing logs data.

  • checks.toml All settings related to storing checks data.

RESTful Endpoints

Every HTTP request requires AccessToken passed as user. Example:

# Notice the double colon at the end of Access Token.
curl -u 0b79bab50daca910b000d4f1a2b675d604257e42: https://localhost:55655/api/hosts

For a comprehensive list of API endpoints, visit: resourced.io/docs

Querying

ResourceD offers SQL-like language to query your data. You can use it to query various data:

  • Hosts: by hostname, by tags, or by JSON path (Docs).

  • Logs: by hostname, by tags, or by full-text search (Docs).

Check out the docs for more info, visit: resourced.io/docs.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package application allows the creation of Application struct.
Package application allows the creation of Application struct.
Package config provides data structures for Application configurations.
Package config provides data structures for Application configurations.
Package dal is the Data Access Layer between the Application and PostgreSQL database.
Package dal is the Data Access Layer between the Application and PostgreSQL database.
Package handlers provides HTTP request handlers for the Application.
Package handlers provides HTTP request handlers for the Application.
Package libhttp provides http related library functions.
Package libhttp provides http related library functions.
Package libslice provides slice related library functions.
Package libslice provides slice related library functions.
Package libsmtp provides SMTP related library functions.
Package libsmtp provides SMTP 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 libunix provides UNIX related library functions.
Package libunix provides UNIX related library functions.
Package mailer provides simple abstraction around sending email.
Package mailer provides simple abstraction around sending email.
Package middlewares provides common middleware handlers.
Package middlewares provides common middleware handlers.
Package querybuilder parses ResourceD query and turn it into PostgreSQL query.
Package querybuilder parses ResourceD query and turn it into PostgreSQL query.

Jump to

Keyboard shortcuts

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