Retrieve App Logs from Stackato Client

The stackato client is used for interacting with the system from the command line.

  1. Download the client for your platform (Windows, OS X, Linux x86, Linux x64)
  2. Unzip the archive in a convenient directory.
  3. Add the the executable to your system/shell $PATH by:
    1. moving it to a directory in your $PATH,
    2. creating a symlink from a directory in your $PATH, or
    3. creating a shell alias for the executable.
  4. Confirm that the client is installed correctly by running stackato -v or stackato help.

To connect the stackato client from you favorite command line interface, you will need to specify the API Endpoint, which is the hostname prepended with “api.”: api.stackato-pry5.local

Target and Login

PS C:\stackato> stackato target api.stackato-pry5.local
Successfully targeted to [https://api.stackato-pry5.local]
PS C:\stackato> stackato login
Attempting login to [https://api.stackato-pry5.local]
Email: <your email account>@foobar.com
Password: ******************
Successfully logged into [https://api.stackato-pry5.local]
Reset current group: OK

Group and Apps

PS C:\stackato> stackato group f5qa
Successfully set current group to [f5qa]
PS C:\stackato> stackato appsstackatoclient

Stackato Logs

To view and application log stream, use the stackato logs command:

PS C:\stackato> stackato logs [myapp]
PS C:\stackato> stackato logs f5qarc4-console

To limit the number of lines displayed, use the –num option:

PS C:\stackato> stackato logs [myapp] –num 50
To view log stream as it is updated, use the –follow option:

PS C:\stackato> stackato logs [myapp] –follow

Note stackato logs buffers only 400 lines of the log stream history (i.e. lines generated prior to it being run). If you need earlier log lines, use the stackato files command to fetch the relevant log file from the logs/ directory

You can save whatever you get to your local machine by using redirection operators:

PS C:\stackato> stackato logs f5qarc4-relay –num 50 >> relaylog01.txt
PS C:\stackato> stackato logs f5qarc4-relay –follow

Stackato Files

PS C:\stackato> stackato files [appname] [path] [–all]

PS C:\stackato> stackato files f5qarc4-relay /logs
staging.log 16B
stderr.log 1.4K
stdout.log 67.9M
stdout.log.1.gz 6.8M
stdout.log.2.gz 6.9M
stdout.log.3.gz 7.0M
stdout.log.4.gz 7.0M
stdout.log.5.gz 8.4M
stdout.log.6.gz 7.3M
stdout.log.7.gz 7.4M
stdout.log.8.gz 7.4M
stdout.log.9.gz 8.8M
PS C:\stackato> stackato files f5qarc4-relay /logs/stderr.log >> relay-stderr.log
PS C:\stackato>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s