Problem:
The Graylog GUI shows two years history of “System Messages” (“System / Overview” → “Overview” → “System message” section.
My environment:
Ubuntu 20.04.4 LTS
Graylog-server 4.2.8
MongoDB 4.0.28
Elasticsearch 6.8.23
Steps done so far:
I reduced the “Indices & Index Sets” retention and did delete all, but the latest / Index Sets.
The Graylog GUI still lists all (2 years) “System messages”.
@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))
}
})