<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>monitor dns | /var/logs/paulooi.log</title>
	<atom:link href="https://logs.paulooi.com/tag/monitor-dns/feed" rel="self" type="application/rss+xml" />
	<link>https://logs.paulooi.com</link>
	<description>Systems Admin, Web Development and etc</description>
	<lastBuildDate>Fri, 19 Mar 2021 09:54:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>How to Enable check_dns on Nagios Monitoring System</title>
		<link>https://logs.paulooi.com/how-to-enable-check_dns-on-nagios-monitoring-system.php</link>
					<comments>https://logs.paulooi.com/how-to-enable-check_dns-on-nagios-monitoring-system.php#comments</comments>
		
		<dc:creator><![CDATA[Paul Ooi]]></dc:creator>
		<pubDate>Fri, 25 Feb 2011 15:14:12 +0000</pubDate>
				<category><![CDATA[Application]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dns monitoring]]></category>
		<category><![CDATA[monitor dns]]></category>
		<category><![CDATA[nagios]]></category>
		<guid isPermaLink="false">http://systems.takizo.com/?p=1401</guid>

					<description><![CDATA[<p>Most user who are new to Nagios doesn&#8217;t know there is a hidden plug-in called check_dns in Nagios Monitoring system. On FreeBSD server, the binary can be found at /usr/local/libexec/nagios. List the directory and you should see check_dns. check_dns usage...</p>
The post <a href="https://logs.paulooi.com/how-to-enable-check_dns-on-nagios-monitoring-system.php">How to Enable check_dns on Nagios Monitoring System</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></description>
										<content:encoded><![CDATA[<p><a href="https://logs.paulooi.com/wp-content/uploads/2011/02/nagios-logo.gif"><img decoding="async" class="alignleft size-full wp-image-1402" title="nagios-logo" src="https://logs.paulooi.com/wp-content/uploads/2011/02/nagios-logo.gif" alt="" width="64" height="64" /></a>Most user who are new to Nagios doesn&#8217;t know there is a hidden plug-in called check_dns in Nagios Monitoring system. On FreeBSD server, the binary can be found at <em>/usr/local/libexec/nagios</em>. List the directory and you should see check_dns.</p>
<p>check_dns usage is as below</p>
<pre><code>
$ ./check_dns -H host [-s server] [-a expected-address] [-A] [-t timeout] [-w warn] [-c crit]
</code></pre>
<p>Try to run the command as below and you will get the query result</p>
<pre><code>
$ ./check_dns -H systems.takizo.com -s 8.8.8.8        
DNS OK: 0.012 seconds response time. systems.takizo.com returns 70.32.103.130|time=0.011703s;;;0.000000
</code></pre>
<p><span id="more-1401"></span><br />
Sweet, that is the DNS query plugin, it does DNS query check on your DNS host server and return the query time.<br />
Here is how to activate the monitoring, add the check_dns plug-in into Nagios&#8217; commands.cfg configuration file.</p>
<p>On FreeBSD server, it&#8217;s located at /usr/local/etc/nagios/objects/commands.cfg<br />
Edit the file commands.cfg and add the line below</p>
<pre><code>
define command {
        command_name    check_dns
        command_line    $USER1$/check_dns -H $HOSTADDRESS$ -s $ARG1$
}
</code></pre>
<ul>
<li>$ARG1$ is the argument you will parse into in the configuration</li>
<li>$HOSTADDRESS$ is your host on Nagios monitoring.</li>
</ul>
<p>Next, put the line below into service check configuration file</p>
<pre><code>
define service {
        use                                  generic-service
        host_name                       your-dns-host
        service_description          Check Google.com on DNS Server
        check_command              check_dns!www.google.com
}
</code></pre>
<p>Restart your Nagios service now</p>
<pre><code>
$ /usr/local/etc/rc.d/nagios restart
</code></pre>
<p>If it&#8217;s failed, you will the red color on the monitoring status. There are a lot other plug-ins can be explore too. Have fun.</p>The post <a href="https://logs.paulooi.com/how-to-enable-check_dns-on-nagios-monitoring-system.php">How to Enable check_dns on Nagios Monitoring System</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></content:encoded>
					
					<wfw:commentRss>https://logs.paulooi.com/how-to-enable-check_dns-on-nagios-monitoring-system.php/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
