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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

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

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

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

Post 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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

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

Post 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?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

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

Post 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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

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

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

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

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

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

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

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

Post 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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

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

Post by sreinhardt »

You are welcome! Hopefully it works better from here out!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked