Marks Blog
  • PowerDNS Admin
  • About
  • Simple Ticket System

Why Nagios plugin check_dig fails on one host and works on another

August 10, 2012 by mark

It turns out that language/locale settings affects the output of the check_dig Nagios plugin. On one Nagios server it worked as supposed, but on another it threw;

DNS WARNING – 0,004 seconds response time (dig returned an error status)
Performance Data: time=0,003554s;;;0,000000

Running the plugin by hand on the server which worked:

DNS OK – 0.059 seconds response time (www.google.dk. 280454 IN CNAME www.google.com.)|time=0.058764s;;;0.000000

and on the one that didn’t work:

DNS OK – 0,005 seconds response time (www.google.dk. 280481 IN CNAME www.google.com.)|time=0,004693s;;;0,000000

I took me some time to spot the difference, but on the last one, comma is used instead of dot as separator in the time output. Adding LC_NUMERIC=C in front of the check command solved the problem.

Posted in: Linux & Unix Tagged: dns, nagios, plugin

Weather Station

Pages

  • About
  • PowerDNS Admin
  • Simple Ticket System

Affiliates

  • Danish Sensor Engineering
  • Mintr ApS
  • Nellemann Data

Social

  • BitBucket
  • GitHub
  • LinkedIn
  • Mastodon

Categories

  • Android
  • Automobile
  • Blog & Rantings
  • Development & Scripting
  • Grails
  • Linux & Unix
  • Mac OS X
  • Misc
  • No category
  • PowerDNS Admin
  • Puppet
  • Security Related
  • VirtualBox
  • Virtualization
  • VMware
  • Windows

Archives

  • January 2019
  • September 2017
  • January 2016
  • May 2015
  • March 2015
  • February 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • June 2014
  • January 2014
  • July 2013
  • June 2013
  • February 2013
  • January 2013
  • December 2012
  • August 2012
  • May 2012
  • October 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • March 2010
  • October 2009
  • September 2009
  • April 2009
  • January 2009
  • March 2008
  • January 2008
  • November 2007
  • January 2007
  • December 2006
  • November 2006
  • August 2006
  • June 2006
  • March 2006
  • October 2005
  • August 2005

Copyright © 2025 Marks Blog.

Mobile WordPress Theme by themehall.com