If you have a very large Nagios XI instance, and you are experiencing high I\O wait time, and high check latencies, you have a couple of options – buy extremely fast hard drives or add RAM disk on the local filesystem.
Setting up a RAM disk manually requires a modification of numerous files – nagios.cfg, config.inc.php, npcd.cfg, etc. Skipping just one of the required steps or making a typo will result in various issues with performance data files not being processed, graphs not being displayed, etc.
In order to make the process of utilizing a RAM disk in Nagios XI a lot easier for users, we developed a bash script that automates the whole process. All you need to do now is run four simple commands:
chmod +x install_ramdisk.sh
The script will check for old or incomplete RAM disk installs, and will exit if any are found. If no previous RAM disk installs are found, the script will:
1. Backup all of the configs that are about to be modified and place them in the newly created “/tmp/ramdiskbackup/” directory.
2. Determine the recommended size of the RAM disk that is needed, and set it up automatically. You have an option to change the size of the RAM disk if you need to use a different value.
3. Modify various configs such as nagios.cfg, config.inc.php, npcd.cfg, etc.
4. Restart services.
5. Give you a confirmation that the RAM disk was installed successfully.
If you prefer to set up a RAM disk manually, please follow the steps outlined in our documentation (under the “Manual RAM Disk Installation” section):
As always, we would appreciate any feedback – good or bad, tips for improvement, etc.