SMS Alerting System. Version 0.1 (23-10-2010) Mohammed Aijaz Ahmed. Network Administrator. IST Dept.



Similar documents
Lexia Network Installation Instructions

AdminToys Suite. Installation & Setup Guide

ITA Mail Archive Setup Guide

SMS Alarm Messenger. Setup Software Guide. SMSPro_Setup. Revision [Version 2.2]

Avalanche Remote Control User Guide. Version 4.1.3

Installation Guide For Exchange Reporter Plus

How To Use Exchange Reporter Plus On A Microsoft Mailbox On A Windows (Windows) On A Server Or Ipa (Windows 7) On An Ubuntu 7.6 (Windows 8) On Your Pc Or

Parallels Plesk Panel

Freshservice Discovery Probe User Guide

IN STA LLIN G A VA LA N C HE REMOTE C O N TROL 4. 1

Sage Grant Management System Requirements

Laptop Backup - Administrator Guide (Windows)

Installation and Deployment

HP AppPulse Active. Software Version: 2.2. Real Device Monitoring For AppPulse Active

1. Product Information

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP LTM with the Nagios Open Source Network Monitoring System

Features Overview Guide About new features in WhatsUp Gold v12

WhatsUpGold. v12.3. User Guide

Installation Instruction STATISTICA Enterprise Small Business

Signiant Agent installation

LOCKSS on LINUX. CentOS6 Installation Manual 08/22/2013

EIOBoard Intranet Installer Guide

Maintaining the Content Server

Paragon Backup Retention Wizard

CYCLOPE let s talk productivity

There are numerous ways to access monitors:

TANDBERG MANAGEMENT SUITE 10.0

VERITAS Backup Exec 9.1 for Windows Servers Quick Installation Guide

Contents. Hardware Configuration Uninstalling Shortcuts Black...29

NovaBACKUP xsp Version 15.0 Upgrade Guide

Deploying the BIG-IP LTM with the Cacti Open Source Network Monitoring System

FactoryTalk Gateway Getting Results Guide

F-Secure Messaging Security Gateway. Deployment Guide

Enterprise Deployment

Nagios XI Monitoring Windows Using WMI

Hardware/Software Specifications for Self-Hosted Systems (Multi-Server)

Online Backup Client User Manual Linux

Quick Start Guide for VMware and Windows 7

Setting Up a Unisphere Management Station for the VNX Series P/N Revision A01 January 5, 2010

SUNDE TM. User s Manual for H4 and earlier models

Trend Micro Incorporated reserves the right to make changes to this document and to the products described herein without notice.

SysPatrol - Server Security Monitor

Installing and Configuring WhatsUp Gold

Kaseya 2. Quick Start Guide. for Network Monitor 4.1

NRPE Documentation CONTENTS. 1. Introduction... a) Purpose... b) Design Overview Example Uses... a) Direct Checks... b) Indirect Checks...

AVG 8.5 Anti-Virus Network Edition

EVault Software. Course 361 Protecting Linux and UNIX with EVault

Historian SQL Server 2012 Installation Guide

SafeCom Smart Printing Administrator s Quick Guide

FileMaker Server 8. Administrator s Guide

RecoveryVault Express Client User Manual

Partek Flow Installation Guide

Kaseya 2. User Guide. for Network Monitor 4.1

CONFIGURING MICROSOFT SQL SERVER REPORTING SERVICES

Volume SYNAMETRICS TECHNOLOGIES. A Division of IndusSoft Technologies, Inc. DeltaCopy User s Guide

Daylite Server Admin Guide (Dec 09, 2011)

LOCKSS on LINUX. Installation Manual and the OpenBSD Transition 02/17/2011

Hadoop Lab - Setting a 3 node Cluster. Java -

SmartFiler Backup Appliance User Guide 2.0

Dell Statistica Statistica Enterprise Installation Instructions

FileMaker Server 7. Administrator s Guide. For Windows and Mac OS

Online Backup Linux Client User Manual

Hardware/Software Requirements For Self-Hosting Multi Server

Online Backup Client User Manual

STATISTICA VERSION 12 STATISTICA ENTERPRISE SMALL BUSINESS INSTALLATION INSTRUCTIONS

Preparing a SQL Server for EmpowerID installation

Plesk 8.3 for Linux/Unix System Monitoring Module Administrator's Guide

Configuration Manual

Semantic based Web Application Firewall (SWAF - V 1.6)

NSi Mobile Installation Guide. Version 6.2

Kaseya 2. Quick Start Guide. for Network Monitor 4.1

Pearl Echo Installation Checklist

Local Caching Servers (LCS): User Manual

INFUSION BUSINESS SOFTWARE Installation and Upgrade Guide

Local Caching Servers (LCS) February 2015

CONSTRUCTION / SERVICE BILLING SYSTEM SPECIFICATIONS

Integration Service Database. Installation Guide - Oracle. On-Premises

WEB2CS INSTALLATION GUIDE

Yale Software Library

VMware vcenter Log Insight Getting Started Guide

SecurEnvoy Security Server. SecurMail Solutions Guide

Creating client-server setup with multiple clients

OS Installation Guide Red Hat Linux 9.0

W H I T E P A P E R : T E C H N I C A L. Understanding and Configuring Symantec Endpoint Protection Group Update Providers

Starting Guide - Poseidon 3265 First steps for remote monitoring with Poseidon & GSM

Spam Marshall SpamWall Step-by-Step Installation Guide for Exchange 5.5

Parallels Cloud Server 6.0

HOMEROOM SERVER INSTALLATION & NETWORK CONFIGURATION GUIDE

Core Protection for Virtual Machines 1

Using Red Hat Enterprise Linux with Georgia Tech's RHN Satellite Server Installing Red Hat Enterprise Linux

System Administration Training Guide. S100 Installation and Site Management

NetPoint Configuration Guide. for thin clients

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

EVault for Data Protection Manager. Course 361 Protecting Linux and UNIX with EVault

Quick Start Guide for Parallels Virtuozzo

DiskPulse DISK CHANGE MONITOR

EZblue BusinessServer The All - In - One Server For Your Home And Business

ManageEngine Exchange Reporter Plus :: Help Documentation WELCOME TO EXCHANGE REPORTER PLUS... 4 GETTING STARTED... 7 DASHBOARD VIEW...

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

Transcription:

SMS Alerting System Version 0.1 (23-10-2010) Mohammed Aijaz Ahmed Network Administrator IST Dept. Amana Steel Buildings and Contracting Co. (www.amanabuildings.com) aijazahmedece@gmail.com aijaz.ahmed@amanabuildings.com Nagios SMS Alerting System 1

Table of contents: Introduction... 3 Installation Configuration Target audience, assumptions and recommendations. 3 Acknowledgements..... 3 Install CentOS 5.4.. 6 Manual installation of Nagios XI. 6 Install SMS server tools... 6 Integrate Nagios with SMS server. 7 Create commands. 8 Create SMS contacts. 10 Associating SMS contact to a service. 12 Nagios SMS Alerting System 2

Nagios SMS Alerting System Introduction: This is a step-by-step guide to implement SMS alerting system with Nagios. Target audience is any beginning to advanced network administrator who wants practical documentation of rumored feature of NagiosXI. As the internet is lousy with documentation on nooks and crannies of NagiosXI SMS support, I ve tried to provide documentation on SMS alerting with NagiosXI. Target Audience, Assumptions, and Recommendations: I assume a few things about the user. First, the user has basic understanding of Linux and networking, especially with Linux users and groups, Linux file permissions and ownership, using command line, etc. Second, I assume the reader has working NagiosXI installation on a physical machine. I recommend that before implementing this on a production server, the users test this in a controlled environment. I accept no responsibility for damage, misconfiguration or loss of any kind as a result of referring to this documentation. Proceed at your own risk. Acknowledgements: As with many human endeavors, this work is made possible with effort of others. For me this effort represents 4 years of learning and network administration. Without the greater Linux community, I would not be able to provide this resource. I acknowledge that my colleague Mr. Padeep Kumar has contributed his time, suggestions and corrections over the course of this project. Now, let me welcome you to the pleasure and reliability of SMS alerting with Nagios! Nagios SMS Alerting System 3

Objective: To monitor the network and services like SMTP, backup, VPN connectivity, etc. and to get notified via SMS on failure of these services. Solution: This can be attained by using NagiosXI monitoring system on a Linux server which can monitor servers in data center and remote branch offices. By connecting a GSM modem to the server and configure it to work with Nagios you can receive alerts on your mobile phone. Hardware consideration 1. HP DL360 G6 Server 2. HDD : 146 GBx2 HDD (Raid 1) 3. RAM : 6 GB RAM 4. CPU : Quad corex2 @ 2.27 Ghz 5. SMPS : Redundant power supply 6. GSM modem : Telular XS5D GSM / FAX modem Software consideration 1. CentOS release 5.4 2. Nagios XI 2009R1.3G 3. SMS server tools Installation Stages Configuration Stages Stage 1: Install CentOS 5.4 Stage 2: Manual installation of Nagios XI Stage 3: Install SMS server tools Stage 4: Integrate Nagios with SMS server Stage 5: Create commands Stage 6: Create SMS contacts Nagios SMS Alerting System 4

Fig. 1 is graphical representation of Nagios monitoring system setup Nagios SMS Alerting System 5

Stage 1: Install CentOS 5.4 final release with server option. Select all server packages and deselect Graphical desktop environment (Gnome/KDE/etc.). No additional packages required. Stage 2: Manual installation of Nagios XI is basically done by running a set of shell scripts. Please refer to the document Manual_Installation_Nagios_XI_Instructions.pdf available at Nagios library. Stage 3: Install SMS server tools utility to send alerts via SMS to mobile phones. Connect a GSM modem (Telular XS5D GSM/FAX modem) with a valid SIM card to the server via serial cable. By configuring it to work with Nagios we can receive Nagios alerts on mobile phone 24x7. All you need is to install SMS server tools and then create customized commands and contacts in Nagios to enable it to send alerts via SMS. Download smstools-2.2.20.tar.gz from http://stefanfrings.de/smstools/index-en.html Run the following command # tar -xvzf smstools-2.2.20.tar.gz Enter the newly created directory #cd sms #./install.sh Normally, the default configuration file /etc/smsd.conf should work fine. Starting SMS server #/etc/init.d/sms start Send a test SMS by running the following command #sendsms 0507295873 Last night was exciting, when can we meet again? You can check for any errors in /var/log/smsd.log Adding SMS server to start in default run level #echo /etc/init.d/sms start >> /etc/rc.d/rc.local Nagios SMS Alerting System 6

Stage 4: Integrate Nagios with SMS server tools to send SMS alerts. The SMS Server Tools have been made to send and receive short messages using GSM modems or mobile phones. It may be used for text messages with 7, 8 and 16 Bit character set as well as for binary messages. To send short messages, you need to create a simple text file in a spool directory. The program monitors that directory and sends new files automatically. Received messages are stored into text files in another spool directory (http://stefanfrings.de/smstools/index-en.html) I ve named this section as Integration of SMS server tools with Nagios because here we allow Nagios to write messages into SMS spool directory. The SMS tools program then sends the messages accordingly. All you need is to give nagios user ownership to the spool directories. #chown R nagios.nagios /var/spool/sms To verify the ownership information execute the following command. #ls la /var/spool/sms The result should be as follows drwxr-xr-x 5 nagios nagios 4096 Aug 8 11:59. drwxr-xr-x 17 root root 4096 Aug 8 11:59.. drwxr-xr-x 2 nagios nagios 4096 Oct 13 23:36 checked drwxr-xr-x 2 nagios nagios 4096 Oct 11 11:44 incoming drwxr-xr-x 2 nagios nagios 4096 Oct 13 23:36 outgoing With the help of custom commands and services, Nagios can send the short customized messages as SMS. The custom commands/services are discussed in later sections. Note: The SMS server tools manual can be found at http://stefanfrings.de/smstools/sms_applications.pdf Nagios SMS Alerting System 7

Stage 5: Create Commands: Host Command for SMS: E-mail alert is usually longer which contains the banner of the monitoring system, extra lines and spaces. Commands for sending e-mail alerts are present in the system by default. An SMS alert is intended to be smaller in order to accommodate the information in a single SMS. Commands for sending SMS alerts are not present in the system by default and should be created as follows: E.g. host command to send SMS alert: (To send host down/recovery alert by SMS) Go to nagios core config manager commands add new enter command name enter command line select command type as misc command. notify-host-by-sms: /usr/bin/printf "%b" "Nagios Says: $HOSTNAME$ is $HOSTSTATE$ Info is: $HOSTOUTPUT$ $LONGDATETIME$" /usr/local/bin/sendsms $CONTACTPAGER$ Click on save and then click on apply configuration. Tip: Copy the above command (notify-host-by-sms) and paste in the command line as shown above. Nagios SMS Alerting System 8

Service Command for SMS: A service command is created to send service alerts by SMS. E.g. service command to send SMS alert: Go to nagios core config manager commands add new enter command name enter command line select command type as misc command. notify-service-by-sms: /usr/bin/printf "%b" "Nagios Says: $SERVICEDESC$ on $HOSTALIAS$ is: $SERVICESTATE$ $LONGDATETIME$ Info is: $SERVICEOUTPUT$" /usr/local/bin/sendsms $CONTACTPAGER$ In the above examples the following macros are used and their description is as follows: $HOSTNAME$ $SERVICEDESC$ $HOSTOUTPUT$ $HOSTSTATE$ $SERVICEOUTPUT$ $SERVICESTATE$ : fetches the host name of the monitored server from the system. : fetches the service description from the system. : fetches the output of the host check. : fetches the current state of the host down/up/flapping. : fetches the output result of the service check i.e. service stopped/ok or the numeric output value of the service check e.g. disk usage is 600 MB, etc. : fetches the current state of the service based on the thresholds set. The output is warning/critical/flapping. $LONGDATETIME$ : fetches the current date and time from the system e.g. 14/10/2010 12:47:31 $CONTACTPAGER$ : fetches the mobile no. specified in the SMS contact. (We enter mobile no. in place of pager no in the template) Nagios SMS Alerting System 9

Stage 6: Create SMS contacts An SMS contact is used to send alerts to a mobile phone. This feature is not available in Nagios XI but can be done by entering mobile phone number in place of pager number in the contact template and then selecting customized host/service commands. To create an SMS contact click on contacts add new fill the template as below: Enter the contact name, description, time period hosts, time period services and check on Active. Nagios SMS Alerting System 10

Select the custom host and service command by clicking on the edit button as follows: Similarly, select the proper service command and click on Save. Then click on Apply configuration. Nagios SMS Alerting System 11

Stage 7: Associating SMS contact to a service: It s the show time! Now, since you have successfully installed the SMS server tools, created appropriate check commands, contacts, etc. you will need to assign the SMS contacts to those services for which you want to receive SMS alerts. To associate a SMS contact to a service go to core config manager services select the required service select Alert settings tab select the newly created SMS contact click on save click on Apply configuration Hurray You can now receive your favorite Nagios alerts on your mobile phone even when the Exchange server / Firewall / Router in your datacenter are down. Nagios SMS Alerting System 12