I posted the firewalls for both systems in an earlier post on this thread...do they look ok ?scottwilkerson wrote:vijilants wrote:scottwilkerson wrote:I would check the firewall on 192.168.4.3 also, as well as make sure the routing is correct and the 192.168.4.3 server can send the data back to the calling server.
Monitoring another Nagios system using the Wizard issue
Re: Monitoring another Nagios system using the Wizard issue
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitoring another Nagios system using the Wizard issue
It does.
Looking back at the original message it appears that something may be wrong with the plugin on the 5.5.1 server
Can you upload the file /usr/local/nagios/libexec/check_nagiosxiserver.php from that server so we can see if we can replicate the issue?
Looking back at the original message it appears that something may be wrong with the plugin on the 5.5.1 server
Can you upload the file /usr/local/nagios/libexec/check_nagiosxiserver.php from that server so we can see if we can replicate the issue?
Re: Monitoring another Nagios system using the Wizard issue
See attachedscottwilkerson wrote:It does.
Looking back at the original message it appears that something may be wrong with the plugin on the 5.5.1 server
Can you upload the file /usr/local/nagios/libexec/check_nagiosxiserver.php from that server so we can see if we can replicate the issue?
I've changed it to .txt and the server does not allow .php to be uploaded.
You do not have the required permissions to view the files attached to this post.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitoring another Nagios system using the Wizard issue
Can you unzip the following and replace the plugin with the attached, I have converted the line endings
If that doesn't work, please send the output of
If that doesn't work, please send the output of
Code: Select all
su nagios -c 'echo $SHELL'You do not have the required permissions to view the files attached to this post.
Re: Monitoring another Nagios system using the Wizard issue
I guess I dont have to restart anything so I did as you said and just forced a recheck but still the same
Here is the output of the command:
Here is the output of the command:
Code: Select all
[5.5.1]# su nagios -c 'echo $SHELL'
/bin/bash
[5.5.1]# -
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitoring another Nagios system using the Wizard issue
I am still hung up on the fact you could not get the curl command to work, which leads me to believe there is a routing problem between the servers
Can you run the following on both servers
also can each of the servers ping one another?
Can you run the following on both servers
Code: Select all
ip routeRe: Monitoring another Nagios system using the Wizard issue
No routing problems between the servers at all.....they can ping each-other and the ping part of the monitoring between the servers is fine.
I can also SSH between the two.
I can also SSH between the two.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitoring another Nagios system using the Wizard issue
Can you get page results with a simple curl on port 80 from the 5.5.1 server?
Code: Select all
curl -vvv "http://192.168.4.3/nagiosxi/"Re: Monitoring another Nagios system using the Wizard issue
Code: Select all
[[email protected] vij]# curl -vvv "http://192.168.4.3/nagiosxi/"
* About to connect() to 192.168.4.3 port 80 (#0)
* Trying 192.168.4.3... connected
* Connected to 192.168.4.3 (192.168.4.3) port 80 (#0)
> GET /nagiosxi/ HTTP/1.1
> User-Agent: curl/7.19.7 (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 192.168.4.3
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Tue, 04 Sep 2018 11:51:38 GMT
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16
< X-Powered-By: PHP/5.4.16
< Set-Cookie: nagiosxi=5i516bahll71d9gu4nugutf5s1; expires=Tue, 04-Sep-2018 12:21:39 GMT; path=/; HttpOnly
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< X-Frame-Options: SAMEORIGIN
< Content-Security-Policy: frame-ancestors 'self'
< Location: http://192.168.4.3/nagiosxi/login.php?redirect=/nagiosxi/index.php%3f&noauth=1
< Content-Length: 27
< Content-Type: text/html; charset=UTF-8
<
* Connection #0 to host 192.168.4.3 left intact
* Closing connection #0
Your session has timed out.[[email protected]]# Note that this works the other way around....I am able to monitor the 5.5.1 server from the 5.5.2 server. I tried your command on the 5,5,2 server against the 5.5.1 server (the one that works) and the response is identical....scottwilkerson wrote:Can you get page results with a simple curl on port 80 from the 5.5.1 server?
Code: Select all
curl -vvv "http://192.168.4.3/nagiosxi/"
Code: Select all
[5.5.2]$ curl -vvv "http://192.168.42.3/nagiosxi/"
* About to connect() to 192.168.42.3 port 80 (#0)
* Trying 192.168.42.3...
* Connected to 192.168.42.3 (192.168.42.3) port 80 (#0)
> GET /nagiosxi/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 192.168.42.3
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Tue, 04 Sep 2018 14:23:10 GMT
< Server: Apache/2.2.15 (CentOS)
< X-Powered-By: PHP/5.3.3
< Set-Cookie: nagiosxi=mpt6nppt4fp4ruortnj0rno845; expires=Tue, 04-Sep-2018 14:53:10 GMT; path=/; HttpOnly
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< X-Frame-Options: SAMEORIGIN
< Content-Security-Policy: frame-ancestors 'self'
< Location: http://192.168.42.3/nagiosxi/login.php?redirect=/nagiosxi/index.php%3f&noauth=1
< Content-Length: 27
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
* Closing connection 0
[ 5.5.2]$-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitoring another Nagios system using the Wizard issue
Ok, that is a normal redirection, lets see what you get with this
Code: Select all
curl -vvv "http://192.168.4.3/nagiosxi/api/v1/system/statusdetail"