changing web server connection by ipaddr:port

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
shubhamagarwal
Posts: 2
Joined: Wed Sep 09, 2015 4:11 pm

changing web server connection by ipaddr:port

Post by shubhamagarwal »

I have nagios NRPE/daemon installed on my server and can see the data being updates on http://localhost/nagios.

Can I chance this somewhere in the config files to a new ip address:port like http://x.x.x.x:5000/nagios

This will allow me to collect data on a different machine (if I am listening on port 5000 on x.x.x.x) on the terminal instead of the local web interface.

If so, where can the ipaddress and port be changed. The exact version of nagios core i have is nagios-4.1.0rc2
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: changing web server connection by ipaddr:port

Post by ssax »

Are you just asking how to change the port that HTTPD listens on?

You should be able to edit /etc/httpd/conf/httpd.conf and change:

Code: Select all

Listen 80
To:

Code: Select all

Listen 5000
Then restart httpd:

Code: Select all

service httpd restart
shubhamagarwal
Posts: 2
Joined: Wed Sep 09, 2015 4:11 pm

Re: changing web server connection by ipaddr:port

Post by shubhamagarwal »

I mean to say this:

nagios chooses to send its data to localhost:80.
I guess the default is 80 as i have to open my browser and go to 'http://localhost/nagios' to see my data.


I want nagios to send the data to a new ip address and port. This way i don't have to use the web interface that comes with nagios
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: changing web server connection by ipaddr:port

Post by hsmith »

shubhamagarwal wrote:I mean to say this:

nagios chooses to send its data to localhost:80.
I guess the default is 80 as i have to open my browser and go to 'http://localhost/nagios' to see my data.


I want nagios to send the data to a new ip address and port. This way i don't have to use the web interface that comes with nagios
We only support the interface that comes with Nagios. One option that you have is to use OCSP and OCHP to basically set up Nagios to do what you want it to when you get an alert. One of our employees did a good writeup here:

https://support.nagios.com/forum/viewto ... nd#p140693
Former Nagios Employee.
me.
Locked