W32 IIS W3SVC Perl Script via WMI

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

Moderators: Developers, Moderators

snoop
Posts: 12
Joined: Sun Aug 28, 2005 6:11 pm

Post by snoop »

antondw wrote:hi when i try it says

D:\webroot\cacti\scripts>perl w32_iis_query_w3svc.pl webserver browse
Unable to talk to WMI for webserver.

on windows 2003?

do i have to enable wmi or something like that?

in the service wmi is started :cry:


Replace "webserver" with your server netBios name or IP address.
africanw
Cacti User
Posts: 130
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

Post by africanw »

Use _Total
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:36 AM - CACTID: Poller[0] Host[51] DS[488] SCRIPT: perl D:\Apache2\htdocs\cacti/scripts/w32_iis_query_w3svc.pl WWW01 get CurrentConnections,CurrentAnonymousUsers,CurrentNonAnonymousUsers _Total, output: U
09/20/2005 07:54:36 AM - CACTID: Poller[0] Host[51] DS[488] WARNING: Result from SCRIPT not valid. Partial Result: ...
09/20/2005 07:54:36 AM - CACTID: Poller[0] Host[51] ERROR: Empty result [192.103.183.101]: 'perl D:\Apache2\htdocs\cacti/scripts/w32_iis_query_w3svc.pl WWW01 get CurrentConnections,CurrentAnonymousUsers,CurrentNonAnonymousUsers _Total'
that_kid
Posts: 29
Joined: Fri Mar 18, 2005 10:29 pm

Post by that_kid »

I'm having the same problem with cacti on a windows machine. I can run the script from the command line and it returns values, I can even log in under my cacti user and run the script but it won't run in cacti.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please upgrade to G. Also, the new Cactid will be out in a few days that should correct your issues with scripts.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
chewy009
Posts: 38
Joined: Wed Jun 15, 2005 1:18 pm
Location: Washington State, USA

Post by chewy009 »

Does anyone have any more suggestions or info. I have upgraded to G and awaiting the new ver of cactid, but until then any ideas? My boss is pressing me on this and I could sure some assistance. Thanks all!
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please test thew win32 binary here. This is more than likely the final version.

TheWitness

http://forums.cacti.net/viewtopic.php?t=9594
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
joshm
Cacti User
Posts: 82
Joined: Mon Oct 03, 2005 1:34 pm
Location: STL

Post by joshm »

that_kid wrote:I'm having the same problem with cacti on a windows machine. I can run the script from the command line and it returns values, I can even log in under my cacti user and run the script but it won't run in cacti.
I am having the same problem. Running Cacti-g, and just installed the newest cactid program.

Log file shows
Empty result [172.17.170.210]: 'perl N:/cacti/scripts/w32_iis_query_w3svc.pl elijah get CurrentConnections,CurrentAnonymousUsers,CurrentNonAnonymousUsers _total'

Yet I can copy past that same perl line and get results. Any ideas? Cacti running on a 2k box with the other end running 2k3.
chewy009
Posts: 38
Joined: Wed Jun 15, 2005 1:18 pm
Location: Washington State, USA

Post by chewy009 »

OK, so I upgraded to the newest version of cactid and got the script to work, but now there is a new problem. I had existing graphs running for things like CPU, drive space, etc using SNMP and now they stopped graphing. Also, when I add a new host and try and create a new graph, i get this.

Data Query [SNMP - Get Mounted Partitions]

This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.

I run it in debug mode and this is what I get.

+ Running data query [8].
+ Found type = '6 '[script query].
+ Found data query XML file at 'D:\Apache2\htdocs\cacti/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'd:\php\php.exe -q D:\Apache2\htdocs\cacti\scripts\ss_host_disk.php 127.0.0.1 71 1:161:500:public:::MD5::[None] index'
+ Executing script query 'd:\php\php.exe -q D:\Apache2\htdocs\cacti\scripts\ss_host_disk.php 127.0.0.1 71 1:161:500:public:::MD5::[None] query index'
+ Executing script query 'd:\php\php.exe -q D:\Apache2\htdocs\cacti\scripts\ss_host_disk.php 127.0.0.1 71 1:161:500:public:::MD5::[None] query description'
+ Executing script query 'd:\php\php.exe -q D:\Apache2\htdocs\cacti\scripts\ss_host_disk.php 127.0.0.1 71 1:161:500:public:::MD5::[None] query sau'
+ Found data query XML file at 'D:\Apache2\htdocs\cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at 'D:\Apache2\htdocs\cacti/resource/script_server/host_disk.xml'
+ Found data query XML file at 'D:\Apache2\htdocs\cacti/resource/script_server/host_disk.xml'
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Apply the patched files at http://www.cacti.net/downloads/patches/ ... re-patched and then clear your poller_cache under System Utilities.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Any idea why when I run the script manually I don't get any data back for _Total? The webserver has multipule sites running...
[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 »

Opps... nm. The server was not in load balancer. ;)
[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 »

Ran into another issue... It appears that some of the servers are returning the following error...

"WARNING: Result from CMD not valid. Partial Result:"

It's odd that its working for most of the web servers...?
[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 »

Can someone post the changed script for w2k? It sounds like the one that is currently posted only works for w2k3??
[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]
theRENEGADEkemist
Posts: 7
Joined: Sun Oct 09, 2005 1:35 pm

Grr

Post by theRENEGADEkemist »

Ok i have a windows 2003 server and i am trying to figure out Indexes. Now i ran this command:

perl w32_proc_query_w3svc.pl mhmeeye index

as stated in an above post and got this:

Intel(R) Xeon(TM) CPU 2.80GHz
Intel(R) Xeon(TM) CPU 2.80GHz

So that is good.

However when i run this:

perl w32_iis_query_w3svc.pl mhmeeye index

I get this:

Check the computer and class name.
No information was found on the specified class!

Is there some kind of iis 6 permissions or something or something with iis wmi that i am missing? The server in question is Windows 2003 Service Pack 1 no firewall and running IIS.

Thanks!
Moses
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests