The traffic metrics appears and disappears after awhile and then disappears forever. The traffic appears after we call the APIs and click on the API Portal Test button. But when we click it again or refresh the page, all of the metrics disappear. Is there any job which will delete the current metrics data?
Release : 5.x
Component : API PORTAL
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 by executing:
docker stack rm portal
3 delete the druid persistence volumes by executing:
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
mysql
use druid;
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 calls 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.