Exchange Perl Scripts via WMI
Moderators: Developers, Moderators
...
Funny. I changed the script back from
my $Win32_Class = "Win32_PerfFormattedData_MSExchangeIS_MSExchangeISPublic";
to
my $Win32_Class = "Win32_PerfFormattedData_MSExchangeIS_MSExchangeISMailbox";
and it seems to work. So you dont have to change this line after you installed Servicepack2. If i look into wmi i could find both classes. Public and Mailbox.
dunno.
Happy that it works
Jan
my $Win32_Class = "Win32_PerfFormattedData_MSExchangeIS_MSExchangeISPublic";
to
my $Win32_Class = "Win32_PerfFormattedData_MSExchangeIS_MSExchangeISMailbox";
and it seems to work. So you dont have to change this line after you installed Servicepack2. If i look into wmi i could find both classes. Public and Mailbox.
dunno.
Happy that it works
Jan
Re: Wmi on a different domain
This was in a previous post but i didnt see a response...
I need a monitor an exchange server that is on a different domain.
I was wondering if anyone had information on how i could update this script to all for domain / username / password
I need a monitor an exchange server that is on a different domain.
I was wondering if anyone had information on how i could update this script to all for domain / username / password
Brettw wrote:Hi All,
strComputer = "x.x.x.x"
strDomain = "mydomain"
strUser = "myusername"
strPassword = "mywp"
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer(strComputer,"root\cimv2",strUser,strPassword,"MS_409","ntlmdomain:" + strDomain)
Set colSwbemObjectSet = objSWbemServices.ExecQuery("Select * From Win32_Process")
For Each objProcess in colSWbemObjectSet
Wscript.Echo "Process Name: " & objProcess.Name
Next
Any help would be great.
Cheers
Brett
I've managed to re-create the Perl script for those running Cacti on Linux:
http://forums.cacti.net/viewtopic.php?t=11589
http://forums.cacti.net/viewtopic.php?t=11589
¬¬ZeRoY¬¬
-
- Posts: 4
- Joined: Mon Aug 29, 2005 1:23 pm
Able to run scripts from command but cactid has errors
I'm am able to run the exchange scripts from the command line okay but when my poller runs I get ...
01/25/2006 11:07:26 AM - CACTID: Poller[0] Host[18] ERROR: Empty result [10.100.0.20]: 'perl M:/Apache/Apache2/htdocs/scripts/w32_exch_query_isstats.pl 10.100.0.20 get ActiveUserCount,UserCount'
01/25/2006 11:07:26 AM - CACTID: Poller[0] Host[18] DS[270] WARNING: Result from SCRIPT not valid. Partial Result: ...
Any ideas?
01/25/2006 11:07:26 AM - CACTID: Poller[0] Host[18] ERROR: Empty result [10.100.0.20]: 'perl M:/Apache/Apache2/htdocs/scripts/w32_exch_query_isstats.pl 10.100.0.20 get ActiveUserCount,UserCount'
01/25/2006 11:07:26 AM - CACTID: Poller[0] Host[18] DS[270] WARNING: Result from SCRIPT not valid. Partial Result: ...
Any ideas?
My Exchange Connections graph only seems to display Active Users and does not include Users. I can run the script from the command line and get the data, it just doesn't make it's way to the graph. Any ideas?
/var/www/localhost/htdocs/cacti/scripts $ perl exchange_users_script.pl 10.x.x.x
UserCount:519 ActiveUserCount:339 ActiveConn:1036
/var/www/localhost/htdocs/cacti/scripts $ perl exchange_users_script.pl 10.x.x.x
UserCount:519 ActiveUserCount:339 ActiveConn:1036
- Attachments
-
- exchange-connections.JPG (27.69 KiB) Viewed 7261 times
-
- Posts: 4
- Joined: Tue May 04, 2004 7:57 am
I think it is because the in the data template te maximum limit for Active users is 100. So change it to 0, delete the old RRA and try again.My Exchange Connections graph only seems to display Active Users and does not include Users. I can run the script from the command line and get the data, it just doesn't make it's way to the graph. Any ideas?
I believe the all the templates could use some tuning. Like for instances tying the datasource somehow to the hostname. Its kind of weird you have to configure the host in the datasource.
Rene
Re: Able to run scripts from command but cactid has errors
Same problem. I can run the script from a command line just fine but if I try to run it from the poller I get the error above. My question is, what account is running this script? The account used for the scheduled tasks? Or the iusr_cacti/iwam_cacti account on the local computer?kevinsonney wrote:I'm am able to run the exchange scripts from the command line okay but when my poller runs I get ...
01/25/2006 11:07:26 AM - CACTID: Poller[0] Host[18] ERROR: Empty result [10.100.0.20]: 'perl M:/Apache/Apache2/htdocs/scripts/w32_exch_query_isstats.pl 10.100.0.20 get ActiveUserCount,UserCount'
01/25/2006 11:07:26 AM - CACTID: Poller[0] Host[18] DS[270] WARNING: Result from SCRIPT not valid. Partial Result: ...
Any ideas?
I'm looking for a way to correct this issue... Not too sure how cause I'm a noob but I will look at the boards more.
Thanks.
David.
Re: Able to run scripts from command but cactid has errors
FreRange wrote:Same problem. I can run the script from a command line just fine but if I try to run it from the poller I get the error above. My question is, what account is running this script? The account used for the scheduled tasks? Or the iusr_cacti/iwam_cacti account on the local computer?kevinsonney wrote:I'm am able to run the exchange scripts from the command line okay but when my poller runs I get ...
01/25/2006 11:07:26 AM - CACTID: Poller[0] Host[18] ERROR: Empty result [10.100.0.20]: 'perl M:/Apache/Apache2/htdocs/scripts/w32_exch_query_isstats.pl 10.100.0.20 get ActiveUserCount,UserCount'
01/25/2006 11:07:26 AM - CACTID: Poller[0] Host[18] DS[270] WARNING: Result from SCRIPT not valid. Partial Result: ...
Any ideas?
I'm looking for a way to correct this issue... Not too sure how cause I'm a noob but I will look at the boards more.
Thanks.
David.
Ahhhh crap... I fixed it. With the new version of cactid I had to include the complete path to my perl.exe for this script to work. I went to the Data input Methods and changed the Exchange input string from perl <path_cacti>/scripts..... to c:/perl c:/cacti/scripts....... It all seems to work now.
I did this because of the cactid post http://www.cacti.net/cactid_download.php
It states that shell environment's PATH will no longer work. OY!
- briealeida
- Posts: 19
- Joined: Mon Jul 02, 2007 12:15 pm
- Location: a pebble
- Contact:
Who is online
Users browsing this forum: No registered users and 1 guest