From cb331a55ab44eef169f3fbc3e752f2935439fa01 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 18 May 2009 20:39:14 -0400 Subject: Adding the tbz files and include files for the Nagios NRPE v2.11 package --- config/nrpe2/nrpe2.inc | 188 +++++++++++++++++++++++++++++++++++++++++++++++++ config/nrpe2/nrpe2.xml | 166 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 354 insertions(+) create mode 100644 config/nrpe2/nrpe2.inc create mode 100644 config/nrpe2/nrpe2.xml (limited to 'config/nrpe2') diff --git a/config/nrpe2/nrpe2.inc b/config/nrpe2/nrpe2.inc new file mode 100644 index 00000000..b0f4f761 --- /dev/null +++ b/config/nrpe2/nrpe2.inc @@ -0,0 +1,188 @@ + nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +require('filter.inc'); + +function nrpe2_custom_php_install_command() +{ + global $g, $config; + conf_mount_rw(); + + $ip = $config['interfaces']['lan']['ipaddr']; + + $config['installedpackages']['nrpe2']['config'][0]['enabled'] = TRUE; + $config['installedpackages']['nrpe2']['config'][0]['server_address'] = $ip; + $config['installedpackages']['nrpe2']['config'][0]['server_port'] = 5666; + $config['installedpackages']['nrpe2']['config'][0]['allowed_hosts'] = "127.0.0.1"; + + $config['installedpackages']['nrpe2']['config'][0]['row'] = array( + 0 => array( + 'name' => 'check_users', + 'command' => 'check_users', + 'warning' => '5', + 'critical' => '10' + ), + 1 => array( + 'name' => 'check_load', + 'command' => 'check_load', + 'warning' => '15,10,5', + 'critical' => '30,25,20', + ), + 2 => array( + 'name' => 'check_root', + 'command' => 'check_disk', + 'warning' => '20%', + 'critical' => '10%', + 'extra' => '-p /' + ), + 3 => array( + 'name' => 'check_var', + 'command' => 'check_disk', + 'warning' => '20%', + 'critical' => '10%', + 'extra' => '-p /var/run' + ), + 4 => array( + 'name' => 'check_zombie_procs', + 'command' => 'check_procs', + 'warning' => '5', + 'critical' => '10', + 'extra' => '-s Z' + ), + 5 => array( + 'name' => 'check_total_procs', + 'command' => 'check_procs', + 'warning' => '150', + 'critical' => '200' + ) + ); + + $fd = fopen('/usr/local/etc/rc.d/nrpe2', 'w'); + $rc_file = << \ No newline at end of file diff --git a/config/nrpe2/nrpe2.xml b/config/nrpe2/nrpe2.xml new file mode 100644 index 00000000..723bbba9 --- /dev/null +++ b/config/nrpe2/nrpe2.xml @@ -0,0 +1,166 @@ + + + Nagios NRPEv2 + Describe your package requirements here + nrpe2 + 2.11 + NRPEv2 + /pkg_edit.php?xml=nrpe2.xml&id=0 + /usr/local/pkg/nrpe2.inc + + NRPEv2 + +
Services
+ /pkg_edit.php?xml=nrpe2.xml&id=0 +
+ + NRPEv2 + nrpe2 + nrpe2 + Nagios NRPE Daemon + + installedpackages->package->nrpe2 + + /usr/local/pkg/ + 077 + http://www.pfsense.com/packages/config/nrpe2/nrpe2.inc + + + + listtopic + NRPE Options + temp + + + Enabled + enabled + Check this to enable NRPE daemon + checkbox + + + listtopic + Configuration Options + temp + + + Port Number + server_port + Port number we should wait for connections on. (Default: 5666) + input + + + + Bind IP Address + server_address + Set this to the IP address of the interface you want the daemon to listen on. + input + + + + Nagios Server(s) + allowed_hosts + IP Address of Nagios server, usualy a single IP, but if multiple delimit by comma + input + + + + listtopic + Commands + temp + + + Command Definitions that the Nagios server can call via the NRPE daemon. + none + rowhelper + + + Name (Allowed Characters: a-zA-Z_) + name + input + 20 + + + + Command + command + select + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Warning Level + warning + At which level do you want a warning to be alerted on? + input + 15 + + + + Critical Level + critical + At which level do you want a warning to be alerted on? + input + 15 + + + + Extra Options + extra + Warning! Use at your own risk, incorrect settings here may prevent NRPE from starting! + input + 25 + + + + + + nrpe2_custom_php_write_config(); + nrpe2_custom_php_service(); + + + nrpe2_custom_php_write_config(); + nrpe2_custom_php_service(); + + + nrpe2_custom_php_install_command(); + nrpe2_custom_php_write_config(); + nrpe2_custom_php_service(); + + + nrpe2_custom_php_deinstall_command(); + nrpe2_custom_php_write_config(); + + + + + unset($_POST['temp']); + +
-- cgit v1.2.3