Run command

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Run command

Post 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
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Run command

Post by mbellerue »

Sounds good. We'll be around when you're ready.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Run command

Post 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
You do not have the required permissions to view the files attached to this post.
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Run command

Post 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.
You do not have the required permissions to view the files attached to this post.
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Run command

Post 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
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Run command

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Run command

Post 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
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Run command

Post by mbellerue »

Try running yum clean all and then installing the NRPE agent.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Run command

Post by fsodah »

with NRPE didnt work I made up my mind and installed NCPA ... it works
You do not have the required permissions to view the files attached to this post.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Run command

Post by mbellerue »

Excellent! Does this put you in a good spot to start monitoring your environment? Should I close this thread?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked