LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-12-2015, 09:34 PM   #1
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Rep: Reputation: 30
Nagios web interface not matching with some command line checks


This is the second time this has happened (but with another check) so I'm going to post here.

I just changed the DNS of one of my servers. I have a check_dns command that runs and that is failing on the web interface ONLY, but it's working fine on the command line interface.

The command is simple, just the same thing I run on the web interface:

Code:
define service{
        use                             local-service
        host_name                       theserver
        service_description             DNS
        check_command                   check_dns
        notifications_enabled           1
        }
If I run check_dns on the CLI, I get:
Code:
# ./check_dns theserver
DNS OK: 0.027 seconds response time. theserver returns the.right.ip.address|time=0.026892s;;;0.000000
But on the web interface, the same IP address fails:
Code:
Domain the.same.ip.address was not found by the server
Also, it's defined properly in the .cfg file:
Code:
define host{
        use                     linux-server            ; Name of host template to use
        host_name               theserver
        alias                   theserver.com
        address                 the.same.ipv4.address.as.before
        contact_groups          admins
        notification_period     24x7            ; Send notification out at any time - day or night
        }
Why would this be? I feel like it will "catch up" hours later but I'm running the same check! This is not making any sense to me.

Last edited by punt; 09-12-2015 at 09:44 PM.
 
Old 09-13-2015, 07:41 AM   #2
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Original Poster
Rep: Reputation: 30
Hasn't caught up yet! Anyone have any ideas why this is happening? Am I missing something?
 
Old 09-13-2015, 08:04 AM   #3
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Original Poster
Rep: Reputation: 30
This is also really strange. I finally can reproduce the error I am seeing on the command line.

Code:
# ./check_dns -H the.ip.address
Domain the.ip.address was not found by the server
But I am trying to do the DNS lookup and it's correct!
Code:
# host theserver.com
theserver.com has address the.ip.address
theserver.com mail is handled by 0 theserver.com
Wut?!

Last edited by punt; 09-13-2015 at 08:09 AM.
 
Old 09-13-2015, 08:12 AM   #4
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Original Poster
Rep: Reputation: 30
Okay, I keep responding to myself so I can help other people. I think I just need to get a PTR record. Here's hoping it set up and fixes the issue.
 
Old 09-13-2015, 08:19 AM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Poor Man's DNS?
Code:
vi /etc/hosts
and add
Code:
the.ip.address theserver.com
 
Old 09-19-2015, 02:03 AM   #6
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,806

Rep: Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207
Do you have nscd running? Then reduce positive host caching time to a little over your usual check interval.
On the command line you should check with
Code:
getent hosts <ip or hostname>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios Web Interface does not notify when nagios service is killed! learnerAlways Linux - Newbie 1 11-04-2011 12:23 AM
psql command - how do you combine 2 searches into one command line edomingox Programming 2 05-12-2011 09:12 AM
cannot find Nagios web interface (Nagios 3.2.0) and O/S = Fedora 10 gutiojj Linux - Newbie 7 02-04-2010 08:55 AM
web-interface to command line program? possible? PB0711 Programming 3 04-27-2009 10:52 AM
Command line through a web interface tangle Linux - Software 2 01-13-2005 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration