I use ELK and write some additional (extensive) log information to a file called extensive.log.
How can I download this file to my local hard drive for further analysis?
I tried the cf-download plugin. But I do get a "permission or corrupt" error.
$ cf download app-name /home/SOME-PATH/logs/extensive.log
You don't need any plugins, you can use scp
or sftp
.
The documentation is here, but this is a summary:
cf login
and cf target
cf curl /v2/info | jq .app_ssh_endpoint
this is your SSH hostcf ssh-code
then copy the value, this is your passwordcf app app-name --guid
this is part of your user namesftp -P 2222 cf:<app-guid>/<app-instance-num>@<ssh-host>
, when prompted for a password, enter the passcode you copied in step #3.Similarly, for scp
you can run scp -P 2222 -oUser=cf:<app-guid>/<app-instance-num> my-local-file.json <ssh-host>:my-remote-file.json
.
Hope that helps!