Managing Snapshots and Maintenance in Nagios Log Server

Managing Snapshots and Maintenance in Nagios Log Server can guarantee that our log data is safe in case of database corruption or servers going down hard.

After all, backup is always something that is important to us.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related queries.

In this context, we shall look into how to manage Nagios Log Server Snapshots.


Snapshots are point-in-time backups of our log data that exists in the Elasticsearch database.

The snapshot is performed on the entire cluster.

We suggest however to set the correct permissions.

For example,

# chown -R nagios:nagios /mnt/snapshot_repository
# chmod -R 775 /mnt/snapshot_repository

Managing Snapshots and Maintenance in Nagios Log Server

Navigate to Admin > System > Snapshots & Maintenance.

1. Create Snapshot Repository

The Create Repository button will present the Create Repository modal.

Here, we populate the Name and Location fields.

Then we click the Add Repository button to create the repository.

Now, we can see the repository in the Repositories tab and a new snapshot table for the repository.

2. Maintenance Settings

Maintenance is how Nagios Log Server performs tasks automatically on Indexes and Repositories. It is very simple to configure.

We select the new repository, Snapshot Repository. Nagios Log Server will use this repository for snapshots.

The rest of the settings are as follows:

i. Optimize Indexes older than:

Since it uses a Lucene forceMerge on an index that will not accept or ingest any new data, we set this to 0 to disable.

ii. Close indexes older than:

Close indexes do not take any system resources other than disk space. However, we cannot search it unless it reopens. Set to 0 to disable.

iii. Delete indexes older than:

Deletes indexes, freeing resources. This is permanent, the only way to restore them is from an archived snapshot. Set to 0 to disable.

iv. Repository to store snapshots in:

This configures the maintenance worker to save snapshots to the repository that we select.

v. Delete snapshots older than:

This is the number of days before the snapshots delete. The default is 720, but we can change this at any time.

vi. Enable Maintenance and Snapshots:

They are responsible for creating snapshots. So we ensure this is set to Yes.

Once done, click the Save Settings button.

Repository Snapshots

In this table, we can see the indices that have snapshots taken of them.

Each index will have the following status and information:

  • Name – The name of the index that has been saved.
  • Most Recent State – If the last snapshot for this index was successful, it will be labeled as SUCCESS.
  • Most Recent Snapshot Time – The beginning and ending timestamps for the last snapshot to save this index.
  • Elasticsearch Version – This shows the version of the most recent snapshot which contains this index.
  • Versions – This shows a number of how many snapshots store this index.
  • Actions – This allows restoring from snapshots.

Disk Space Usage

The disk space snapshots consume will vary depending on several factors:

The amount of log data received each day.

The frequency age at which we choose to delete old snapshots.

From time to time, we need to observe our disk space usage patterns.

We recommend using Nagios XI to monitor the disk space usage. It will alert if we are to run out of disk space.

Snapshot Frequency

As a system job Snapshots are configured to run once a day

By default, the time they run is based on when we installed the first node in our Nagios Log Server cluster.

If we navigate to Admin > System > Command Subsystem we will find the snapshots_maintenance system job.

Here, we can change the frequency of the job using the Edit link or initiate one to run now using the Run link.

[Need help with managing Nagios Log Server? We are here for you. ]


This article covers how to manage Snapshots and Maintenance in Nagios Log Server. Here, You will learn method to create and manage backups and Repositories and how to manage your Nagios Log Server Maintenance.