search cancel

Analytics Traffic Metrics not showed in portal dashboards

book

Article ID: 212461

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

the traffic metrics appears and disappears after the while and disappears forever. The traffic appears after we call the APIs and click on a button Api Portal Test. But when we click it again or refresh the page, all metrics disappears. Is there any job which delete the whole history of traffic or something else? 

 

Environment

Release : 5.0

Component : API PORTAL

Resolution

 reset the druid stack in the following way 

1 make sure you have a snapshot of the portal server and database.

2 remove the portal stack , docker stack rm portal 

3 delete the druid persistence volumes. 

docker volume rm portal_historical-volume  portal_kafka-volume  portal_minio-volume portal_zk-volume 

4 Logon to your mysql server running the portal db and truncate the tables for the druid database

truncate druid_audit;
truncate druid_config;
truncate druid_dataSource;
truncate druid_pendingSegments;

truncate druid_segments;
truncate druid_rules;
truncate druid_supervisors;
truncate druid_tasklogs;
truncate druid_tasklocks;
truncate druid_tasks;

6 restart portal with portal.sh 

wait a while until everything is running , trigger a few api to generate metric data and verify if the problem is resolved.

The procedure for kubernetes would be the same but you need drop the PVC instead of the volumes .

The truncate for the database tables would be the same .

make sure you have a snapshot of the portal server and databases so you can revert back 

kubectl  delete pvc minio-vol-claim-minio-0

kubectl delete pvc kafka-vol-claim-kafka-0

kubectl delete pvc minio-vol-claim-minio-0

And uninstall and reinstall the helm charts 

The PVC are recreated during the helm install 

to verify run

kubectl get pvc .

After this the storage should be empty and druid should be able to write to it again.