- 2 minutes to read

DaysToKeepMessageEventsDefault - System Parameter

The DaysToKeepMessageEventsDefault System Parameter sets the default Days to keep Events value that Nodinite copies onto every new Message Type. The Logging Service deletes processed Log Events once they are older than their Message Type's own value.

At a Glance

Property Value
Key DaysToKeepMessageEventsDefault
Data type integer (days)
Default 14
Read by Logging Service and Web API, when a Message Type is created
Takes effect About 15 seconds, for Message Types created after the change; no restart needed
Status ✅ Active
Since Nodinite 3

How It Works

  • A seed, not a live setting. Nodinite copies the value onto a Message Type only when the Message Type is created. Changing the parameter never changes existing Message Types; adjust those one at a time in Add or manage Message Type.
  • Events own their body and context. Each Message Type has three retention values: Events, Data (the message body), and Context (the key-value context properties). When the cleanup run deletes a Log Event, it deletes the event's body and context with it. DaysToKeepMessageDataDefault and DaysToKeepMessageContextDefault let you remove body and context earlier, so keep both at or below this value.
  • Only processed events are deleted, on each cleanup run of the Logging Service (see CleanUpTimerInterval). The full retention pipeline is described in the Logging Service Data Retention section.

Choosing a Value

  • The default 14 days suits most environments. Raise the value on the Message Types that need a longer history instead of raising the default for all of them.
  • A value of 0 makes new Message Types delete their events on the next cleanup run.
  • If you log more than you delete, the Log Database keeps growing until it slows down or the disk is full. Nodinite starts new Log Databases when one becomes too old (DaysToSplitDatabaseOn) or too large (SizeToSplitDatabaseOn), but the disk space for retained data is still yours to manage.

Tip

Use the Nodinite Database Monitoring Agent to get alerts when databases grow too large and the Windows Server Monitoring Agent to get alerts before you run out of disk space.

Frequently Asked Questions

I changed the value. Why are my existing Message Types unchanged?

Because the value only seeds Message Types at creation time. Open each existing Message Type in Add or manage Message Type and change its Days to keep Events there.

Next Steps