sacloud-router-usage

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 14 Imported by: 0

README

sacloud/sacloud-router-usage

Go Reference Tests Go Report Card

sacloud/sacloud-cpu-usageのルータ+スイッチ版

概要

スイッチ+ルータの使用状況をさくらのクラウドAPI経由で取得しMax/Min/Averageを算出します。

Usage

Usage:
  sacloud-router-usage [OPTIONS]

Application Options:
      --time=           Get average traffic for a specified amount of time (default: 3)
      --item=[in|out]   Item name (default: in)
      --prefix=         prefix for router names. prefix accepts more than one.
      --zone=           zone name
      --percentile-set= percentiles to dispaly (default: 99,95,90,75)
  -v, --version         Show version
      --query=          jq style query to result and display
      --env-from=       load environment values from this file

Help Options:
  -h, --help            Show this help message

Examples

% ./sacloud-router-usage --prefix example- --item out  --zone tk1b 
2022/10/25 12:02:06 example-r1 zone:tk1b traffic:5.305794 time:2022-10-25 11:50:00 +0900 JST
2022/10/25 12:02:06 example-r1 zone:tk1b traffic:5.305794 time:2022-10-25 11:55:00 +0900 JST
2022/10/25 12:02:06 example-r1 zone:tk1b traffic:0.000000 time:2022-10-25 12:00:00 +0900 JST
2022/10/25 12:02:06 example-r1 average_traffic:3.537196
{"75pt":3.537196,"90pt":3.537196,"95pt":3.537196,"99pt":3.537196,"avg":3.537196,"max":3.537196,"min":3.537196,"routers":[{"avg":3.537196,"monitors":[{"time":"2022-10-25 11:50:00 +0900 JST","traffic":5.305794},{"time":"2022-10-25 11:55:00 +0900 JST","traffic":5.305794},{"time":"2022-10-25 12:00:00 +0900 JST","traffic":0}],"name":"example-r1","zone":"tk1b"}]}

License

sacloud-router-usage Copyright (C) 2022 The sacloud/sacloud-router-usage authors.

This project is published under MIT.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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