W32 IIS W3SVC Perl Script via WMI

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

Moderators: Developers, Moderators

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

Post by DevilSun »

Make sure you haven't locked down your boxes too tight either, say for instance using IPsec and port blocking etc -- that's all I can really say, I know the script works, unfortunately your WMI isn't happy.
Guest

Post by Guest »

Devil,

About Win2000 Classes for IIS:

Win32_PerfFormattedData_W3SVC_WebService

Could you check it ? i have used wmi tool to extract this info from my
win2000 server. But i cant adapt your script to read this.

Thank you,

Al.
jdooley
Posts: 4
Joined: Fri Sep 26, 2003 2:46 pm

Post by jdooley »

FYI: On my Win2000 servers with IIS installed, the WMI class is Win32_PerfRawData_W3SVC_WebService instead of the one SunDevil is using, which I assume is the class used by Win2k3. It's frusturating that the same application on different platforms uses different locations to provide the same data.

I've also started converting the perl scripts to VBS using cscript, because on my Win2k3 server that is running Cacti they are much faster.

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

Post by DevilSun »

jdooley wrote:FYI: On my Win2000 servers with IIS installed, the WMI class is Win32_PerfRawData_W3SVC_WebService instead of the one SunDevil is using, which I assume is the class used by Win2k3. It's frusturating that the same application on different platforms uses different locations to provide the same data.

I've also started converting the perl scripts to VBS using cscript, because on my Win2k3 server that is running Cacti they are much faster.

JDooley
Now both of those are very interesting. At least the class is easy to change, and I have most of these scripts originally in .vbs form from when I ran MRTG. I'll have to try that, thanks for the performance tip...I'll see if it does the same on my end.
User avatar
dev2dev
Cacti User
Posts: 60
Joined: Thu Nov 18, 2004 5:25 am
Location: Hyderabad, India
Contact:

Post by dev2dev »

hi devilsun,

thanks for giving us cool script


I think I am slowly getting use to cacti,
after long 7 days gap I am back to cacti stuff and luckly found jtb's post and likt to http://forums.cacti.net/viewtopic.php?p=16705 which solved my problem

thanks to you both




its time now to seriously look into cacti source
Why me lord?
User avatar
dev2dev
Cacti User
Posts: 60
Joined: Thu Nov 18, 2004 5:25 am
Location: Hyderabad, India
Contact:

Post by dev2dev »

seems like the graphs are not generating, but I can get the information in command prompt
Why me lord?
africanw
Cacti User
Posts: 130
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

Post by africanw »

I guess the perl script was written to work on windows boxs. Tried to get it to work under FC3 and no joy.
LightMan
Posts: 5
Joined: Wed Apr 06, 2005 7:28 am

Post by LightMan »

Ive imported evrything, and now i getting zeros as graphics!

EDIT:
The graphics are created buth the values are -1 ??

when i run the poller, i see: error Not Enough Arguments


what can i do about it?
Attachments
quest.JPG
quest.JPG (69.15 KiB) Viewed 7601 times
Luis Gardea
Posts: 23
Joined: Wed Apr 13, 2005 4:20 pm

W32 IIS W3SVC Perl Script via WMI

Post by Luis Gardea »

hello

Do you scrip work with windows Nt and 2003?
wgillam

Post by wgillam »

I know this thread is a bit old but this was driving me nuts and I just found a solution.

I was trying to monitor IIS' Default Web Site and even though the script worked, my graphs were not appearing.

In order for the script to work, the IIS Instance Name cannot have any spaces in it. If you're trying to monitor IIS' "Default Web Site", change its instance name to "DefaultWebSite" and the script will work.

Great script DevilSun!

- b

EDIT: Or you can use single quotes (ex. 'Default Web Site')... :-?
User avatar
ichoudhury
Posts: 46
Joined: Tue May 31, 2005 8:18 am

Post by ichoudhury »

Perhaps this
http://emea.windowsitpro.com/WindowsScr ... 20138.html will show you how to determine the OS type and determine which class to use. Right now I am so lazy that I created two script instead :oops:


if somebody work on it great, otherwise I will try to do it sometime. :P
There are those who think fast, and there are others who sleep on a decision. I belong to the third group.
DatDamnZotz
Posts: 2
Joined: Thu Jul 28, 2005 12:16 pm

Post by DatDamnZotz »

Does anyone have these Templates for cacti-0.8.6f?
Alives
Cacti User
Posts: 103
Joined: Mon Jul 11, 2005 11:39 am

Post by Alives »

I am trying to monitor a host outside of my network with WMI. I have opened port 161 UDB and port 445 TCP which i found on google. I still cannot access this hosts WMI.

Any ideas?

Thanks
DatDamnZotz
Posts: 2
Joined: Thu Jul 28, 2005 12:16 pm

Post by DatDamnZotz »

Alives wrote:I am trying to monitor a host outside of my network with WMI. I have opened port 161 UDB and port 445 TCP which i found on google. I still cannot access this hosts WMI.

Any ideas?

Thanks
Sounds like you need to open up the correct ports for DCOM.
See:

http://www.fair-computer.de/download/pd ... ooting.pdf

http://msdn.microsoft.com/library/defau ... rewall.asp

and

http://support.microsoft.com/default.as ... -us;154596


In a nutshell

The firewall between your server and the Internet should be configured as follows:

Deny all incoming traffic from the Internet to your server.

Permit incoming traffic from all clients to TCP port 135 (and UDP port 135, if necessary) on your server.

Permit incoming traffic from all clients to the TCP ports (and UDP ports, if necessary) on your server in the Ports range(s) specified above.

If you are using callbacks, permit incoming traffic on all ports where the TCP connection was initiated by your server.
snoop
Posts: 12
Joined: Sun Aug 28, 2005 6:11 pm

Post by snoop »

Hey DevilSun, great script. I have one question for you, I have hundreds of sites on each web server, is it possable to monitor all of the connections, and not just one instance?

Thanks Snoop
Last edited by snoop on Fri Sep 02, 2005 6:32 am, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests