Thanks gsmith and pattrickmann,
@gsmith: I’m able to query the logs. When I got it right, there are more than 360.000 log entries.
@patrickmann: The git issue for improvement contains the “command” needed for my purpose, but some additional steps have been needed for me to take benefit:
Install mongosh
Start mongosh and select the graylog db:
mongosh
show dbs
use graylog
Enter the sequence to delete system messages older than one month:
db.getCollection('system_messages').deleteMany({
"timestamp":{
$lt: new Date(new Date().setMonth(new Date().getMonth()-1))
}
})
Result:“{ acknowledged: true, deletedCount: 362963 }”
(The system messages older than one month have been deleted)
Afterwards, I did release unneeded disk space:
db.getCollectionNames().forEach(function(collectionName){
print('Compacting: '+collectionName);
db.runCommand({compact: collectionName});
});
Thanks for your fast and helpful support!
Michael