Exchange Perl Scripts via WMI

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

Moderators: Developers, Moderators

User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

hello

Post by cpt_ahab »

.... Thanks for you FAQ. I checked all points, but still dont have a connection to wmi. The cactiuser has the all needed permissions. Firewall is turned off.

Code: Select all

E:\inetpub\mrtgroot\cacti\scripts>w32_exch_query_isstats.pl 192.168.10.236 get ActiveUserCount

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

The funny thing is, that if i run the script i see securitylogs on the exchangeserver with the cactiuser signing on and off, but no errors.

greez jan
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

I have WMI working and can pull some data without a problem.

Please forgive my newbness here... but how do you know what your instance name is? When adding the graph it asks you for the instance name and I have been unable to locate it...
[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

Solved...

Post by cpt_ahab »

I tried wmiadap /f and it helped me also on my exchange 2003 SP1 BE Servers. Wohoo getting normal values now.
So all try wmiadap /f and restart the wmi service and it will work.

greez and thanks

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

Post by jengstro »

wmiadap /f does not exist
[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 »

the instance is "_Total" without quotes.
if you look a few posts earlier you will see that this question was already answered.
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Yeah I noticed that but wanted to verify since I'm not getting any data using the value.
[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 »

what do you mean with wmiadap does not exists..?
you have to run it on the exchangeserver you want to monitor.
in the commandline type wmiadap /f...

fast answer.... ;D
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Yes. I ran the command from the command line but it said that no such command exsists. I verified that WMI is installed and ran a search of the entire drive without any hits. Perhaps this command only works with Windows 2003 Server?
[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 »

hmm thats true maybe. I dont know because we only have 2003 Servers.
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Running the script...

Code: Select all

perl d:\cacti\scripts\w32_exch_query_mailboxstats.pl <ip> get SendQueueSize,RecieveQueueSize,MessagesSentPermin,Messages
SubmittedPermin,MessagesDeliveredPermin _Total
...from the commend line returns the following...
Check the computer and class name.
No information was found on the specified class!
Please help... I feel so close to getting this working...
[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
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

With out researching what WMI classes are present on each OS... that error message simply means that WMI class for Exchange isn't present. If it should be for your OS / services, then you need to read how to fix WMI.
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

Post by cpt_ahab »

So this will do the same for Win2000 Boxes, like wmiadap /f does for Win 2003 Boxes.
Other Versions of Windows
Only Windows Server 2003, Service Pack 1 and Windows XP, Service Pack 2 include built-in commands for rebuilding the WMI Repository. On other versions of Windows you can rebuild the Repository by doing the following:

1.
Stop the WMI service. (Type net stop winmgmt) from the command prompt.)

2.
Rename the folder %windir%\System32\Wbem\Repository. (For example, %windir%\System32\Wbem\Repository_bad.) By renaming the folder the operating system will no longer be able to find the WMI Repository. As a result, it will automatically rebuild the Repository the next time it needs to access WMI information.

3.
Restart the WMI service (net start winmgmt) and try your script again.
greez ahab

hope it helps you
CharlieB.
Posts: 30
Joined: Mon Nov 14, 2005 1:06 pm

Post by CharlieB. »

I am in the same boat as far as Exchange returning:

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

I am running Win2k with Exch 2003 SP1.
I have run all the Microsoft suggestions in the link provided by BSOD2600. I have rebuilt WMI manually and using the automatic method but still nothing returned by any of these graphs. My WMI is functioning because i graph other OS related things and Exchange does use WMI for the "Exchange Management Service" cuz it barked when i rebuilt without it's .mof files complied.

It would seem to me that the Instance name would have to be unique for each install? Like SQL has a unique instance name for each install.?

Else i am completly stuck. I have not been able to get anything back from my Exchange installation. :-(
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

Exchange 2003 Service Pack 2

Post by cpt_ahab »

Hello Again. Our Exchange Servers are updated to SP2 rightnow.
After the Update the w32_exch_query_mailboxstats.pl skript is returning no valid data .
i changed the $Win32_Class to

my $Win32_Class = "Win32_PerfFormattedData_MSExchangeIS_MSExchangeISPublic";

but still getting only zeros. The Skript seems to work when i run it manually but only returning zeros.
If i run wmiadap /f i get errors in the event log. 0x80041002 and 80041009
could not find some classes an so on.
Rebooted the server no success. :C
restarted wmi service
I read posts of useres having the same probs. How did you solved them.. ?

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

Post by jengstro »

I have not been able to get the script to work yet...
[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 1 guest