<?xml version="1.0" encoding="utf-8" ?>
<packagegui>
	<description>Nagios NRPEv2</description>
	<requirements>Describe your package requirements here</requirements>
	<name>nrpe2</name>
	<version>2.11</version>
	<title>NRPEv2</title>
	<aftersaveredirect>/pkg_edit.php?xml=nrpe2.xml&amp;id=0</aftersaveredirect>
	<include_file>/usr/local/pkg/nrpe2.inc</include_file>
	<menu>
		<name>NRPEv2</name>
		<tooltiptext></tooltiptext>
		<section>Services</section>
		<url>/pkg_edit.php?xml=nrpe2.xml&amp;id=0</url>
	</menu>
	<service>
		<name>nrpe2</name>
		<rcfile>nrpe2</rcfile>
		<executable>nrpe2</executable>
		<description>Nagios NRPE Daemon</description>
	</service>
	<configpath>installedpackages->package->nrpe2</configpath>
	<additional_files_needed>
		<prefix>/usr/local/pkg/</prefix>
		<chmod>077</chmod>
		<item>http://www.pfsense.com/packages/config/nrpe2/nrpe2.inc</item>
	</additional_files_needed>
	<fields>
		<field>
			<type>listtopic</type>
			<name>NRPE Options</name>
			<fieldname>temp</fieldname>
		</field>
		<field>
			<fielddescr>Enabled</fielddescr>
			<fieldname>enabled</fieldname>
			<description>Check this to enable NRPE daemon</description>
			<type>checkbox</type>
		</field>
		<field>
			<type>listtopic</type>
			<name>Configuration Options</name>
			<fieldname>temp</fieldname>
		</field>
		<field>
			<fielddescr>Port Number</fielddescr>
			<fieldname>server_port</fieldname>
			<description>Port number we should wait for connections on. (Default: 5666)</description>
			<type>input</type>
			<required/>
		</field>
		<field>
			<fielddescr>Bind IP Address</fielddescr>
			<fieldname>server_address</fieldname>
			<description>Set this to the IP address of the interface you want the daemon to listen on.</description>
			<type>input</type>
			<required/>
		</field>
		<field>
			<fielddescr>Nagios Server(s)</fielddescr>
			<fieldname>allowed_hosts</fieldname>
			<description>IP Address of Nagios server, usualy a single IP, but if multiple delimit by comma</description>
			<type>input</type>
			<required/>
		</field>
		<field>
			<type>listtopic</type>
			<name>Commands</name>
			<fieldname>temp</fieldname>
		</field>
		<field>
			<fielddescr>Command Definitions that the Nagios server can call via the NRPE daemon.</fielddescr>
			<fieldname>none</fieldname>
			<type>rowhelper</type>
			<rowhelper>
				<rowhelperfield>
					<fielddescr>Name (Allowed Characters: a-zA-Z_)</fielddescr>
					<fieldname>name</fieldname>
					<type>input</type>
					<size>20</size>
					<required/>
				</rowhelperfield>
				<rowhelperfield>
					<fielddescr>Command</fielddescr>
					<fieldname>command</fieldname>
					<type>select_source</type>
					<source><![CDATA[nrpe2_get_commands()]]></source>
					<source_name>command</source_name>
					<source_value>command</source_value>
				</rowhelperfield>
				<rowhelperfield>
					<fielddescr>Warning Level</fielddescr>
					<fieldname>warning</fieldname>
					<description>At which level do you want a warning to be alerted on?</description>
					<type>input</type>
					<size>15</size>
					<required/>
				</rowhelperfield>
				<rowhelperfield>
					<fielddescr>Critical Level</fielddescr>
					<fieldname>critical</fieldname>
					<description>At which level do you want a warning to be alerted on?</description>
					<type>input</type>
					<size>15</size>
					<required/>
				</rowhelperfield>
				<rowhelperfield>
					<fielddescr>Extra Options</fielddescr>
					<fieldname>extra</fieldname>
					<description>Warning! Use at your own risk, incorrect settings here may prevent NRPE from starting!</description>
					<type>input</type>
					<size>25</size>
				</rowhelperfield>
			</rowhelper>
		</field>
	</fields>
	<custom_delete_php_command>
		nrpe2_custom_php_write_config();
		nrpe2_custom_php_service();
	</custom_delete_php_command>
	<custom_add_php_command>
		nrpe2_custom_php_write_config();
		nrpe2_custom_php_service();
	</custom_add_php_command>
	<custom_php_install_command>
		nrpe2_custom_php_install_command();
		nrpe2_custom_php_write_config();
		nrpe2_custom_php_service();
	</custom_php_install_command>
	<custom_php_deinstall_command>
		nrpe2_custom_php_deinstall_command();
		nrpe2_custom_php_write_config();
	</custom_php_deinstall_command>
	<custom_php_resync_config_command>
		nrpe2_custom_php_write_config();
		nrpe2_custom_php_service();
	</custom_php_resync_config_command>
	<custom_php_command_before_form>
		unset($_POST['temp']);
	</custom_php_command_before_form>
</packagegui>