Check commands work on CLI but not on web interface

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
danielgk
Posts: 2
Joined: Sun Mar 20, 2011 1:21 am

Check commands work on CLI but not on web interface

Post by danielgk »

I've set up Nagios on an IBM x3250 M3 running ubuntu 10.04 LTS and I'm able to log in and receive alerts. However, I can't get checks for any remote machines to pass on the web interface. For example, running this command on a terminal works fine:

Code: Select all

nagios@ubuntu:/usr/local/nagios/libexec$ ./check_ping -H 172.16.96.65 -w 80,10% -c 100,20% -p 4
PING OK - Packet loss = 0%, RTA = 3.33 ms|rta=3.326000ms;80.000000;100.000000;0.000000 pl=0%;10;20;0
On the web interface, all I get back is the following:
CRITICAL - Packet Filtered (192.168.1.65)

I can execute check_snmp on the CLI targeting machines which I've configured SNMP on and that works fine:

Code: Select all

nagios@ubuntu:/usr/local/nagios/libexec$ ./check_snmp -H 172.16.96.65 -o sysUpTime.0
SNMP OK - Timeticks: (378560625) 43 days, 19:33:26.25 | 
On the web interface, I get back this:\
External command error: Timeout: No Response from 192.168.1.65:161.

I have tried recreating the users and recompiling nagios since I figured this might be a user permissions issue for the nagios user. That did not help, though. I've looked all over google but could not find anyone else with the same problem. Usually, when it works on the command line interface, it works on the web browser interface. Does anyone have any ideas?
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Check commands work on CLI but not on web interface

Post by tonyyarusso »

What is the IP address of your Nagios system?

What resides at 192.168.1.65?

What does your network have in terms of any proxies, firewalls, etc. that may be between you and the target systems?

Please also paste your service definition for that ping check you just showed on the CLI.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
danielgk
Posts: 2
Joined: Sun Mar 20, 2011 1:21 am

Re: Check commands work on CLI but not on web interface

Post by danielgk »

I actually realized that I had an IP address issue right after I submitted my original post. Nothing resides at 192.168.1.65, so I feel pretty silly for overlooking that.

I think my initial problem was not passing a -m when creating the nagios user, so no home directory was created. When I recreated the user properly and reinstalled nagios, I overwrote my config files and put in the wrong IP addresses when I rewrote this host definition.

Its working fine right now.
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Check commands work on CLI but not on web interface

Post by tonyyarusso »

Ah, well that's simple enough. Glad you figured it out.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
Locked