- Pivotal Cloud Foundry® (PCF) all versions
- Operations Manager (Ops Manager)
Some Operators notice in Ops Manager UI -> tile -> Logs tab section that there exist loads of stale URL links for logs files that no longer exist. They would like a way to remove these stale links.
Follow these steps:
1. Connect to Ops Manager node via ssh. Run`ssh ubuntu@opsmanagerFQDN`.
2. Connect to the database on the node via PostgreSQL psql:
ubuntu@bosh-stemcell:~$ sudo -u postgres psql tempest_production
3. Run PostgreSQL command
tempest_production=# \dt to display the tables.
tempest_production=# select * from jobs_logs; to display list of all downloaded logs links.
tempest_production=# delete from jobs_logs where id=#; to delete individual downloaded log link (where id of stale log can be retrieved from Step 4).
6. If all logs need to be cleared, run
tempest_production=# delete from jobs_logs; (This will remove all downloaded log links and cannot be reverted)
7. Return to Ops Manager UI -> Tile -> Logs Tab and verify that entries are removed
The downloaded log files are stored in the Ops Manager at this location:
/tmp/jobs_logs/; and can be permanently deleted from here.