W32 DNS Statistics Perl Script using WMI

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

royce
Cacti User
Posts: 79
Joined: Wed Dec 29, 2004 7:37 am
Location: Sweden

Post by royce »

Can't really tell - try reimport the templates..

Christofer
chewy009
Posts: 38
Joined: Wed Jun 15, 2005 1:18 pm
Location: Washington State, USA

Runs OK from cmd line but not from within Cacti

Post by chewy009 »

I have looked at all of the posts regarding this and have been unable to get this graph to display anything but NoN. If i run the script from the cmd line, it returns the proper values. All of my SNMP stuff works great. Any help would be greatly appreciated.

I am running the following:
w2k3
Apache 2.0.54
Cacti 0.8.6f
Cactid 0.8.6e
MySQL 4.1.12a
net-snmp 5.1.3.1
php 5.0.4
rrdtool 1.2.11

Here is what the cacti log shows:
09/20/2005 07:54:20 AM - CACTID: Poller[0] Host[40] DS[369] WARNING: Result from SNMP not valid. Partial Result: ...
09/20/2005 07:54:20 AM - CACTID: Poller[0] Host[40] DS[486] SCRIPT: perl D:\Apache2\htdocs\cacti/scripts/w32_dns_query_stats.pl DNS03, output: U
09/20/2005 07:54:20 AM - CACTID: Poller[0] Host[40] DS[486] WARNING: Result from SCRIPT not valid. Partial Result: ...
09/20/2005 07:54:20 AM - CACTID: Poller[0] Host[40] ERROR: Empty result [192.103.220.15]: 'perl D:\Apache2\htdocs\cacti/scripts/w32_dns_query_stats.pl DNS03'
Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Post by Phobos182 »

FYI: This graph is 2003 only, even with the Windows 2000 WMI provider. The WMI NameSpace does not include the MicrosoftDNS_Statistics Class.
[size=84][color=red] Electronic Frontier Foundation[/color]
[url]http://eff.org[/url][/size]
lottabull
Posts: 3
Joined: Fri Sep 23, 2005 3:19 pm

Still need SNMP on WMI target?

Post by lottabull »

I have a Windows 2003 DNS server without SNMP.
Running the perl script manually from the Cacti node returns valid WMI data from the DNS server.
Under cactid the only mention of that host in the log is that it didn't respond to SNMP.
So SNMP it still required even on WMI target hosts, when the only data you want to gather from them is via WMI scripts?
chewy009
Posts: 38
Joined: Wed Jun 15, 2005 1:18 pm
Location: Washington State, USA

Post by chewy009 »

I finally got this to work but I am having difficulty understanding how the graph reads. What does the "m" and "u" mean in the graph results? These numbers differ from those I get when I run the script from the command line. For instance the graph will say 33.33m for the A record while the command line shows 139154. Any help would be appreciated. :D
royce
Cacti User
Posts: 79
Joined: Wed Dec 29, 2004 7:37 am
Location: Sweden

Post by royce »

all abbrevations are maths.

u = micro (i.e. micro-requests per read-cycle - typically per second or something)

m = milli
k = kilo
M = mega
G = giga
T = Tera
etc ...

Christofer
royce
Cacti User
Posts: 79
Joined: Wed Dec 29, 2004 7:37 am
Location: Sweden

Re: Still need SNMP on WMI target?

Post by royce »

lottabull wrote:I have a Windows 2003 DNS server without SNMP.
Running the perl script manually from the Cacti node returns valid WMI data from the DNS server.
Under cactid the only mention of that host in the log is that it didn't respond to SNMP.
So SNMP it still required even on WMI target hosts, when the only data you want to gather from them is via WMI scripts?
Verify that cacti-user has access to WMI.

Christofer
chewy009
Posts: 38
Joined: Wed Jun 15, 2005 1:18 pm
Location: Washington State, USA

Post by chewy009 »

I guess I am a little confused on why I have dns stats that show up as 33.33m on the graph and 139154 when I run the script from the cmd line. Does anyone have any insight? I really need this info to be displayed in an understandable format for mgmt.
royce
Cacti User
Posts: 79
Joined: Wed Dec 29, 2004 7:37 am
Location: Sweden

Post by royce »

chewy009 wrote:I guess I am a little confused on why I have dns stats that show up as 33.33m on the graph and 139154 when I run the script from the cmd line. Does anyone have any insight? I really need this info to be displayed in an understandable format for mgmt.
Just edit the graph template and change the 'GPRINT Type' to 'REAL NUMBERS' instead of 'Normal'.

You've one GPRINT type for each Graph Item.

All of this is described in the manual ...

Christofer
DevilSun
Cacti User
Posts: 166
Joined: Fri Jul 16, 2004 1:59 pm
Location: Oregon

Post by DevilSun »

139154 is the ongoing running value that the WMI is reporting. It takes that, subtracts the previous value (something smaller), and then based off that number Cacti divides that by the number of seconds in the polling period to get an effective value. At least that's how I believe it to be working...once you get more traffic, you'll actually see more "real" values. At first that's all I saw was "u" and "m" values, but now since it's being used much more, I am getting real full values, at least on max.
Attachments
dns_srv.gif
dns_srv.gif (24.2 KiB) Viewed 10785 times
yariv_l
Posts: 22
Joined: Thu Oct 27, 2005 7:11 pm

Re: W32 DNS Statistics Perl Script using WMI

Post by yariv_l »

DevilSun wrote:Here is another Perl script for graphing DNS usage via WMI from a Windows 2003 Server box (may work with others)
hey
i work with win2k3 dns and i the graph was created but no data have any ide ?
yariv
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Will _Total work for the instance name?
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

I still am unable to get this script to work... can anyone please help? What do you use for the instance name?
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

Post by cpt_ahab »

hello jengstro

I think the _Total instance will not work since it is an instance of an exchange Server. Try the hostname of the dns server. I am trying to get it working. Will tell you how when i got it.

greeez Jan
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Someone IS reading this post! :)

Awesome thanks!!
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests