Page 1 of 1

installing nagios in opensuse 42.1 from source

Posted: Thu Nov 29, 2018 5:50 am
by Hoygen
Hello,
I'm following this guide: https://support.nagios.com/kb/article.php?id=515#SUSE
but when I test nrpe i get

Code: Select all

/tmp/nrpe-nrpe-3.2.1 # /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
-bash: /usr/local/nagios/libexec/check_nrpe: No such file or directory
I must have missed something since the folder /usr/local/nagios/libexec is empty.

same thing with the plugins
/tmp/nagios-plugins-release-2.2.1 # /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_load
-bash: /usr/local/nagios/libexec/check_nrpe: No such file or directory

Code: Select all

:/usr/local/nagios/libexec # /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
-bash: /usr/local/nagios/libexec/check_nrpe: No such file or directory
:/usr/local/nagios/libexec # /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_load
-bash: /usr/local/nagios/libexec/check_nrpe: No such file or directory

Re: installing nagios in opensuse 42.1 from source

Posted: Thu Nov 29, 2018 8:07 am
by scottwilkerson
You missed the section that follows "Installing The Nagios Plugins" in that doc that follows the "Service / Daemon Commands"

Re: installing nagios in opensuse 42.1 from source

Posted: Fri Nov 30, 2018 11:20 am
by Hoygen
I followed it, the folder is no longer empty but

Code: Select all

:/usr/local/nagios/libexec # /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
-bash: /usr/local/nagios/libexec/check_nrpe: No such file or directory
:/usr/local/nagios/libexec # /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_load
-bash: /usr/local/nagios/libexec/check_nrpe: No such file or directory
persist

Re: installing nagios in opensuse 42.1 from source

Posted: Fri Nov 30, 2018 11:25 am
by scottwilkerson
check_nrpe is not part of the nagios-plugins package

If you need that you will need to install NRPE on the server to get the plugin
https://support.nagios.com/kb/article.php?id=515#SUSE

Re: installing nagios in opensuse 42.1 from source

Posted: Mon Dec 03, 2018 5:22 am
by Hoygen
Hello,
I followed the guide again.
when I Test NRPE
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
I still get
-bash: /usr/local/nagios/libexec/check_nrpe: No such file or directory

Re: installing nagios in opensuse 42.1 from source

Posted: Mon Dec 03, 2018 9:44 am
by scottwilkerson
One more command that may have been missing from that document was

Code: Select all

make install-plugin
This should install the plugin

Re: installing nagios in opensuse 42.1 from source

Posted: Tue Dec 04, 2018 5:02 am
by Hoygen
ok

Code: Select all

make install-plugin
cd ./src/; make install-plugin
make[1]: Entering directory '/tmp/nrpe-nrpe-3.2.1/src'
/usr/bin/install -c -m 755 -d /usr/local/nagios/bin
/usr/bin/install -c -m 755 ../uninstall /usr/local/nagios/bin/nrpe-uninstall
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/lib
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/lib
/usr/bin/install -c -m 775 -o nagios -g nagios check_nrpe /usr/local/nagios/lib
make[1]: Leaving directory '/tmp/nrpe-nrpe-3.2.1/src'
but I still can't run

Code: Select all

/tmp/nrpe-nrpe-3.2.1 # /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
-bash: /usr/local/nagios/libexec/check_nrpe: No such file or directory

Re: installing nagios in opensuse 42.1 from source

Posted: Tue Dec 04, 2018 8:32 am
by scottwilkerson
Did it place it in the wrong directory?

Code: Select all

ls -al /usr/local/nagios/bin

Code: Select all

find / -name "check_nrpe"

Re: installing nagios in opensuse 42.1 from source

Posted: Thu Dec 06, 2018 3:01 am
by Hoygen

Code: Select all

find / -name "check_nrpe"
find: File system loop detected; ‘/.snapshots/1/snapshot’ is part of the same file system loop as ‘/’.
/.snapshots/47/snapshot/usr/lib/nagios/plugins/check_nrpe
/tmp/nrpe-nrpe-3.2.1/src/check_nrpe
/usr/local/nagios/lib/check_nrpe
/usr/lib/nagios/plugins/check_nrpe
find: ‘/run/user/1000/gvfs’: 
the quick fix for me was this:

Code: Select all

 zypper install nrpe monitoring-plugins-nrpe nrpe-doc
skipping the whole from source thing.
thank you for your correct answers.

Re: installing nagios in opensuse 42.1 from source

Posted: Thu Dec 06, 2018 8:35 am
by scottwilkerson
That would work too...

Looking at your output it looks like it installed the plugin in /usr/local/nagios/lib/check_nrpe instead of /usr/local/nagios/libexec/check_nrpe