Unable to download logs in App Metrics UI
search cancel

Unable to download logs in App Metrics UI

book

Article ID: 293630

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

When you try to download Metric logs for a specified timeframe the file is either corrupt or only 1KB in size. The same logs will be visible in the GUI and the issue only occurs when you try to download the logs. 

This is an example of what you might see in the log-store.stderr.log:
 

$ grep -r '4nah4c39-5f5b-432l-89f1-0e76302bd30f' . |grep download ./log-store-vms.ae4c249t-88g3-48a8-947a-859b7823d3b4.2020-08-13-10-44-27/log-store/log-store.stderr.log:{"level":"info","timestamp":"2020-08-12T14:00:05.238016396Z","message":"HTTP","request_id":"5649db2b-08b4-4776-9b47-266090ccb936/D3dtVJyyJJ-044650","method":"GET","scheme":"https","host":"log-store.sys.dev.pcf","path":"/v1/sources/4hao4c90-28dc-431a-83e1-0e75214bd30f/download?startTime=1596911400000000000&endTime=1596997799999000064&query=%7Bsource_type%3D%7E%22APP%22%7D","proto":"HTTP/1.1","from":"10.240.83.249","status":0,"bytes":0,"duration":"3m1.195560401s"}


Environment

Product Version: 2.0

Resolution

The resolution is to increase the timeout variable for the App Metrics application. After increasing the timeout variable, ensure that you restart the application for the changes to take effect.

Follow these steps to create the timeout variable and restart your application: 
 
  1. cf target -o system -s app-metrics-v2
  2. cf set-env appmetrics TIMEOUT_SECONDS 360 
  3. cf restart app-metrics-v2