LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-24-2012, 08:25 AM   #1
Cheerz
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Rep: Reputation: Disabled
BIND 9 Statistics and SNMP


Hello Everyone

Please can someone assist me with regards to providing the statistics from BIND using SNMP?

I have followed a great article from the website http://www.packetmischief.ca/monitoring-bind9 and got everything working fine, but there is still one problem that I have.

The output from the SNMP query is in a STRING format. Is there any way in which I can get the values as INTEGER values?

snmpwalk -Os -v 1 -c saomon localhost .1.3.6.1.4.1.2021.8.1
extIndex.1 = INTEGER: 1
extNames.1 = STRING: bind9-requests-query
extCommand.1 = STRING: /usr/local/sbin/bind96-stats-get.sh
extResult.1 = INTEGER: 0
extOutput.1 = STRING: 252269
extErrFix.1 = INTEGER: noError(0)

snmpwalk -Os -v 1 -c saomon localhost .1.3.6.1.4.1.2021.8.1
extIndex.1 = INTEGER: 1
extNames.1 = STRING: bind9-requests-query
extCommand.1 = STRING: /usr/local/sbin/bind96-stats-get.sh
extResult.1 = INTEGER: 252269
extOutput.1 = STRING: 0
extErrFix.1 = INTEGER: noError(0)

The script bind96-stats-get.sh is as follows:

#!/bin/sh
db="/tmp/named.stats"

if [ -z "$1" ]; then
exit
fi

grep $1= $db | cut -d= -f2

I had a look at some of the previous LQ's, but did not find a solution.

Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Configuring Custom SNMP MIB to Default DELL OMSA SNMP prabakar4all Linux - Server 0 07-29-2011 11:44 AM
Net-SNMP writing a Subagent - snmp.conf Unknown token: master AustinMarton Programming 0 12-16-2008 07:34 PM
SNMP master & SNMP client Script for system monitoring ratul_11 Programming 1 12-24-2007 05:32 AM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:01 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