This document outlines the steps required to install and use the Cisco IMC 
integrations for Nagios.
 
==============
Pre-Requisites
==============

1. Cisco IMC Python SDK 0.7.1 or higher versions (https://communities.cisco.com/docs/DOC-37174) 
2. Nagios Core 3.2 or higher versions 
3. Latest Nagios plugin bundle. 
4. Absolute path for the following directories or files
	a. Nagios home directory (NAGIOS_HOME)
	b. Nagios etc directory containing the nagios configuration file (NAGIOS_ETC_DIR)
	c. Nagios plugin directory (NAGIOS_PLUGIN_DIR)
	d. Nagios logos directory. (NAGIOS_LOGOS_DIR)
	   
Note: The logos directory is generally a part of CGI configuration file 
and the root path to the logos directory is denoted by 'physical_html_path'. 
Appending 'images/logos' to the value of the above variable provides us the logos directory
path for Nagios. The cgi.cfg file can be found in NAGIOS_ETC_DIR

=====================
Default Install Paths 
=====================

Listed below are typical install locations and directories for different 
Linux distributions

Debian/SUSE
=============
NAGIOS_HOME=/etc/nagios3
NAGIOS_ETC_DIR=/etc/nagios3
NAGIOS_PLUGIN_DIR=/usr/lib/nagios/plugins
NAGIOS_LOGOS_DIR=/usr/share/nagios3/htdocs/images/logos/

In other Linux variants, typical paths:
=====================================
NAGIOS_HOME=/usr/local/nagios
NAGIOS_ETC_DIR=/usr/local/nagios/etc
NAGIOS_PLUGIN_DIR=/usr/local/nagios/libexec
NAGIOS_LOGOS_DIR=/usr/local/nagios/share/images/logos/
         
=========================
Installing Nagios Plugin 
=========================

1. Extract the installation tar gzip file in a temporary location.
	# tar zxvf cisco-imc-nagios-x.x.x.tar.gz

2. Now run the installer, which should be present in the extracted folder
	# ./installer.py

3. Installer by default will install cisco imc monitoring plugin
	and autodiscovery scripts.It also detects various install path
	and prompt with default options for installing this plugin. 

4. Installer also updates the configuration files which are required 
	for the working of this plugin.It prompts and creates the backups
	of all the files being modified.   

5. In case, only monitoring plugin is to be installed then use
	the '--plugin' option
	#./installer.py --plugin
        	
==================================================        
Working with Cisco IMC Auto Discovery Nagios Addon
==================================================

1. After a complete installation, run autodiscovery scripts to discover the IMC server.

2. Before running the autodiscover script, update the IMCHostInfo.csv with 
	the Cisco IMC IP/FQDN and login credentials.The servers defined in this
	CSV will be added to the Nagios and will be monitored.
    
3. HostName,User and Password fields in the are mandatory for the auto discovery to
	discover the IMC server.
	 
5. Now run the auto discovery script
	./NagiosAutoDiscoveryIMC.py -f IMCHostInfo.csv
	
For further details, refer to Cisco IMC Nagios integration user guide.  

=====================================
Uninstalling Nagios Monitoring Plugin 
=====================================

1. Extract the installation tar gzip file in a temporary location.
	# tar zxvf cisco-imc-nagios-x.x.x .tar.gz

2. Now run the installer with '--uninstall' option
	# ./installer.py --uninstall

	NOTE: Uninstaller will prompt before trying to stop Nagios service.
	Uninstallation process requires Nagios services to be stopped first.
