summaryrefslogtreecommitdiffstats
path: root/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-virtualization/recipes-extended/nagios/nagios-nrpe')
-rw-r--r--external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/check_nrpe.cfg11
-rw-r--r--external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/fix-compile-without-openssl.patch43
-rw-r--r--external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/fix-configure-uses-host-openssl.patch52
-rw-r--r--external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/nagios-nrpe.service10
4 files changed, 116 insertions, 0 deletions
diff --git a/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/check_nrpe.cfg b/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/check_nrpe.cfg
new file mode 100644
index 00000000..48f3fa5a
--- /dev/null
+++ b/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/check_nrpe.cfg
@@ -0,0 +1,11 @@
+# this command runs a program $ARG1$ with arguments $ARG2$
+define command {
+ command_name check_nrpe
+ command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
+}
+
+# this command runs a program $ARG1$ with no arguments
+define command {
+ command_name check_nrpe_1arg
+ command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
+}
diff --git a/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/fix-compile-without-openssl.patch b/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/fix-compile-without-openssl.patch
new file mode 100644
index 00000000..ab913a8f
--- /dev/null
+++ b/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/fix-compile-without-openssl.patch
@@ -0,0 +1,43 @@
+fix compile without openssl
+
+Build with --disable-ssl causes the build to break with
+this error:
+
+error: unknown type name 'SSL'
+ void complete_SSL_shutdown( SSL *);
+
+Signed-off-by: Rickard Engberg <rickard.engberg@windriver.com>
+Signed-off-by: Vu Tran <vu.tran@windriver.com>
+
+Index: nrpe-2.15/src/nrpe.c
+===================================================================
+--- nrpe-2.15.orig/src/nrpe.c 2013-09-06 17:27:13.000000000 +0200
++++ nrpe-2.15/src/nrpe.c 2013-11-20 23:22:49.546791020 +0100
+@@ -99,9 +99,9 @@
+ int debug=FALSE;
+ int use_src=FALSE; /* Define parameter for SRC option */
+
+-
++#ifdef HAVE_SSL
+ void complete_SSL_shutdown( SSL *);
+-
++#endif
+
+ int main(int argc, char **argv){
+ int result=OK;
+@@ -1796,6 +1796,7 @@
+ return OK;
+ }
+
++#ifdef HAVE_SSL
+ void complete_SSL_shutdown( SSL *ssl) {
+
+ /*
+@@ -1816,6 +1817,7 @@
+ if( SSL_shutdown( ssl)) break;
+ }
+ }
++#endif
+
+ /* bail if daemon is running as root */
+ int check_privileges(void){
diff --git a/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/fix-configure-uses-host-openssl.patch b/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/fix-configure-uses-host-openssl.patch
new file mode 100644
index 00000000..920aabfc
--- /dev/null
+++ b/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/fix-configure-uses-host-openssl.patch
@@ -0,0 +1,52 @@
+fix configure uses host openssl
+
+include/dh.h file is needed to be generated with command:
+
+openssl dhparam -C 512
+
+just do not use openssl from host.
+
+Signed-off-by: Rickard Engberg <rickard.engberg@windriver.com>
+Signed-off-by: Vu Tran <vu.tran@windriver.com>
+
+Index: nrpe-2.15/configure.in
+===================================================================
+--- nrpe-2.15.orig/configure.in 2013-09-06 17:27:13.000000000 +0200
++++ nrpe-2.15/configure.in 2013-11-21 14:09:31.798606782 +0100
+@@ -330,17 +330,6 @@
+
+ AC_DEFINE_UNQUOTED(HAVE_SSL,[1],[Have SSL support])
+ AC_SUBST(HAVE_SSL)
+-
+- dnl Generate DH parameters
+- echo ""
+- echo "*** Generating DH Parameters for SSL/TLS ***"
+- if test -f "$ssldir/sbin/openssl"; then
+- sslbin=$ssldir/sbin/openssl
+- else
+- sslbin=$ssldir/bin/openssl
+- fi
+- # awk to strip off meta data at bottom of dhparam output
+- $sslbin dhparam -C 512 | awk '/^-----/ {exit} {print}' > include/dh.h
+ fi
+ fi
+
+Index: nrpe-2.15/configure
+===================================================================
+--- nrpe-2.15.orig/configure 2013-09-06 17:27:13.000000000 +0200
++++ nrpe-2.15/configure 2013-11-21 14:11:45.491269701 +0100
+@@ -6738,14 +6738,6 @@
+
+
+ echo ""
+- echo "*** Generating DH Parameters for SSL/TLS ***"
+- if test -f "$ssldir/sbin/openssl"; then
+- sslbin=$ssldir/sbin/openssl
+- else
+- sslbin=$ssldir/bin/openssl
+- fi
+- # awk to strip off meta data at bottom of dhparam output
+- $sslbin dhparam -C 512 | awk '/^-----/ {exit} {print}' > include/dh.h
+ fi
+ fi
+
diff --git a/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/nagios-nrpe.service b/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/nagios-nrpe.service
new file mode 100644
index 00000000..c5a0bdac
--- /dev/null
+++ b/external/meta-virtualization/recipes-extended/nagios/nagios-nrpe/nagios-nrpe.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Nagios nrpe plugin
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/bin/nrpe -c /etc/nagios/nrpe.cfg -f
+TimeoutSec=60
+
+[Install]
+WantedBy=multi-user.target