Skip to content

cdlliuy/app-autoscaler-cli-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Foundry CLI AutoScaler Plugin Build Status

AutoScaler plugin provides the command line interface to manage AutoScaler service policies, retrieve metrics and scaling history.

Build and install

Run the following command to build the AutoScaler plugin

cd src/cli
go build -o ascli cli

To install the plugin to cf cli

cf install-plugin ascli

To uninstall the plugin

cf uninstall-plugin AutoScaler

Command List

Command Description
autoscaling-api, asa Set or view AutoScaler service API endpoint
autoscaling-policy, asp Retrieve the scaling policy of an application
attach-autoscaling-policy, aasp Attach a scaling policy to an application
detach-autoscaling-policy, dasp Detach the scaling policy from an application
autoscaling-metrics, asm Retrieve the metrics of an application
autoscaling-history, ash Retrieve the scaling history of an application

Command usage

cf autoscaling-api

Set or view AutoScaler service API endpoint

cf autoscaling-api [URL] [--unset] [--skip-ssl-validation]

ALIAS: asa

OPTIONS

  • --unset: Unset the api endpoint
  • --skip-ssl-validation : Skip verification of the API endpoint. Not recommended!

cf autoscaling-policy

Retrieve the scaling policy of an application

cf autoscaling-policy APP_NAME [--output PATH_TO_FILE]

ALIAS: asp

OPTIONS

  • --output : dump the policy to a file in JSON format

cf attach-autoscaling-policy

Attach a scaling policy to an application

cf attach-autoscaling-policy APP_NAME PATH_TO_POLICY_FILE

ALIAS: aasp

cf detach-autoscaling-policy

Detach the scaling policy from an application

cf detach-as-policy APP_NAME

ALIAS: dasp

cf autoscaling-metrics

Retrieve the metrics of an application

cf autoscaling-metrics APP_NAME METRIC_NAME [--start START_TIME] [--end END_TIME] [--desc] [--output PATH_TO_FILE]

ALIAS: asm

OPTIONS

  • METRIC_NAME : available metric supported: memoryused, memoryutil, responsetime,throughput.
  • --start : start time of metrics collected with format "yyyy-MM-ddTHH:mm:ss+/-HH:mm" or "yyyy-MM-ddTHH:mm:ssZ", default to very beginning if not specified.
  • --end : end time of the metrics collected with format "yyyy-MM-ddTHH:mm:ss+/-HH:mm" or "yyyy-MM-ddTHH:mm:ssZ", default to current time if not speficied.
  • --desc : display in descending order, default to ascending order if not specified
  • --output : dump the metrics to a file

cf autoscaling-history

Retrieve the scaling history of an application.

cf autoscaling-history APP_NAME [--start START_TIME] [--end END_TIME] [--desc] [--output PATH_TO_FILE]

ALIAS: ash

OPTIONS

  • --start : start time of the scaling history with format "yyyy-MM-ddTHH:mm:ss+/-HH:mm" or "yyyy-MM-ddTHH:mm:ssZ", default to very beginning if not specified.
  • --end : end time of the scaling history with format "yyyy-MM-ddTHH:mm:ss+/-HH:mm" or "yyyy-MM-ddTHH:mm:ssZ", default to current time if not speficied.
  • --desc : display in descending order, default to ascending order if not specified
  • --output : dump the scaling history to a file

About

CF CLI Plugin for the App AutoScaler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%