sd-client

Command line interface for Server Density


License
Other
Install
pip install sd-client==0.1

Documentation

SD CLI

sd is a command line interface for Server Density.

Installation

$ pip install sd-cli

Usage

$ sd -h
sd auth <token>
sd auth <account> <user>
sd device list
sd metrics <name>
sd alerts
sd -h | --help
sd -v | --version

Authentication

You must authenticate once to use SD CLI. You can create a API token using your account information, or use an existing one:

$ sd auth mysite username
Password: **********
Authenticated.

$ sd auth 0123456789abcdef0123456789abcdef
Token verified.

List Devices & Services

$ sd device list
Test (test.example.com)

$ sd service list
MySite (http://www.example.com) up

Show Alerts

$ sd alerts
Service: MySite (http://www.example.com) - http-time
Device: Test - system-memory-memPhysUsed

Show Device Metrics

$ sd metrics Test
Network traffic
  eth0 Received MB/s (375.5 bytes max)
  ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
  eth0 Transmitted MB/s (733.9 bytes max)
  ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

CPU stats
  System
                    ▁        ▁
  User
                             ▁

Memory
  Physical used (716.0 MB max)
  ▆▆▆▆▆▆▇▇▆▆▆▇▆▆▆▆▆▆▇▇▇▇▇▇▇▇▇▇
  Cached used (309.0 MB max)
  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇