/*******************************************************************************

    Author ......... Jimmy Conner
    Contact ........ jimmy@sqmail.org
    Home Site ...... http://sqmail.org
    Program ........ Auto Host Discovery
    Version ........ 0.8.3
    Purpose ........ View Hosts on a Subnet that are not monitored by Cacti

*******************************************************************************/


----[ Purpose

    This plugin adds the ability to auto-discover devices on a subnet that are not monitored by Cacti and and tells you if they are SNMP enabled.

----[ Features

	Host Filter
	Displays Host Status
	Displays DNS Name
	Displays SNMP Status and Information
	Link to add device to Cacti.
	Allows Discovery Templates to allow auto-creating graphs and adding the device to Cacti

----[ Installation

	If you have not already done so, install the Plugin Architecture
	http://cactiusers.org/wiki/PluginArchitectureInstall

	Next install this Plugin using these directions
	http://cactiusers.org/wiki/PluginsInstall
	
	For more information on this plugin
	http://cactiusers.org/wiki/DiscoverDocs
	
    
----[ Changelog
	--- 0.8.3 ---
		Fix api_device_save call

	--- 0.8.2 ---
		Yet even more fixes for Cacti v0.8.7 compatibilit
		Fix issue with Clearing Discovery Results
		Now requires Cacti v0.8.7

	--- 0.8.1 ---
		More compatibility fixes for 0.8.7
		Fix undefined errors when using TCP Ping
		Create option to rerun Data Queries on current hosts and create graphs for all assigned Templates
		Create option to only create graphs for interfaces showing as Up

	--- 0.8 ---
		Fix a bug that didn't allow .0 to be used as a valid address
			.255 is skipped as PHP does not allow us to ping possible broadcast addresses, even when it might not be one
		Use new "api_user_realm_auth" from Plugin Architecture
		Fix compatibility with Cacti 0.8.7

	--- 0.7 ---
		Added patch to ensure it only creates interface graphs for interfaces that are up
		Added patch to allow the requerying of a known host (and thus create any new graphs)

	--- 0.7 ---
		Add ability to scan subnets specified like 192.168.48.120/23
		Add Discovery Templates and allow auto-creation and insertion of graphs
		Add some larger polling intervals in the Settings
		Auto-create thresholds if the thold plugin is being used
		Compatible with Multiple Polling Intervals (1 Minute Polling)

	--- 0.6 ---
		Fix timeout problem with the discovery process
		Fix for the poller not allowing scans to be scheduled in less than 24 hours from now
		Fix for hostname detection of devices already in Cacti database.
		Update plugin tab to better resemble the original cacti images
		Add more filtering options for the results page
		Fix a bug when viewing multiple pages when your default per page is not 30

	--- 0.5 ---
		Bug #0000043 - Add "Utility" Link to Clear Discovery Results
		FR  #0000039 - Add option for Start Time and Polling Frequency
		Changed column name in plugin_discover_os table (match to matchstring), but made the plugin backwards compatible with the old column
		Added command line options to force the polling, show debug output, and to drop and recreate the tables

	--- 0.4 ---
		Bug #0000018 - Add option for SNMP Community Names to use, before it was hardcoded with just 'public'.
		If DNS times out, don't display the current name as 'timed_out'
		FR  #0000012 - Add option to allow to display as a Menu item instead of as a Tab
		Fix display errors for PHP < 4.1.0, $_SERVER variable did not exist
		Added new column to the database to store the hosts community name
		Added the ability to use subnets/ranges such as 10.1.0.0/255.255.253.0, 10.1.0.19/255.255.255.240, 10.1.0.19-10.1.0.27, 10.1.0.0/24

	--- 0.3 ---
		Fixed issue with the SQL files and imports and Mysql 3.*
		#0000013 - Fix issues with database names with uncommon characters by enclosing in back-ticks.

	--- 0.2 ---
		Added option for specifying a DNS server
		Added option to use UDP/TCP/or ICMP for pinging
		A little code cleanup and fixing

	--- 0.1 ---
		Initial release
     

