- report_day="${report_last_health%%_*}"
- report_hour_minute="${report_last_health#*_}"
- report_hour_minute="${report_hour_minute/-/:}"
- echo "$health_dir,$report_month-$report_day $report_hour_minute,$health_check_result"
+ if file "$health_report_temp_file" | grep -q gzip
+ then
+ health_check_result=$(
+ gunzip -c "$health_report_temp_file" | \
+ grep 'window.output\["stats"\]' | \
+ sed 's/},{/}\n{/g' | \
+ grep health-policy | \
+ sed -e 's/{//g' \
+ -e 's/}//g' \
+ -e 's/"//g' \
+ -e 's/label://' | \
+ awk -F',' '{printf("%s,%s,%s\n", $3,$4,$2)}'
+ )
+
+ report_day="${report_last_health%%_*}"
+ report_hour_minute="${report_last_health#*_}"
+ report_hour_minute="${report_hour_minute/-/:}"
+ printf "$health_dir,$report_month-$report_day $report_hour_minute,$health_check_result\n"
+ printf "\thttps://logs.onap.org/onap-integration/daily/$health_dir/$report_month/$report_last_health/xtesting-healthcheck/full/full/report.html\n"
+ else
+ printf "$health_dir,$report_month-$report_day $report_hour_minute,result not available\n"
+ printf "\thttps://logs.onap.org/onap-integration/daily/$health_dir/$report_month/$report_last_health/xtesting-healthcheck/full/full/report.html\n"
+ fi