Remote servers

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

Remote servers

Post by fsodah »

In some section of my env. I have multiple servers running linux ... I am hosting them as colocation for clients ... these clients can be accessed from a deployment server which belong to our company this deployment server can access to these server with ssh-id without typing passwords ..
however the deployment server got on it nrpe and nagios plugins .... is it possible from the deployment server to watchgaurd these clients .... I want to see if the services on these clients are up such as http dba tomcat ...etc
On the clients I cant install anything ... since am not allowed
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Remote servers

Post by benjaminsmith »

Hello @fsodah,

If you can directly access the clients from XI using ssh that would be the easiest to setup. Otherwise, one option would be to send passive check results collected by Nagios Core running on the deployment server using NRPD.

See: Distributed Monitoring With NRDP

If you are not able to install plugins directly on the client, it does limit what can be checked from NRPE/Nagios.
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!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Remote servers

Post by cdienger »

If the services open up ports that your deployment server can access then the deployment server can verify that client services are up using a plugin like check_tcp. This simply checks to see if a port is up and listening. Checks like check_http, check_ssh, check_mysql_health, etc... can be used to connect to services if you need more than a tcp handshake to verify a service is working.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Remote servers

Post by lmiltchev »

You can also try the following:

1. On the clients, you may set up something like this in sudoers:

Code: Select all

Defaults:nagios !requiretty
nagios ALL=NOPASSWD: /sbin/service *
2. On the server with NRPE installed, you could add a command as this one:

Code: Select all

command[check_httpd_remote]=/usr/local/nagios/libexec/check_by_ssh -H <client ip> -C "sudo service httpd status"
Note: Make sure that the Nagios XI ip address is added to the "allowed_hosts" line in nrpe.cfg file.

3. Test it from the command line on the Nagios XI server:

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_nrpe -H <ip address of the deployment server> -c check_httpd_remote
Example:

Code: Select all

[nagios@TEST_XI_CentOS_6 ~]$ /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_httpd_remote
httpd (pid  26289) is running...
Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Remote servers

Post by fsodah »

let me try this ,,, i need some time to figure it out ... let me get back to my office i will test it ... and update you .. please keep it open the ticket
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Remote servers

Post by lmiltchev »

Sure, we will keep the topic open. Let us know if you have any further questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: Remote servers

Post by fsodah »

decided to install nrpe on all clients to get a proper data analysis .... please close the ticket.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Remote servers

Post by mbellerue »

Okay, thank you for reporting back. We'll close it up.
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