Page 1 of 1

Web Interface for VM Nagios XI - "404 Not Found"

Posted: Tue Feb 26, 2013 6:10 pm
by psyllex
I'm getting a 404 error on Nagios XI that I'm running in a 32 bit VM on Ubuntu. It is on an air gapped network. I downloaded the file, moved it onto the airgapped network, then started up the vm. I used: ifconfig to find the ip address to the vm, then went to <ip address>/nagiosxi and got the 404 error. I assume that perhaps I need to configure something although I'm not sure what.

i tried all the suggestions on this thread: http://support.nagios.com/forum/viewtop ... 7&start=20 But I couldn't get any of them to work.

I have two different inet addresses on my 'Linux machine' that is hosting the VM of CentOS. There is a vmnet1 and a vmnet8, which I believe are pointing to the same VM. I've tried them both for <ip address>/nagiosxi and neither work. I did try

Code: Select all

service httpd restart
which didn't help. I tried

Code: Select all

service nagios restart 
which restarted nagios so that's running. But when I try and run

Code: Select all

service nagiosxi restart 
nothing happens.

I'm going to redownload the VM and see if that's the problem. But if anyone has any suggestions I would appreciate them.

Re: Web Interface for VM Nagios XI - "404 Not Found"

Posted: Wed Feb 27, 2013 10:17 am
by slansing
There is no nagiosxi service, can you post the output of your apache error log after you try to connect to the Xi server's web page?

Run the following and post the output:

Code: Select all

tail -50 /var/log/httpd/access_log

Re: Web Interface for VM Nagios XI - "404 Not Found"

Posted: Wed Feb 27, 2013 12:40 pm
by psyllex
I can't post the entire thing as it's not connected to the internet but all of the lines seem to say:

Code: Select all

127.0.0.1 -- [27/Feb/2013:17:35:02 +0000] "POST /nagiosxi/backend/ HTTP/1.1" 200 807 "-" "BinGet/1.00.A (htttp://www.bin-co.com/php/scripts/load/)"
I also can't seem to get scrolling to work on my VMware Player so that's just what's on the bottom part of the screen, but it just repeats for various times.

Re: Web Interface for VM Nagios XI - "404 Not Found"

Posted: Wed Feb 27, 2013 1:01 pm
by sreinhardt
I just want to verify, you have an ubuntu machine with vmware player, that you are using as a host for nagios? Is this actually physically isolated or just on a host only network? Also you mention that the host has 2 IP addresses, you would not want to interact with the host IPs unless you have forwarded the ports onto the nagios machine through iptables or some such application. Can you use the ubuntu machine to speak to the vm guest that is nagios, on the nagios IP?

Re: Web Interface for VM Nagios XI - "404 Not Found"

Posted: Wed Feb 27, 2013 1:11 pm
by psyllex
sreinhardt wrote:I just want to verify, you have an ubuntu machine with vmware player, that you are using as a host for nagios? Is this actually physically isolated or just on a host only network? Also you mention that the host has 2 IP addresses, you would not want to interact with the host IPs unless you have forwarded the ports onto the nagios machine through iptables or some such application. Can you use the ubuntu machine to speak to the vm guest that is nagios, on the nagios IP?
Yes I have vmplayer on ubuntu machines. I am using it as a host for nagios yes. The network itself is airgapped from the rest of the world. You can only 'physically' get onto the network, no remotes. Those IP address are for the VM I assumed. They are vmnet1 and vmnet8. Again when I look into the config files it says the "Bridged" ipaddress is vmnet0. And I am not entirely sure what you mean by 'speak to vm guest ... on nagios IP'. I can't get any nagios up on any IP. What I initially saw was just Nagios core but that was left over from a previous accidental install of Nagios core on the Ubuntu machine that I hadn't wiped yet.

Re: Web Interface for VM Nagios XI - "404 Not Found"

Posted: Wed Feb 27, 2013 1:26 pm
by sreinhardt
So it sounds like what I thought was happening.. you are not reaching the nagiosxi VM, but instead the Ubuntu host machine. If you are connecting to a bridged interface, you would have a separate ip for the nagios machine from ubuntu.

Bridged interfaces - act as a separate interface from the host machine and get an ip on the host machines network
NAT interfaces - act from behind the host machines IP on an internal network, would need port forwarding from IPtables to communicate via host machines networking
Host only - essentially a nat interface but does not connect the network to give vm's internet/access to physical network

If you are assigning the nagios machines network on vmnet0 it should have it's own IP on the same physical network as the ubuntu machine.

Re: Web Interface for VM Nagios XI - "404 Not Found"

Posted: Wed Feb 27, 2013 1:29 pm
by psyllex
sreinhardt wrote:So it sounds like what I thought was happening.. you are not reaching the nagiosxi VM, but instead the Ubuntu host machine. If you are connecting to a bridged interface, you would have a separate ip for the nagios machine from ubuntu.

Bridged interfaces - act as a separate interface from the host machine and get an ip on the host machines network
NAT interfaces - act from behind the host machines IP on an internal network, would need port forwarding from IPtables to communicate via host machines networking
Host only - essentially a nat interface but does not connect the network to give vm's internet/access to physical network

If you are assigning the nagios machines network on vmnet0 it should have it's own IP on the same physical network as the ubuntu machine.
Alright I'm following you there, but I can't seem to find the vmnet0 IP address. when I look into that vmware/config file it doesn't state it. When I run ifconfig on the CentOS machine it doesn't give me an ip address for 'inet' it just says 'ethernet'. And when I get on the Ubuntu Machine it only gives me "eth0, lo, lxcbr0, vmnet1, and vmnet8". I can't seem to find vmnet0.

Also when I use

Code: Select all

 ip addr show
:
I get:

Code: Select all

1) lo <LOOPBACK, UP, LOWER_UP> mtu 16436 qdisc noqueue stat UNKNOWN
   link/loopback 00:00:00:00:00 brd 00:00:00:00:00:00
  inet 127.0.0.1/8 scope host lo

Re: Web Interface for VM Nagios XI - "404 Not Found"

Posted: Wed Feb 27, 2013 1:50 pm
by sreinhardt
You are correct, the vmx file does not store IP information, just like on a physical host only the virtual machine cares what IP it gets. It sounds like you should go to the console of the XI machine and run something like "dhclient eth0" or "dhcpd eth0" and then run "ip addr" again.

Re: Web Interface for VM Nagios XI - "404 Not Found"

Posted: Wed Feb 27, 2013 2:19 pm
by psyllex
sreinhardt wrote:You are correct, the vmx file does not store IP information, just like on a physical host only the virtual machine cares what IP it gets. It sounds like you should go to the console of the XI machine and run something like "dhclient eth0" or "dhcpd eth0" and then run "ip addr" again.
Ok....I got it up. You were correct, the VM didn't assign a ip address. I used the command:

Code: Select all

system-config-network-tui
to set up a static ip instead of using dhcp.

Now I am at the NagiosXI interface. Sweet...thanks.

Re: Web Interface for VM Nagios XI - "404 Not Found"

Posted: Wed Feb 27, 2013 2:28 pm
by sreinhardt
You are welcome! Hopefully it works better from here out!