<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:70.85pt 85.05pt 70.85pt 85.05pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Well here is what I do for graphing with Zenoss which is similar.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">On the servers I have a simple bash script:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">#!/bin/bash<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">#<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">PDNSCOUNT=`/usr/bin/rec_control $1`<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">echo $PDNSCOUNT<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">exit 0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Then create a /etc/snmp/snmpd.local.conf. This is the SNMPD config file for local server specific SNMP requests. Then using the exec command is how we get our stats. Here is my config:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">####<br>
# PowerDNS recursor stats<br>
#<br>
exec all-outqueries /opt/snmp-scripts/recursor_stats all-outqueries<br>
exec cache-entries /opt/snmp-scripts/recursor_stats cache-entries<br>
exec cache-hits /opt/snmp-scripts/recursor_stats cache-hits<br>
exec cache-misses /opt/snmp-scripts/recursor_stats cache-misses<br>
exec noerror-answers /opt/snmp-scripts/recursor_stats noerror-answers<br>
exec qa-latency /opt/snmp-scripts/recursor_stats qa-latency<br>
exec nxdomain-answers /opt/snmp-scripts/recursor_stats nxdomain-answers<br>
exec unexpected-packets /opt/snmp-scripts/recursor_stats unexpected-packets<br>
exec resource-limits /opt/snmp-scripts/recursor_stats resource-limits<br>
exec questions /opt/snmp-scripts/recursor_stats questions<br>
exec servfail-answers /opt/snmp-scripts/recursor_stats servfail-answers<br>
exec answers0-1 /opt/snmp-scripts/recursor_stats answers0-1<br>
exec answers1-10 /opt/snmp-scripts/recursor_stats answers1-10<br>
exec answers10-100 /opt/snmp-scripts/recursor_stats answers10-100<br>
exec answers100-1000 /opt/snmp-scripts/recursor_stats answers100-1000<br>
exec answers-slow /opt/snmp-scripts/recursor_stats answers-slow<br>
exec packetcache-hits /opt/snmp-scripts/recursor_stats packetcache-hits<br>
exec packetcache-misses /opt/snmp-scripts/recursor_stats packetcache-misses<br>
exec throttled-out /opt/snmp-scripts/recursor_stats throttled-out<br>
exec throttle-entries /opt/snmp-scripts/recursor_stats throttle-entries<br>
exec negcache-entries /opt/snmp-scripts/recursor_stats negcache-entries<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">A snmpget of .1.3.6.1.4.1.8072.1.3.2.1 would give you all-outqueries. .1.3.6.1.4.1.8072.1.3.2.2 would give you cache-entries.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">You can find help for OpenNMS on how to get these at
<a href="http://www.opennms.org/wiki/Net-snmp_extend_collections">www.opennms.org/wiki/Net-snmp_extend_collections</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Brad<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> pdns-users-bounces@mailman.powerdns.com [mailto:pdns-users-bounces@mailman.powerdns.com]
<b>On Behalf Of </b>Alejandro Adroher<br>
<b>Sent:</b> Thursday, December 11, 2014 7:06 AM<br>
<b>To:</b> pdns-users@mailman.powerdns.com<br>
<b>Subject:</b> [Pdns-users] Monitorize pdns & pdns-recursor with OpenNMS<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello! I'm Alex.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am responsible for migration from old version of Bind up to PowerDNS.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I´m trying to monitor my PowerDNS server (and recursor) with OpenNMS.<o:p></o:p></p>
<p class="MsoNormal">I have read a lot of webpages, I know that I can use Catci for that, but I’d like so much to do this directly on OpenNMS.<o:p></o:p></p>
<p class="MsoNormal">I´m not a very experienced Linux Administrator, by this I don´t have much experience with SNMP.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I was able to generate the statistics, create the server in OpenNMS, i have monitorized the network connection of that server but i´m not able to send those statistics to the OpenNMS server and see it on a graphic.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Can someone show me a good way to get my purpose?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance.<o:p></o:p></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
This e-mail may contain Sprint proprietary information intended for the sole use of the recipient(s). Any use by others is prohibited. If you are not the intended recipient, please contact the sender and delete all copies of the message.<br>
</font>
</body>
</html>