DNS - snmp

luzik

04-08-2004 07:55:47

I have some DNS query in snmp tests .. can somebody give me a hint how to get script witch snmpd uses to feed, and please paste here cut of snmpd.conf

silfreed

04-08-2004 09:06:40

What scripts do you have? Just ones that parse out success/failures from the results of 'rndc stats'?
If you have a script that just returns this value, you can add it to snmpd.conf with the 'exec' parameter. Either run 'man snmpd.conf' or look into your snmpd.conf where it goes over that; it'll probably be easier that way.

-Doug

luzik

04-08-2004 09:44:30

I don't have any script . i just want it )
Do you have
DNS - A Records enterprises.ucdavis.extTable.extEntry.extOutput.1 <Edit> <Delete>
DNS - ANY Records enterprises.ucdavis.extTable.extEntry.extOutput.5 <Edit> <Delete>
DNS - CNAME Records enterprises.ucdavis.extTable.extEntry.extOutput.4 <Edit> <Delete>
DNS - MX Records enterprises.ucdavis.extTable.extEntry.extOutput.3 <Edit> <Delete>
DNS - PTR Records enterprises.ucdavis.extTable.extEntry.extOutput.2 <Edit> <Delete>

in your snmp test?
http//yoursite.com/netmrg/tests_snmp.php

i have those and don't have script witch can fetch info from dns serwer and put it in my snmpd

silfreed

04-08-2004 09:58:17

No, we don't do this through SNMP. These stats aren't available directly from Bind, they have to be gathered from the query log. We combine the statistics into a mysql database, and then query that for A, MX, PTR, etc.
Look in the contrib directory; the gathering script is in there, as well as a (very) basic readme file. Look over that, and let me know what questions you have.
Of course, I'm assuming Bind for everything here; and more than that, Bind 9.x. If you have something other than that, our contrib script might not work.

-Doug

simonraven

14-08-2004 09:09:44

hi,

i just installed netnrg, having looked around at various frontends to snmp and rrdtool, and i found this to be the easiest to grasp and it even helped me understand rrdtool a bit better. but this isn't why i'm posting now (though thanks for writing the s/w much appeciated ) ).

ok, now that i have stats being gathered, how do i include it in the graphs? do i have to now construct an SQL SELECT argument or something? BTW, i didn't see the README that was referred to in an earlier post, unless you mean running perldoc on the script - already read [b87fab39f00]that[/b87fab39f00] ).

silfreed

14-08-2004 09:13:06

Right, you need to build the SQL Query, but since I've already done that, I'll try to put together a README and put it in that directory; I'll let you know when I've got it together.

-Doug

simonraven

14-08-2004 09:17:54

[quotebb9edf58cc="silfreed"]Right, you need to build the SQL Query, but since I've already done that, I'll try to put together a README and put it in that directory; I'll let you know when I've got it together.

-Doug[/quotebb9edf58cc]

ok, cool thanks a lot )

silfreed

14-08-2004 09:29:10

Okay, I basically just copied the maillog stats readme file, but it has been modified with a bit more information relevant to the bind stats.
Check out the README (that's a link).

-Doug

gpreston

13-01-2005 10:48:11

[quoted647c0742f="silfreed"]Look in the contrib directory; the gathering script is in there, as well as a (very) basic readme file. Look over that, and let me know what questions you have.
Of course, I'm assuming Bind for everything here; and more than that, Bind 9.x. If you have something other than that, our contrib script might not work.

-Doug[/quoted647c0742f]

Hey there. I'm using RH9 with BIND 9.2.1 and I've gone through the README and set everything up. When I try to run the program, it fails with the following
[quoted647c0742f]Global symbol "@h" requires explicit package name at /usr/local/libexec/netmrg/bindstats/dnsstats line 33.
syntax error at /usr/local/libexec/netmrg/bindstats/dnsstats line 36, near "}"
Execution of /usr/local/libexec/netmrg/bindstats/dnsstats aborted due to compilation errors.[/quoted647c0742f]

Any ideas? Line 33 is where the password for the database is stored, with no reference to "@h", so I am at a loss right now.

Edit Nevermind, I just realized that the $ in my password was screwing up the script.

silfreed

13-01-2005 11:22:57

Does your password include an '@' symbol? In perl, you have to escape these (\@) or include the entire password in single quotes instead of double-quotes.

-Doug