Skip to main content

Monitor MarkLogic Server

Set the monitoring history data retention policy

The retention policy (for raw, hourly, daily) is a value set in days. If performance metering is enabled, then all data that is older than that many days for the specified period (raw, hour, day) is deleted. The retention policy is set at a group level, so different groups can have different retention policies. For example, GroupA may have raw set to 1 day and GroupB may have raw set to 10 days. The cleanup code follows this retention value on a per-group basis.

There are cases where metering data may become orphaned, so it may no longer belong to an existing group. Some examples of when this could occur are:

  • Deleting a group

  • Importing metering data from another cluster

Any metering data that no longer belongs to any active group in the current cluster is deleted. To avoid this, turn off metering or avoid deleting groups and instead move hosts out of the group but keep the group in the cluster configuration.

Note

Loading older monitoring history data (for example, by restoring a backup of the Meters database) will be immediately affected by data retention policy. So, you should turn off performance metering prior to restoring any data that is older than the time specified by your retention policy.

Deletion of data older then the retention policy occurs no sooner than the retention policy, but may, for various reasons, still be maintained for an unspecified amount of time.

Note

Changing the retention policy from smaller to larger values does not restore data that has already been deleted.

The default data retention policy settings are as shown in the following table. To maximize efficiency, it is a best practice to retain raw data for the least number of days and the daily data for the most number of days.

Period

Retention Period

Raw

7 Days

Hourly

30 Days

Daily

90 Days