GithubHelp home page GithubHelp logo

mausvargas / librato-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plmwong/librato-cli

0.0 2.0 0.0 50 KB

librato-cli is a command-line tool for interacting with the Librato API (https://www.librato.com/docs/api)

License: MIT License

JavaScript 100.00%

librato-cli's Introduction

librato-cli - Overview

Build Status

librato-cli is a command-line tool for interacting with the Librato API (https://www.librato.com/docs/api).

Features

  • Listing of sources, metrics, spaces and charts
  • Changing attributes on individual metrics
  • Import/export of individual charts
  • Import/export of entire spaces

Getting Started

npm install github:plmwong/librato-cli -g
librato-cli help

Configuration

librato-cli requires a token and API key to access the API. You can generate these through your Librato account.

{
  "libratoToken" : "<your_token>",
  "libratoApiKey" : "<your_api_key>",
  "baseUrl" : "https://metrics-api.librato.com/v1/"
}

Usage

#set the token / apikey for librato-cli
librato-cli config settoken foo_token
librato-cli config setapikey bar_api_key

#list all charts on the space with id 12345
librato-cli chart list 12345

#list all metric sources in librato
librato-cli source list

#list all spaces in librato
librato-cli space list

#get definition for space 65408
librato-cli space get 65408

#list all metrics (limit 100)
librato-cli metric list

#list metrics that match the 'foo.bar' filter pattern
librato-cli metric list foo.bar

#get measures from 4 hours ago for a metric
librato-cli-metric-get foo.bar 14400

#update metric named 'foo.bar', setting its summarize function to use summation
librato-cli attr foo.bar summarize_function=sum

#export the definition of an existing chart to a file
librato-cli chart export 65408 591000 > test.json

#import that chart definition to a different space
librato-cli chart import 65409 "$(cat test.json)"

#export the definition of an entire space (including all of its charts) to a file
librato-cli space export 65408 > test.json

#import that space definition as a brand new space
librato-cli space import "$(cat test.json)"

Legal

librato-cli is made available as-is under The MIT License. See the LICENSE file for full license details.

librato-cli's People

Contributors

plmwong avatar

Watchers

Mauricio Vargas avatar James Cloos 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.