VMware Monitoring Using Unnoc - Setup Instructions

Similar documents
CustomLog /var/www/vhosts/example.com/statistics/logs/access_log common

vsphere SDK for Perl Installation Guide vsphere 4.0 EN

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

Tungsten Dashboard for Clustering. Eric M. Stone, COO

GestióIP IPAM. v3.2. Installation Guide. v0.12. IP address management software.

Installation Manual InfraManage.NET Installation Instructions for Ubuntu

The WebGUI Runtime Environment. Roy Johnson Plain Black Corporation

Offloading NDO2DB To Remote Server

vsphere SDK for Perl Installation Guide ESXi 5.0 Update 1 vcenter Server 5.0 Update 1

Red Hat Ceph Storage 3

GestióIP IPAM v3.0 IP address management software Installation Guide v0.4

Bitnami Ruby for Huawei Enterprise Cloud

شرکت توسعه ارتباطات پردیس پارس. owncloud. The last file sharing platform you'll ever need

Genesys Interaction Recording Solution Guide. WebDAV Requirements

Network and Server Statistics using Cacti

Install some base packages. I recommend following this guide as root on a new VPS or using sudo su, it will make running setup just a touch easier.

To configure the patching repository so that it can copy patches to alternate locations, use SFTP, SCP, FTP, NFS, or a premounted file system.

Koha 3 on Centos. We are installing Koha on the newly installed CentOS machine. Open a terminal and log in as root.

Ubuntu Manually Mount Cdrom Drive Command Line Vmware

ViMP 2.0. Installation Guide. Verfasser: ViMP GmbH

Twiki Installation Notes. Ned Brush 4/13/06. Everything is left as is (default settings) unless specified below. Distribution: RHEL 4

Network and Server Statistics using Cacti

Moab HPC Suite Basic Edition 7.1.4

Cacti monitoring tool

Storage Manager 2018 R1. Installation Guide

Exercises. Notes: Exercise 1. Install the Cacti Plugin Architecture (Cacti PA)

VMWare Tools Installation in IPBrick 5.3

HP IT Operations Compliance Community Edition

Integration of VT ETD-db with Banner

RTC 502 and its Git adapter, Git and its prerequisite

Bitnami Moodle for Huawei Enterprise Cloud

Dell Storage Manager 2016 R3 Installation Guide

Step 1 - Install Apache and PostgreSQL

KOHA 3.4 INSTALLATION ON UBUNTU LINUX. Dibyendra Hyoju August 2011 Madan Puraskar Pustakalaya

Network Management with Nagios

CentOS 6.7 with Vault MySQL 5.1

Installing and Upgrading Cisco Video Surveillance Manager Release 6.3.1

Citrix CloudPlatform (powered by Apache CloudStack) Version Patch D Release Notes. Revised July 02, :15 pm Pacific

FUJITSU Cloud Service S5 Installation and Configuration of MySQL on a CentOS VM

Observium Enable your new virtual host 4

Apache + PHP + MySQL. bdnog November 2017 Dhaka, Bangladesh

IPv6 Sauron - Quick How To

Dell Protected Workspace Management

Installing and Upgrading Cisco Video Surveillance Manager Release 6.3

Red Hat Ceph Storage 3

Linux Administration

Installing Open Project on Ubuntu AWS with Apache and Postgesql

LAMP Stack with VirtualHosts On Centos 6.x

Installing and Upgrading Cisco Network Registrar Virtual Appliance

Setting Up PHPlist (Open-Source Newsletter Manager)

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.

Downloading and installing Db2 Developer-C on Red Hat Enterprise Linux Roger E. Sanders Yujing Ke Published on October 23, 2018

CentOS 7 with MariaDB

Getting Started with MySQL

Moab HPC Suite. Installation and Configuration Guide for SUSE 12- Based Systems. January 2017

Getting Started with vsphere Command-Line Interfaces ESXi 5.1 vcenter Server 5.1

DxR clinician INSTRUCTOR MANUAL STUDENT USER MANUAL TECHNICAL APPENDIX

Bitnami MySQL for Huawei Enterprise Cloud

Illustrated Steps to create greggroeten.net with AWS

Installing Cisco Multicast Manager

IBM Remote Support Manger for Storage

Upgrade Guide Version 7.2

A PAtCHy server: developed by the Apache group formed 2/95 around by a number of people who provided patch files for NCSA httpd 1.3 by Rob McCool.

VMware vfabric Data Director Installation Guide

SETTING UP 3 WORDPRESS SITES ON APACHE AND UBUNTU BY RAMI

If you re the administrator on any network,

ULTEO OPEN VIRTUAL DESKTOP SUSE LINUX ENTERPRISE SERVER (SLES) 11 SP1 SUPPORT

Install Cacti on Debian, CentOS, SuSE and Gentoo Linux - Tracking graphically server performance

How To Configure Web Access To Subversion Repositories Using Apache

Install latest version of Roundcube (Webmail) on CentOS 7

Exam Name: VMware Certified Professional on vsphere 5 (Private Beta)

Installing and Upgrading Cisco Video Surveillance Manager Release 6.3.1

Many packages require the additional devel packages. See below package. Install EPEL repo by down load the latest RPM for CentOS 6.

PoWA Documentation. Release Dalibo

Installing FreePBX 14 on CentOS 7

Article Number: 569 Rating: 2.7/5 from 3 votes Last Updated: Tue, Sep 12, 2017 at 2:54 AM

Jarvis Web Gateway. Installation Instructions. Jonathan Couper-Smartt

We want to install putty, an ssh client on the laptops. In the web browser goto:

Installing FreePBX 12 on CentOS 6.5

Molecular Forecaster Inc. Forecaster 1.2 Server Installation Guide

PRODUCT DOCUMENTATION. Backup & Replication v5.0. User Guide.

Installing Cisco Virtual Switch Update Manager

Monitoring your Network with Linux. WAVV 2005 Richard Smrcina VM Assist, Inc. May 23, 2005

Arm Licence Server User Guide. Version 18.0

Downloading and installing Db2 Developer Community Edition on Ubuntu Linux Roger E. Sanders Yujing Ke Published on October 24, 2018

Installing Virtualbox Guest Additions Vboxadditions on CentOS 7, Fedora 19 / 20 and RHEL 6.5 / 5.10 on Windows host

Installation of Apache OpenMeetings on Ubuntu LTS. This tutorial is made based on a fresh installations of

Bitnami MariaDB for Huawei Enterprise Cloud

MODEM on HP-UX. Guy Van Sanden.

Very often people not expert ask me some simple detailed directions on how to install MySQL from fresh.

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

Bitnami Pimcore for Huawei Enterprise Cloud

Installing Intellicus on AIX. Version: 16.0

Method of Procedure to Upgrade RMS OS to Red Hat Enterprise Linux 6.7

Sim Bank Scheduler introduces: 1. Overview

Bitnami HHVM for Huawei Enterprise Cloud

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

VMware vsphere 5.0 Migration vcenter Server 5.0 Pre- Upgrade Checklist (version 1)

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

IU RGRbench Workload/Benchmark User Guide to Database Creation and Population

Transcription:

VMware Monitoring Using Unnoc - Setup Instructions Summary: This document explains how to setup an Unnoc server to monitor VMware vcenter Servers, ESX Servers, and Virtual Machines using the Perl VI SDK. This installation assumes SuSE 10 SP1 as the OS installed on the server. Where there are differences in your OS, you may need to perform the necessary substitutions in these instructions, such as the location of files in your OS installation. Be aware that if you use the /srv partition as described below, it should be large enough to hold a large amount of data for RRD graphing purposes (5 GB). This document also explains how add monitoring for CPU Ready, Memory Swap, Memory Ballooning, and Datastore Usage. These custom statistics are optional and are not required to run Unnoc. Steps below that add these custom statistics are marked with [Optional Customization] at the beginning of the step. If you are running Nagios using Fruity as your configuration database, you may download the script which will automatically add or remove hosts as they are synchronized with the Unnoc database. This script may be downloaded from https://tech.lds.org/wiki/index.php/lds_monitoring. Implementing this script requires an advanced understanding of Unnoc, Fruity, and Nagios. You may be able to adapt these steps to another enterprise monitoring solution. Plugins we use, which perform queries against the Unnoc database, to check the statistics for Virtual Machine CPU, CPU Ready, Memory, Memory-Ballooning, and Swap; ESX CPU, Memory, and VM States (power); vcenter Server Datastore Usage, and VM States (power) may also be downloaded from https://tech.lds.org/wiki/index.php/lds_monitoring. Installing Unnoc: 1. Connect to the server you are going to install Unnoc. It is recommended you run Unnoc on its own server (or VM). Currently supported Linux platforms: Red Hat Enterprise Linux (RHEL) 5.2 (64 bit) Red Hat Enterprise Linux (RHEL) 5.2 (32 bit) SUSE Enterprise Server 10 SP1 (32 bit) Ubuntu 8.04 (32 bit) We are currently running Unnoc on SUSE Enterprise Server 10 SP1 (64 bit) without any issues. You may try to install Unnoc on another Linux platform but may run into issues with the VI Perl Toolkit install. If the server is a Virtual Machine, you may need to complete the steps to fix time slip issues. Please see: http://kb.vmware.com/kb/1006072 for more information. 2. You will need to setup a vcenter Server account for Unnoc. Unnoc s visibility depends on the access granted to this user. This account can have read-only access if desired. Please see the vsphere Basic System Administration documentation found on the VMware website for more information. 3. [Optional Customization] Unnoc customizations may require a higher Statistics Level than is set in vcenter Server by default. To make this change: a. Login to vcenter Server with Administrative rights. b. Click on the Administration menu and select vcenter Server Settings. c. Click on the Statistics category on the left. Unnoc - Setup Instructions 1 2009 Intellectual Reserve, Inc.

d. Edit the 5 Minutes Interval Duration. e. Change the Statistics Level to Level 3. f. Click the OK button to save changes. 4. Download the latest Mysql rpms (to /usr/local/src) from http://dev.mysql.com/downloads/ and install (rpm Uvh): a. The RPMs you need are: i. MySQL-client... ii. MySQL-server... iii. MySQL-devel iv. MySQL-shared b. Once the updates are installed, start mysql (it may have started as part of the install): /etc/init.d/mysql start c. Change the root password for mysql: mysqladmin -u root password [the-password-you-wish-to-use] 5. Install the following RPMs via Yast: a. gcc (used to compile CPAN modules) b. apache (1.3.x or higher) c. perl-dbd-mysql (this update my be done via CPAN, but there may be problems.) d. php (4.x or higher) e. php-mysql f. apache2-mod_php5 g. OpenSSL (used by VMware::VIRuntime) h. OpenSSL-Devel (used by VMware::VIRuntime) i. rrdtool (1.2.11 or higher) j. make (used to install SNMP_Session.pm) k. libxml2 l. libxml2-devel 6. Install the following Perl modules: a. For the BER and SNMP_Session.pm modules, do the following: i. Download the tar file (SNMP_Session-1.12.tar.gz) from http://www.switch.ch/misc/leinen/snmp/perl/dist/ to the /usr/local/src directory. ii. Extract the file from the gzip'd tar file and enter the extracted home directory for the module. iii. Run the following commands: perl Makefile.PL make make install b. Install/Upgrade the following CPAN modules to latest version: i. DBI ii. Net::SMTP iii. Encode iv. Net::Ping v. Crypt::SSLeay vi. Time::HiRes vii. Net::Ping::External Unnoc - Setup Instructions 2 2009 Intellectual Reserve, Inc.

viii. Math::BigInt::FastCalc ix. XML::LibXML c. VMware::VIRuntime: i. Click on the VMware vsphere SDK for Perl link on http://www.vmware.com/download/sdk/. If you have any issues with the following steps, review the install instructions on the same page you downloaded the SDK. We are currently running version 1.6 on our production instance of Unnoc but have verified the newer version also works correctly with Unnoc. ii. It will require you to have a VMware.com account. Register for an account if you do not have one. iii. Accept the agreement. iv. Download the vsphere SDK for Perl Linux Installer tar file (select the 32 or 64-bit version to match your version of Linux) to your local machine (as the site will not easily allow you to use wget or other utilities to access the file). v. Use scp to move the file from your local machine over to the Unnoc server (put in /usr/local/src/). vi. Extract the contents of the tar file, and then run the vmware-install.pl script found in the extracted directory structure. Accept the defaults. vii. Confirm you can communicate with the vcenter Server: wget https://[vcenter Server]/mob viii. Run this test to confirm it is installed correctly (fill in the blanks). The path to viperformance.pl may change. Be sure the virtual center server name and esx hostname are lower case and fully qualified or the test may fail: /usr/lib/vmware-vcli/apps/performance/viperformance.pl -- server=[virtual center server] --username=[user name] -- password=[password] --countertype=cpu --interval=20 --samples=1 - -instance=* --host=[esx hostname] 7. Create a new directory: mkdir /srv/www/unnoc 8. Create a new group for unnoc: groupadd unnoc 9. Create a new user called unnoc : useradd unnoc -G unnoc -d /srv/www/unnoc 10. Change the directory permissions on the unnoc directory: chown unnoc.unnoc /src/www/unnoc 11. Download the current version of Unnoc from http://unnoc.org/ (Click on the download link. The current version is listed at the top of the page click through to that page to find the tar.gz file.) or http://sourceforge.net/projects/unnoc/ to /usr/local/src. 12. Extract the contents of the file and cd into the unnoc directory Unnoc - Setup Instructions 3 2009 Intellectual Reserve, Inc.

tar xzf unnoc-*.gz cd unnoc-* 13. Run the perl-module-checker.pl script found in the root unnoc install directory. It is okay if DBD::Pg, IO::Socket::SSL, Mail::POP3Client, or any other Plugin Modules are not installed. 14. Copy the files and directories in /usr/local/src/unnoc[version]/unnoc/ directory to /srv/www/unnoc: cp -r /usr/local/src/unnoc[version]/unnoc /srv/www/ 15. [Optional Customization] Apply the patch or replace the files to add monitoring for the addional metrics mentioned above. a. Patch option: i. Switch to the /srv/www directory. ii. Download the patch or complete file replacement file from: https://tech.lds.org/wiki/index.php/lds_monitoring_-_unnoc_-_modifications iii. Unzip the file: gunzip Unnoc-modifications.patch.gz iv. Apply the patch: patch p0 i Unnoc-modifications.patch v. Confirm no errors were listed in the output. b. File replacement option: i. Switch to the /srv/www directory. ii. Download the patch or complete file replacement file from: https://tech.lds.org/wiki/index.php/lds_monitoring_-_unnoc_-_modifications iii. Unzip the file: tar -xzvf Unnoc-modifications.gz iv. The files were put into the correct locations when gunzip d and untar d. 16. Change the permissions for the unnoc directory to the unnoc user: chown -R unnoc.unnoc /srv/www/unnoc 17. Create and setup new unnoc DB on the Nagios DB server: a. Run the following command: mysqladmin -p create unnoc b. [Optional Customization] Edit the /usr/local/src/unnoc[version]/mysql_table file: i. Add the following lines starting at line 683: -- -- Table structure for table `vmware_vm_disk` -- DROP TABLE IF EXISTS `vmware_datastore`; CREATE TABLE `vmware_datastore` ( `id` int(10) unsigned NOT NULL auto_increment, `host` varchar(128) default NULL, `dtype` int(2) default NULL, `ds_name` varchar(128) default NULL, Unnoc - Setup Instructions 4 2009 Intellectual Reserve, Inc.

`vi_id` varchar(64) default NULL, `ds_type` varchar(128) default NULL, `ds_capacity` varchar(128) default NULL, `ds_free` varchar(128) default NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`) ); ii. [Optional Customization] Add the following rows to create table section for vmware_vm_mem starting at line 591: `vm_maxmemoryballoon` varchar(128) default NULL, `vm_memoryballoonusage` varchar(128) default NULL, `vm_maxmemoryswap` varchar(128) default NULL, `vm_memoryswapusage` varchar(128) default NULL, iii. [Optional Customization] Add the following rows to the create table section for vmware_vm_cpu starting at line 611: `vm_cpuready` varchar(128) default NULL, c. Import the table into the unnoc DB you created in step a: mysql unnoc -p < /usr/local/src/unnoc-[version]/mysql_table d. Create a new unnoc DB user in mysql (using the mysql root user) i. Login to mysql with the root user: mysql p ii. Change to the Unnoc db: mysql> use Unnoc iii. Enter these commands to setup the Unnoc user: grant all on unnoc.* to `unnoc`@`%` identified by '[password]'; grant all on unnoc.* to `unnoc`@`localhost` identified by '[password]'; flush privileges; e. Add Backups for the unnoc DB [optional but recommended]: i. Create backup directory: mkdir /var/dbbackups ii. Edit the crontab (crontab -e) as root. iii. Add the following lines (2 lines note wrapping of second line): # Database backups 45 17 * * * /usr/bin/mysqldump --add-drop-table -u unnoc p[password] unnoc > /var/dbbackups/daily_unnoc_backup.sql 18. Setup Unnoc Web Server on the same host: a. If you are not using an existing apache2 installation that has the php5 module working properly, add the following line to the end of the other modules in /etc/apache2/sysconfig.d/loadmodule.conf file (the location of your mod_php5.so module may differ): LoadModule php5_module /usr/lib64/apache2/mod_php5.so b. Create a new file /etc/apache2/vhosts.d/unnoc.conf. Unnoc - Setup Instructions 5 2009 Intellectual Reserve, Inc.

c. Put the following text in the file: <VirtualHost [HOST IP ADDRESS]:80> ServerAdmin webmaster@localhost ServerAlias noc unnoc DocumentRoot /srv/www/unnoc CustomLog /var/log/apache2/unnoc.log combined-pid <Directory /srv/www/unnoc/> Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride All Order allow,deny allow from all ## uncomment you can use the following if you want ## to require a username/password ## make sure to create the /etc/unnoc/htpasswd ## file with the htpasswd command ## or you can use the provided sample.htaccess # AuthUserFile /etc/unnoc/htpasswd # AuthName "unnoc" # AuthType Basic # require valid-user </Directory> </VirtualHost> d. Setup Apache to start on boot: insserv apache2 e. Confirm the setup is correct (should show 3:on and 5:on): chkconfig -l apache2 f. Start/Reload apache: /etc/init.d/apache2 restart 19. Edit the /srv/www/unnoc/etc/unnoc.conf file: i. Set the following variables: webroot = /srv/www/unnoc db_pass = [unnoc password] db_host = localhost daemon_user = unnoc daemon_group = unnoc alert = 0 20. Add the VCM servers to the /srv/www/unnoc/etc/unnoc.conf file: host { hostname = [VCMS Server] service_url = https://[vcms server]/sdk/vimservice type = vcms user = [user setup in Virtual Center] password = [password for the user account] } 21. [Optional Customization] Edit /srv/ww/unnoc/libexec/runtime/table.pl, and comment out the following line (line 64) with a # at the start of the line: &cleanup_dtype_shared_table (dbh => $dbh, dtype => $dtype_vmware_vcms, table => $db_vmware_vi_table, hosts => $all_hosts{$dtype_vmware_vcms}); Unnoc - Setup Instructions 6 2009 Intellectual Reserve, Inc.

22. [Optional Customization] Edit /srv/ww/unnoc/libexec/runtime/config.pl: a. Add the following new line after line 404: db_vmware_ds_table = vmware_datastore b. Add the following new line after line 52: our $db_vmware_ds_table; 23. Edit and Install the init.d script for unnoc: a. Copy the init script (unnocd) from /usr/local/src/unnoc[version]/scripts/init.d/fedora/ to /etc/init.d/ b. Edit the file and change the following lines: i. Remove lines 3-9 and paste the following in it s place: ### BEGIN INIT INFO # Provides: unnoc # Required-Start: network apache2 # Should-Start: # Required-Stop: # Should-Stop: # Default-Start: 3 5 # Default-Stop: # Description: Starts and stops the Unnoc monitor ### END INIT INFO ii. Comment out the following line with # at the beginning of the line:. /etc/rc.d/init.d/functions iii. On line 99, change the word daemon to startproc iv. Change webroot from /var/www/unnoc to /srv/www/unnoc. c. Install the new script: insserv unnocd d. Check the config and confirm it will run at runtime is 3 and 5: chkconfig -l unnocd 24. Start Unnoc and verify it is running correctly: a. Run the following command to start Unnoc: /etc/init.d/unnoc start b. Watch the Unnocd.log file to see if there are any errors with Unnoc: tail -F /srv/www/unnoc/log/unnocd.log c. View the website to see if everything is displaying properly: http://[hostname or ip]/display.php?host=[vcenter Server name] Auto Sync of Unnoc and Fruity Databases: 25. [Optional Customization] Setup the cron job to sync the unnoc and fruity databases. This will add hosts that meet the requirements and remove hosts that no longer appear in unnoc. It will also add or remove datastores. This step will only work if you are running Nagios 2.x with Fruity as the configuration database. Unnoc - Setup Instructions 7 2009 Intellectual Reserve, Inc.

a. Download the auto update script from: https://tech.lds.org/wiki/index.php/lds_monitoring_-_unnoc_- _Unnoc_Automatic_Scripts b. Log into your Nagios server. c. Copy the script you downloaded to the tools (/usr/local/nagios/tools) directory on the Nagios server. d. Make sure check_ping is installed. e. Install the cpan module Net::DNS if not already installed. f. Open the VMWare_fruity_update.pl script. Enter the access information for your Fruity and Unnoc databases. g. Run the script to see if there are any errors. h. On successful run, add the following to cron: # Run Unnoc automagic updater every hour 0 * * * * /usr/local/nagios/tools/vmware_fruity_update.pl >/dev/null 2>&1 Useful Links: Unnoc - http://www.unnoc.org Unnoc-support mailing list - http://lists.sourceforge.net/lists/listinfo/unnoc-support LDS Monitoring Wiki - https://tech.lds.org/wiki/index.php/lds_monitoring VI Perl Toolkit - http://www.vmware.com/support/developer/viperltoolkit/ vsphere SDK for Perl Community - http://communities.vmware.com/community/developer/forums/vsphere_sdk_perl Feedback: If you have any feedback or questions regarding this document please contact us at martinkj_conf@ldschurch.org. Unnoc - Setup Instructions 8 2009 Intellectual Reserve, Inc.