This document is intended for use by Nagios XI Administrators who need a boost in I/O performance.

Similar documents
Offloading NDO2DB To Remote Server

This document is intended for use by Nagios Administrators that want to use Slack for notifications.

Purpose. Target Audience. Solution Overview NCPA. Using NCPA For Passive Checks

This document is intended for use by Nagios XI Administrators who wish to monitor JMX applications.

How To Monitor Apache Cassandra Distributed Databases

These instructions cover how to install and use pre-compiled binaries to monitor AIX 5.3 using NRPE.

An internal CA that is part of your IT infrastructure, like a Microsoft Windows CA

Authenticating and Importing Users with AD and LDAP

Authenticating and Importing Users with Active Directory and LDAP

Offloading MySQL to Remote Server

Authenticating and Importing Users with AD and LDAP

Purpose. Target Audience. Install SNMP On The Remote Linux Machine. Nagios XI. Monitoring Linux Using SNMP

Purpose. Target Audience. Summary. Automation Overview. Nagios XI. Automated Host Management

Backing Up And Restoring Nagios Log Server. This document describes how to backup and restore a Nagios Log Server cluster.

Backing Up And Restoring Your Nagios XI System

Purpose. Target Audience. Prerequisites. What Is An Event Handler? Nagios XI. Introduction to Event Handlers

Understanding Notification Variables

Article Number: 801 Rating: Unrated Last Updated: Tue, Mar 13, 2018 at 9:19 PM

This document covers how to manage fused servers in Nagios Fusion.

Linux Command Line Primer. By: Scott Marshall

This tutorial will guide you how to setup and run your own minecraft server on a Linux CentOS 6 in no time.

Virtual Data Center (vdc) Manual

Cloud Control Panel (CCP) User Guide

Lab 3a Using the vi editor

Migrating the Cisco StadiumVision Director Server Environment to Platform 2 from the Cisco ADE 2140 Series Appliance

IBM AIX Basic Operations V5.

Setting up a Chaincoin Masternode

Purpose. Target Audience. Installation Overview. Install SDK Prerequisites. Nagios XI. Monitoring VMware With Nagios XI

NRPE DOCUMENTATIOND. Copyright (c) Ethan Galstad. Last Updated: 17 November Contents

Article Number: 802 Rating: 4/5 from 1 votes Last Updated: Wed, Mar 7, 2018 at 5:20 PM

Quick Installation Guide for RHV/Ovirt

Introduction to the UNIX command line

Purpose. Target Audience. Windows Machine Requirements. Windows Server Core (No Desktop) Nagios XI. Monitoring Windows Using WMI

Using The Core Config Manager For Service Management

Article Number: 602 Rating: Unrated Last Updated: Tue, Jan 2, 2018 at 5:13 PM

Red Hat Network Satellite 5.0.0: Virtualization Step by Step

Virtual CD TS 1 Introduction... 3

How To Use The Actions Component

Using SSL/TLS with Active Directory / LDAP

Table of Contents. Table of Contents License server installation guide - Linux. Download SCL

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Understanding And Using Configuration Wizards In Nagios XI. This document describes how to use Configuration Wizards in Nagios XI.

a. puppet should point to master (i.e., append puppet to line with master in it. Use a text editor like Vim.

Wallet Installation Guide for Staking on Raspberry PI

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

Lab #10: Using Linux with Microsoft Windows

Basic Linux Command Line Interface Guide

Dell Protected Workspace Management

Control Center Planning Guide

Installing Connector on Linux

Red Hat Ceph Storage 3

Upgrade Guide. This document details the upgrade process for customers moving from the full version of OnApp Cloud v2.3.1 to v2.3.2.

Install and Configure Samba - CentOS 7

Obtaining and Installing the Updated TSBroadcaster Scripts

OCTVQE Zaptel Echo Canceller (PRELIMINARY)

Due: February 26, 2014, 7.30 PM

Linux Systems Administration Getting Started with Linux

Nagios User Guide. You can use apt-get to install these packages by running the following commands:

Understanding The User Macros Component

Test Lab Introduction to the Test Lab Linux Cluster Environment

Hortonworks Cybersecurity Platform

Short Read Sequencing Analysis Workshop

M.C.A. (Sem.-lll) (CBCS) Examination November CCA-3003 Operating System and LinuxlUnix programming

Installing Cisco Multicast Manager

www highskills pt pt

Linux Essentials. Smith, Roderick W. Table of Contents ISBN-13: Introduction xvii. Chapter 1 Selecting an Operating System 1

Design News Gadget Freak. AutoNag reminder system. Background: Server OS Installation:

Control Center Planning Guide

Basic Linux Command Line Interface Guide

Stop all processes and then reboot - same as above startx. Log in as superuser from current login exit

These instructions describe the system requirements and process for installing and initial configuration of jbase on Linux operating systems.

Linux Essentials Objectives Topics:

Molecular Forecaster Inc. Forecaster 1.2 Server Installation Guide

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Upgrade Instructions. NetBrain Integrated Edition 7.1. Two-Server Deployment

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Step by Step Installation of CentOS Linux 7 and Active Circle

cpouta exercises

Monitoring Apache Tomcat Servers With Nagios XI

Network Management with Nagios

Kodaro s Niagara 4 Port Installation Guide

Getting Started With UNIX Lab Exercises

RH033 Red Hat Linux Essentials

Installation Guide for Open VMS

Housekeeping for SAP HANA Platform

Linux Kung Fu. Stephen James UBNetDef, Spring 2017

Unix Introduction to UNIX

OLI Engine in Aspen Hysys

Getting Started with the Deployment Console and Deploying the Clients Per PXE Network Booting using their MAC address. Quick Guide

F 4. Both the directory structure and the files reside on disk Backups of these two structures are kept on tapes

Red Hat Ceph Storage 3

Nagios XI Using The Core Config Manager For Host Management

MAPLE 2017 STEP BY STEP INSTALLATION INSTRUCTIONS

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Deploying Rubrik Datos IO to Protect MongoDB Database on GCP

RH202. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs) Exam.

Installing QuickBooks Enterprise Solutions Database Manager On Different Linux Servers

IDOL Site Admin. Software Version Installation Guide

Introduction The goal of this article is to clarify a few questions about Oracle's installation and its many different available modules.

Transcription:

Purpose This document describes how to use a RAM disk to boost performance on a server. Target Audience This document is intended for use by Administrators who need a boost in I/O performance. Summary Although having enough CPU power on a Nagios server is important, the biggest hardware limitation to a Nagios system is disk I\O. A large Nagios installation creates an enormous amount of disk activity, and if the hard disk can t keep up with the constant traffic flow that needs to happen, even a large number of CPU s are simply going to wait for the disk in order to write new information to the disk. This can cause check latencies to soar even though the CPU usage appears within a safe range. Some users have solved this by using creative file mounts on separate partitions, or purchasing extremely fast disks for their servers. The information below will cover how to free up an enormous amount of disk activity, particularly on large systems by simply adding RAM disks on the local filesystem. The following document will cover the topics below: Key Nagios Files That Affect Disk I\O Automatic RAM Disk Installation Manual RAM Disk Installation Create Directories Editing The Configuration Files Update Performance Data Commands Restart Services Page 1 / 10

Key Files That Affect Disk I\O Lets look at some of the key files that create disk activity on a Nagios install. The examples below match a typical source install of Nagios Core, and any default install. /usr/local/nagios/var/status.dat This is the bread and butter file of all of the live information on the monitoring environment. This file gets updated every 10-20 seconds (as specified in nagios.cfg) with all current status information. /usr/local/nagios/var/objects.cache This file stores all of the object configuration data for Nagios. This file only gets updated upon a restart of the Nagios process. /usr/local/nagios/var/host-perfdata & service-perfdata These files may be in a different location for Core install, but these files function as an intermediary file for PNP s NPCD daemon that processes performance data results. These files get updated about every 10-15 seconds. /usr/local/nagios/var/spool This directory tree acts as a dropbox for all incoming check results. The disk activity in this directory is almost constant, since both Nagios and NPCD are continually creating result files, and then reaping the results every X number of seconds. /usr/local/nagios/var/*.log These log files were worth mentioning. Logging takes both CPU and disk activity, so minimize all unnecessary logging if you need to scale, particularly with performance data processing. Logging can be minimized by editing: /usr/local/nagios/etc/pnp/npcd.cfg and /usr/local/nagios/etc/pnp/process_perfdata.cfg, and setting the log level to 0. Automatic RAM Disk Installation The easiest way to install RAM disk on the is use our install_ramdisk.sh script. Establish a terminal session to your server and execute the following commands: cd /tmp wget https://assets.nagios.com/downloads/nagiosxi/scripts/install_ramdisk.sh chmod +x install_ramdisk.sh./install_ramdisk.sh Page 2 / 10

The script will prompt you for the size of the RAM Disk. Refer to the table on the following page for information on this. Important: The automatic install is NOT supported on RHEL 5 or CentOS 5. If you have an older distribution, you will need to follow the manual install instructions below. The same is valid in cases when you have a "non-standard" instance (custom paths, custom config locations, etc.) or you want to set up the RAM disk in a "non-default" location. Manual RAM Disk Installation These steps should only be followed if using the install_ramdisk.sh script is not possible. In these steps you will be required to edit files. This documentation will use the vi text editor. When using the vi editor: To make changes press i on the keyboard first to enter insert mode Press Esc to exit insert mode When you have finished, save the changes in vi by typing :wq and press Enter You need to determine the size of the RAM disk that you will be using. You can determine the recommended size of the RAM disk based on the total number and hosts and services that you are monitoring. You will be need to define this value in the steps below. Total Number of Hosts + Services RAM Disk Size Less than 1000 100 MB 1000 to 5000 300 MB More than 5000 500 MB Tip: It is always a good idea to use a higher number than the "recommended size" in order to give some leeway and allow for growth. Keep in mind that this will only make an improvement if you have enough available memory, otherwise this will mount the RAM disk and use swap memory for excess RAM allocated. Page 3 / 10

Establish a terminal session to your server and execute the commands in the following steps. Create Directories These commands create the required directories. mkdir /var/nagiosramdisk/ mkdir -p -m 775 /var/nagiosramdisk/tmp mkdir -p -m 775 /var/nagiosramdisk/spool mkdir -p -m 775 /var/nagiosramdisk/spool/checkresults mkdir -p -m 775 /var/nagiosramdisk/spool/xidpe mkdir -p -m 775 /var/nagiosramdisk/spool/perfdata chown -R nagios.nagios /var/nagiosramdisk Editing The Configuration Files /etc/init.d/nagios If you are using 2014 or newer, the /etc/init.d/nagios script should have the following few lines added to it (around line 69): if test -f /etc/sysconfig/nagios; then fi. /etc/sysconfig/nagios If these lines are missing, add them to the top of the /etc/init.d/nagios file below the comments. Create a file called nagios in the /etc/sysconfig/ directory and set permissions: touch /etc/sysconfig/nagios chown nagios:nagios /etc/sysconfig/nagios chmod 775 /etc/sysconfig/nagios Page 4 / 10

Open the /etc/sysconfig/nagios file in vi: vi /etc/sysconfig/nagios Add the following lines: USE_RAMDISK=1 RAMDISK_DIR=/var/nagiosramdisk RAMDISK_SIZE=100 if [ "`mount grep "${RAMDISK_DIR} type tmpfs"`"x == "X" ]; then mount -t tmpfs -o size=${ramdisk_size}m tmpfs ${RAMDISK_DIR} fi mkdir -p -m 775 ${RAMDISK_DIR} ${RAMDISK_DIR}/tmp ${RAMDISK_DIR}/spool ${RAMDISK_DIR}/spool/checkresults ${RAMDISK_DIR}/spool/xidpe $RAMDISK_DIR}/spool/perfdata chown -R nagios:nagios ${RAMDISK_DIR} Note: The command starting with mkdir and ending with perfdata (line 7) is all on one line There is a space between ${RAMDISK_DIR}/spool and ${RAMDISK_DIR}/spool/checkresults Page 5 / 10

/usr/local/nagios/etc/nagios.cfg Open up the /usr/local/nagios/etc/nagios.cfg file in vi: vi /usr/local/nagios/etc/nagios.cfg Update the following lines: service_perfdata_file=/var/nagiosramdisk/service-perfdata host_perfdata_file=/var/nagiosramdisk/host-perfdata check_result_path=/var/nagiosramdisk/spool/checkresults object_cache_file=/var/nagiosramdisk/objects.cache status_file=/var/nagiosramdisk/status.dat temp_path=/var/nagiosramdisk/tmp /usr/local/nrdp/server/config.inc.php Open /usr/local/nrdp/server/config.inc.php in vi: vi /usr/local/nrdp/server/config.inc.php Update the following line: cfg["check_results_dir"]="/var/nagiosramdisk/spool/checkresults"; Page 6 / 10

/usr/local/nagiosxi/html/config.inc.php Open /usr/local/nagiosxi/html/config.inc.php in vi: vi /usr/local/nagiosxi/html/config.inc.php Update the following lines: $cfg['xidpe_dir'] = '/var/nagiosramdisk/spool/xidpe/'; $cfg['perfdata_spool'] = '/var/nagiosramdisk/spool/perfdata/'; /usr/local/nagios/etc/pnp/npcd.cfg Open up /usr/local/nagios/etc/pnp/npcd.cfg in vi: vi /usr/local/nagios/etc/pnp/npcd.cfg Update the following line: perfdata_spool_dir = /var/nagiosramdisk/spool/perfdata/ Page 7 / 10

/usr/local/nagiosmobile/include.inc.php Open up /usr/local/nagiosmobile/include.inc.php in vi: vi /usr/local/nagiosmobile/include.inc.php Update the following lines: $STATUS_FILE = "/var/nagiosramdisk/status.dat"; $OBJECTS_FILE = "/var/nagiosramdisk/objects.cache"; Update Performance Data Commands Login to and navigate to Configure > Core Config Manager > Commands > >_ Commands. In the search field type file-bulk and press Enter. The screen will update with the two commands process-host-perfdata-file-bulk and processservice-perfdata-file-bulk. Tip: Make a copy (backup) of the existing process-host-perfdata-file-bulk and processservice-perfdata-file-bulk commands, prior to modifying them. Leave the old commands (copies) inactive. This can be helpful if you need to go back. Both of these commands need to be updated with the new directory locations as follows: process-host-perfdata-file-bulk /bin/mv /var/nagiosramdisk/host-perfdata /var/nagiosramdisk/spool/xidpe/$timet$.perfdata.host Page 8 / 10

process-service-perfdata-file-bulk /bin/mv /var/nagiosramdisk/service-perfdata /var/nagiosramdisk/spool/xidpe/$timet$.perfdata.service After making these changes click the Apply Configuration button. Restart Services After making all of these changes, execute the following commands from the command line: chown -R nagios:nagios /usr/local/nagiosxi/var/subsys/ RHEL/CentOS 6.x service nagios restart service httpd restart service npcd restart RHEL/CentOS 7 systemctl daemon-reload systemctl restart nagios.service systemctl restart httpd.service systemctl restart npcd.service Page 9 / 10

Conclusion Making use of a RAM disk can provide huge performance improvements on larger systems, or any system where check latencies are greater than 2 seconds. We recommend testing these settings in a non-production environment before implementing into production. Finishing Up This completes the documentation on how to use a RAM disk to boost performance on a server. If you have additional questions or other support related questions, please visit us at our Nagios Support Forums: https://support.nagios.com/forum The Nagios Support Knowledgebase is also a great support resource: https://support.nagios.com/kb Page 10 / 10