Page 2 of 3

Re: Run command

Posted: Wed Sep 25, 2019 2:32 pm
by fsodah
>>> I just realized that you had another thread, and I've already sent you that document. But that document should help in both cases.

Yes .. Absolutely, i will review the documents ... and get back to you master

Re: Run command

Posted: Thu Sep 26, 2019 9:42 am
by mbellerue
Sounds good. We'll be around when you're ready.

Re: Run command

Posted: Sat Sep 28, 2019 4:57 am
by fsodah
I tried but didnt work ...i made the ssh key exchange to remote servers ... when i call them i get unkown .. it looks like a permission issue

Re: Run command

Posted: Sat Sep 28, 2019 5:07 am
by fsodah
I used the following document you made it available for me https://assets.nagios.com/downloads/nag ... ng_SSH.pdf Your feedback appreciated.

Re: Run command

Posted: Sat Sep 28, 2019 1:57 pm
by fsodah
Why i keep getting ";Current Users;UNKNOWN;HARD;5;Remote command execution failed: bash: /usr/local/nagios/libexec/check_users: No such file or directory"

Do I need to install any thing on the remote host, since our policy not to install any extra packages, if its a must ... what would be the best to apply the plugins on remote host using redhat7.x

From nagios i can run the command remotely, it gave me the right response

Code: Select all

[nagios@nagios ~]$ /usr/local/nagios/libexec/check_by_ssh -H 10.1.x.x -C uptime
 20:53:36 up 86 days,  3:28,  1 user,  load average: 0.00, 0.00, 0.00

Re: Run command

Posted: Mon Sep 30, 2019 9:19 am
by mbellerue
Yes, the check_by_ssh command runs a program or command on the remote system. So if your check_by_ssh command calls /usr/local/nagios/libexec/check_users, then that plugin will need to be installed on the remote system. You could also use an agent like NCPA, but if you have a policy against extra packages that could be a problem.

The standard Nagios plugins have to be compiled. I don't know how that works with your policy. But if that's a preferred method, you can download the standard plugins here,
https://www.nagios.org/downloads/nagios-plugins/

Once the plugins are compiled and installed on the remote system, then you can use the check_by_ssh command to call /usr/local/nagios/libexec/check_cpu, and other plugins.

Re: Run command

Posted: Wed Oct 02, 2019 11:49 am
by fsodah
I am trying to install NRPE following https://tecadmin.net/install-nrpe-on-centos-rhel/


yum --enablerepo=epel -y install nrpe nagios-plugins
Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nagios-plugins.x86_64 0:2.2.1-17.20190829gitfb792ff.el7 will be installed
--> Processing Dependency: nagios-common >= 3.3.1-1 for package: nagios-plugins-2.2.1-17.20190829gitfb792ff.el7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: nagios-plugins-2.2.1-17.20190829gitfb792ff.el7.x86_64
---> Package nrpe.x86_64 0:3.2.1-8.el7 will be installed
--> Processing Dependency: systemd for package: nrpe-3.2.1-8.el7.x86_64
--> Processing Dependency: systemd for package: nrpe-3.2.1-8.el7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: nrpe-3.2.1-8.el7.x86_64
--> Running transaction check
---> Package nagios-common.x86_64 0:4.4.3-1.el7 will be installed
---> Package nagios-plugins.x86_64 0:2.2.1-17.20190829gitfb792ff.el7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: nagios-plugins-2.2.1-17.20190829gitfb792ff.el7.x86_64
---> Package nrpe.x86_64 0:3.2.1-8.el7 will be installed
--> Processing Dependency: systemd for package: nrpe-3.2.1-8.el7.x86_64
--> Processing Dependency: systemd for package: nrpe-3.2.1-8.el7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: nrpe-3.2.1-8.el7.x86_64
--> Finished Dependency Resolution
Error: Package: nrpe-3.2.1-8.el7.x86_64 (epel)
Requires: systemd
Error: Package: nrpe-3.2.1-8.el7.x86_64 (epel)
Requires: libc.so.6(GLIBC_2.15)(64bit)
Error: Package: nagios-plugins-2.2.1-17.20190829gitfb792ff.el7.x86_64 (epel)
Requires: libc.so.6(GLIBC_2.14)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Re: Run command

Posted: Wed Oct 02, 2019 1:50 pm
by mbellerue
Try running yum clean all and then installing the NRPE agent.

Re: Run command

Posted: Wed Oct 02, 2019 1:59 pm
by fsodah
with NRPE didnt work I made up my mind and installed NCPA ... it works

Re: Run command

Posted: Wed Oct 02, 2019 3:24 pm
by mbellerue
Excellent! Does this put you in a good spot to start monitoring your environment? Should I close this thread?