W32 DNS Statistics Perl Script using WMI
Moderators: Developers, Moderators
W32 DNS Statistics Perl Script using WMI
Here is another Perl script for graphing DNS usage via WMI from a Windows 2003 Server box (may work with others)
- Attachments
-
- cacti_data_template_dns_queries.xml
- Data Template
- (16.93 KiB) Downloaded 2546 times
-
- cacti_graph_template_dns_dns_queries.xml
- Graph Template
- (55.23 KiB) Downloaded 3012 times
-
- w32_dns_query_stats.pl.txt
- Perl Script
- (3.86 KiB) Downloaded 4223 times
Last edited by DevilSun on Fri Jul 23, 2004 12:40 pm, edited 1 time in total.
I don't believe it can...Microsoft is finally "coming around" and realizing that people use program statistics, and now they're starting to keep track of these statistics and use them themselves...but it seems only newer versions have these types of good statistics.
There might be some DNS statistics in Win2000 somewhere, but I doubt it'll be anything like what they expose in Win2003.
There might be some DNS statistics in Win2000 somewhere, but I doubt it'll be anything like what they expose in Win2003.
graph these on a linux cacti box
so this only works when running cacti on windows. What if i want to graph dns queries on a remote win2003 dns server from a cacti box runnig linux ?
SOL ?
SOL ?
http://msdn.microsoft.com/library/defau ... erview.asp
here is the link to work with the script
but, I still have the problem,
i am qurieng from win2k3 to win2k server which is my dns server
I have searched for the classes using wmi stuio (comes with the wmi tools , available at microsoft.com)
didnt find the namespace MicrosoftDNS
is there any steps I am missing?
here is the link to work with the script
but, I still have the problem,
i am qurieng from win2k3 to win2k server which is my dns server
I have searched for the classes using wmi stuio (comes with the wmi tools , available at microsoft.com)
didnt find the namespace MicrosoftDNS
is there any steps I am missing?
Why me lord?
-
- Posts: 37
- Joined: Fri Feb 11, 2005 5:32 pm
Newbie - Can't get this to work
Running the .pl script from the command line works (test DNS server box on being queried so really no value expected):
C:\Inetpub\wwwroot\cacti\scripts>w32_dns_query_stats.pl myserver
Total:59 Notify:0 Update:0 TKeyNego:0 Standard:59 A:59 NS:0 SOA:0 MX:0 PTR:0 SRV:0 ALL:0 IXFR:0 AXFR:0 Other:0
But I can't get any data in the graphs. Here is the Cacti Log:
02/11/2005 02:27:29 PM - SYSTEM STATS: Time: 3.3612 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 2, Hosts/Process: 2
02/11/2005 02:27:29 PM - POLLER: Poller[0] CACTI2RRD: c:\rrdtool\rrdtool.exe update c:\Inetpub\wwwroot\cacti\rra\myserver_total_connections_22.rrd --template 1108160846:U
02/11/2005 02:27:29 PM - POLLER: Poller[0] CACTI2RRD: c:\rrdtool\rrdtool.exe update c:\Inetpub\wwwroot\cacti\rra\myserver_total_queries_21.rrd --template 1108160846:U
02/11/2005 02:27:29 PM - CMDPHP: Poller[0] Time: 2.7863 s, Theads: N/A, Hosts: 1
02/11/2005 02:27:29 PM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
02/11/2005 02:27:29 PM - CMDPHP: Poller[0] Host[17] CMD: perl lt;path_cactigt;/scripts/w32_iis_query_w3svc.pl lt;hostnamegt; get CurrentConnections,CurrentAnonymousUsers,CurrentNonAnonymousUsers lt;instancegt;, output: U
02/11/2005 02:27:29 PM - CMDPHP: Poller[0] Host[17] WARNING: Result from CMD not valid. Partial Result:
02/11/2005 02:27:29 PM - CMDPHP: Poller[0] Host[17] CMD: perl lt;path_cactigt;/scripts/w32_dns_query_stats.pl lt;hostnamegt;, output: U
02/11/2005 02:27:29 PM - CMDPHP: Poller[0] Host[17] WARNING: Result from CMD not valid. Partial Result:
02/11/2005 02:27:27 PM - CMDPHP: Poller[0] Host[17] RECACHE: Processing 3 items in the auto reindex cache for 'myserver'.
02/11/2005 02:27:27 PM - CMDPHP: Poller[0] Host[17] SNMP: Host responded to SNMP
02/11/2005 02:27:27 PM - CMDPHP: Poller[0] PHP Script Server Started Properly
02/11/2005 02:27:27 PM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cmd
02/11/2005 02:27:27 PM - PHPSVR: Poller[0] DEBUG: FILENM: c:\Inetpub\wwwroot\cacti\script_server.php
02/11/2005 02:27:27 PM - PHPSVR: Poller[0] DEBUG: DIRNAM: c:/inetpub/wwwroot/cacti
02/11/2005 02:27:27 PM - PHPSVR: Poller[0] DEBUG: GETCWD: c:/inetpub/wwwroot/cacti/scripts
02/11/2005 02:27:27 PM - PHPSVR: Poller[0] DEBUG: SERVER: cmd
02/11/2005 02:27:26 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\php\php-win.exe, ARGS: -q c:\inetpub\wwwroot\cacti/cmd.php 0 17]
Also when manuall run poller.php I get an "ERROR: Not enough arguments"
Attached is a screenshot of an error I get with viewing the details of the Data query. "Notice: Undefined variable: array_field_names in c:\inetpub\wwwroot\cacti\data_input.php on line 217
I'm also having problems getting downloaded scripts to work in general. All of them exibit this same behavior.
IIS6.0
PHP 5.0.3
rrdtool 1.0.49
mysql 4.1.9
cacti 0.8.6c
Any help is greatly appreciated.
thnx,
kevin_taco
C:\Inetpub\wwwroot\cacti\scripts>w32_dns_query_stats.pl myserver
Total:59 Notify:0 Update:0 TKeyNego:0 Standard:59 A:59 NS:0 SOA:0 MX:0 PTR:0 SRV:0 ALL:0 IXFR:0 AXFR:0 Other:0
But I can't get any data in the graphs. Here is the Cacti Log:
02/11/2005 02:27:29 PM - SYSTEM STATS: Time: 3.3612 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 2, Hosts/Process: 2
02/11/2005 02:27:29 PM - POLLER: Poller[0] CACTI2RRD: c:\rrdtool\rrdtool.exe update c:\Inetpub\wwwroot\cacti\rra\myserver_total_connections_22.rrd --template 1108160846:U
02/11/2005 02:27:29 PM - POLLER: Poller[0] CACTI2RRD: c:\rrdtool\rrdtool.exe update c:\Inetpub\wwwroot\cacti\rra\myserver_total_queries_21.rrd --template 1108160846:U
02/11/2005 02:27:29 PM - CMDPHP: Poller[0] Time: 2.7863 s, Theads: N/A, Hosts: 1
02/11/2005 02:27:29 PM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
02/11/2005 02:27:29 PM - CMDPHP: Poller[0] Host[17] CMD: perl lt;path_cactigt;/scripts/w32_iis_query_w3svc.pl lt;hostnamegt; get CurrentConnections,CurrentAnonymousUsers,CurrentNonAnonymousUsers lt;instancegt;, output: U
02/11/2005 02:27:29 PM - CMDPHP: Poller[0] Host[17] WARNING: Result from CMD not valid. Partial Result:
02/11/2005 02:27:29 PM - CMDPHP: Poller[0] Host[17] CMD: perl lt;path_cactigt;/scripts/w32_dns_query_stats.pl lt;hostnamegt;, output: U
02/11/2005 02:27:29 PM - CMDPHP: Poller[0] Host[17] WARNING: Result from CMD not valid. Partial Result:
02/11/2005 02:27:27 PM - CMDPHP: Poller[0] Host[17] RECACHE: Processing 3 items in the auto reindex cache for 'myserver'.
02/11/2005 02:27:27 PM - CMDPHP: Poller[0] Host[17] SNMP: Host responded to SNMP
02/11/2005 02:27:27 PM - CMDPHP: Poller[0] PHP Script Server Started Properly
02/11/2005 02:27:27 PM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cmd
02/11/2005 02:27:27 PM - PHPSVR: Poller[0] DEBUG: FILENM: c:\Inetpub\wwwroot\cacti\script_server.php
02/11/2005 02:27:27 PM - PHPSVR: Poller[0] DEBUG: DIRNAM: c:/inetpub/wwwroot/cacti
02/11/2005 02:27:27 PM - PHPSVR: Poller[0] DEBUG: GETCWD: c:/inetpub/wwwroot/cacti/scripts
02/11/2005 02:27:27 PM - PHPSVR: Poller[0] DEBUG: SERVER: cmd
02/11/2005 02:27:26 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\php\php-win.exe, ARGS: -q c:\inetpub\wwwroot\cacti/cmd.php 0 17]
Also when manuall run poller.php I get an "ERROR: Not enough arguments"
Attached is a screenshot of an error I get with viewing the details of the Data query. "Notice: Undefined variable: array_field_names in c:\inetpub\wwwroot\cacti\data_input.php on line 217
I'm also having problems getting downloaded scripts to work in general. All of them exibit this same behavior.
IIS6.0
PHP 5.0.3
rrdtool 1.0.49
mysql 4.1.9
cacti 0.8.6c
Any help is greatly appreciated.
thnx,
kevin_taco
- Attachments
-
- ss.JPG (82.75 KiB) Viewed 42210 times
-
- Posts: 37
- Joined: Fri Feb 11, 2005 5:32 pm
-
- Posts: 37
- Joined: Fri Feb 11, 2005 5:32 pm
Who is online
Users browsing this forum: No registered users and 1 guest