Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Yet another command-line tool for Datadog

License

NotificationsYou must be signed in to change notification settings

yyuu/hotdog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Yet another command-line tools forDatadog.

Installation

Add this line to your application's Gemfile:

gem'hotdog'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hotdog

Then, setup API key and application key of Datadog. The keys can be configured in environment variables or configuration file.

export DATADOG_API_KEY="abcdefghijklmnopqrstuvwxyzabcdef"export DATADOG_APPLICATION_KEY="abcdefghijklmnopqrstuvwxyzabcdefghijklmn"

Or,

$ mkdir ~/.hotdog$ cat <<EOF > ~/.hotdog/config.yml---api_key: abcdefghijklmnopqrstuvwxyzabcdefapplication_key: abcdefghijklmnopqrstuvwxyzabcdefghijklmnEOF

Usage

List all registered hosts.

$ hotdog lsi-02605a79i-02d78ceci-03cb56edi-03dabcefi-069e282c

List all registered hosts with associated tags and headers.

$ hotdog ls -h -lhost       security-group name              availability-zone instance-type image        region    kernel      ---------- -------------- ----------------- ----------------- ------------- ------------ --------- ------------i-02605a79 sg-89bfe710    web-staging       us-east-1a        m3.medium     ami-66089cdf us-east-1 aki-89ab75e1i-02d78cec sg-89bfe710    web-production    us-east-1a        c3.4xlarge    ami-8bb3fc92 us-east-1 aki-89ab75e1i-03cb56ed sg-89bfe710    web-production    us-east-1b        c3.4xlarge    ami-8bb3fc92 us-east-1 aki-89ab75e1i-03dabcef sg-89bfe710    worker-production us-east-1a        c3.xlarge     ami-4032c1c8 us-east-1 aki-89ab75e1i-069e282c sg-89bfe710    worker-staging    us-east-1a        t2.micro      ami-384c8480 us-east-1 aki-89ab75e1

Display hosts with specific attributes.

$ hotdog ls -h -a host -a namehost       name             ---------- -----------------i-02605a79 web-staging      i-02d78cec web-production   i-03cb56ed web-production   i-03dabcef worker-productioni-069e282c worker-staging

Search hosts matching to specified tags and values.

$ hotdog search availability-zone:us-east-1b and'name:web-*'i-03cb56ed

Login to the matching host using ssh.

$ hotdog ssh availability-zone:us-east-1b and'name:web-*' -t public_ipv4 -u username

Expression

Acceptable expressions in pseudo BNF.

expression: expression0          ;expression0: expression1 "and" expression           | expression1 "or" expression           | expression1 "xor" expression           | expression1           ;expression1: "not" expression           | expression2           ;expression2: expression3 expression           | expression3           ;expression3: expression4 "&&" expression           | expression4 "||" expression           | expression4 '&' expression           | expression4 '^' expression           | expression4 '|' expression           | expression4           ;expression4: '!' atom           | '~' atom           | '!' expression           | '~' expression           | primary           ;primary: '(' expression ')'       | funcall       | tag       ;funcall: IDENTIFIER '(' ')'       | IDENTIFIER '(' funcall_args ')'       ;funcall_args: funcall_arg ',' funcall_args            | funcall_arg            ;funcall_arg: FLOAT           | INTEGER           | STRING           | REGEXP           | primary           ;tag: IDENTIFIER separator IDENTIFIER   | IDENTIFIER separator   | separator IDENTIFIER   | IDENTIFIER   | IDENTIFIER   ;separator: ':'         | '='         ;

Contributing

  1. Fork it (https://github.com/yyuu/hotdog/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Yet another command-line tool for Datadog

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp