Exchange Perl Scripts via WMI
Moderators: Developers, Moderators
Linux Exchange Graphs
Can anyone tell me if these can work on Linux? If i'm using NSClient on my windows boxes, will it work? Im get nan on all my graphs.
Micah
Micah
Exchange Graphs running Cacti on Linux
I am having trouble on figuring out exactly how to make the Exchange graphs work from Linux box. I am running Nagios and NSClient on my exchange server. But am not sure how to get the graphs to work in cacti. I tried importing the Exchange - Filtering Statistics xml template but graph all show NA. Tried other templates and get the same. I am retarded thanks.
Micah
Micah
-
- Posts: 3
- Joined: Thu Apr 28, 2005 3:00 pm
sorry for the little kick ; )
was busy with some of the exchange templates
after some hours a had the connection template working
but w32_exch_query_isstats.pl is after 5 hours still not working
when i run the script from cl:
perl c:\Inetpub\wwwroot\cacti\scripts\w32_exch_query_mailboxstats.pl <ip> get SendQueueSize,ReceiveQueueSize,MessagesSe
ntPermin,MessagesSubmittedPermin,MessagesDeliveredPermin <instance>
ip is no problem for me, but the instance namen? do they mean the store name?
when it is the store name I get the following result
Check the computer and class name.
No information was found on the specified class!
has somebody this script working or has an idea what to do with the error
was busy with some of the exchange templates
after some hours a had the connection template working
but w32_exch_query_isstats.pl is after 5 hours still not working
when i run the script from cl:
perl c:\Inetpub\wwwroot\cacti\scripts\w32_exch_query_mailboxstats.pl <ip> get SendQueueSize,ReceiveQueueSize,MessagesSe
ntPermin,MessagesSubmittedPermin,MessagesDeliveredPermin <instance>
ip is no problem for me, but the instance namen? do they mean the store name?
when it is the store name I get the following result
Check the computer and class name.
No information was found on the specified class!
has somebody this script working or has an idea what to do with the error
Wmi on a different domain
Hi All,
I have the scripts working fine for our local domain however we have another domain which has an exch server on it that i would like to monitor.
There is a way that you can connect to WMI using with a username and pw however im not sure how or where to put it in the perl scripts..
The normal code for example would be like the below, excuse the average coding
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 have the scripts working fine for our local domain however we have another domain which has an exch server on it that i would like to monitor.
There is a way that you can connect to WMI using with a username and pw however im not sure how or where to put it in the perl scripts..
The normal code for example would be like the below, excuse the average coding
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
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
Any new info?
Hullo there. I've seen one or two people ask how to get this working on Linux but I havent seen an answer posted yet. I have the NSClient installed on my Exchange 2k3 box but I'm still having no luck. Can anyone help?
Thanks!
-Chris
Thanks!
-Chris
User Count hitting 100 and stopping
Hi All,
Ive just installed the scripts and all seem to be working well however on the Exchange Users graph it seems to peak at 100 then doesnt graph?
Any ideas would be welcome
Ive just installed the scripts and all seem to be working well however on the Exchange Users graph it seems to peak at 100 then doesnt graph?
Any ideas would be welcome
- Attachments
-
- connections.GIF (13.77 KiB) Viewed 10368 times
Officially broken. Graph Template is not parsing the output correctly.
[CACTI LOG]
08/08/2005 10:20:15 AM - CACTID: Poller[0] Host[30] ERROR: Empty result [exchange2003.tasconline.com]: 'perl C:\cacti\cacti-0.8.6f\scripts\w32_exch_query_mailboxstats.pl exchange2003 get SendQueueSize,ReceiveQueueSize,MessagesSentPermin,MessagesSubmittedPermin,MessagesDeliveredPermin _Total'
[COMMAND LINE OUTPUT]
C:\cacti\rrdtool>perl C:\cacti\cacti-0.8.6f\scripts\w32_exch_query_mailboxstats.pl exchange2003 get sendQueueSize,ReceiveQueueSize,MessagesSentPermin,MessagesSubmittedPermin,MessagesDeliveredPermin _Total
SendQueueSize:0 ReceiveQueueSize:0 MessagesSentPermin:13 MessagesSubmittedPermin
:12 MessagesDeliveredPermin:16
[CACTI LOG]
08/08/2005 10:20:15 AM - CACTID: Poller[0] Host[30] ERROR: Empty result [exchange2003.tasconline.com]: 'perl C:\cacti\cacti-0.8.6f\scripts\w32_exch_query_mailboxstats.pl exchange2003 get SendQueueSize,ReceiveQueueSize,MessagesSentPermin,MessagesSubmittedPermin,MessagesDeliveredPermin _Total'
[COMMAND LINE OUTPUT]
C:\cacti\rrdtool>perl C:\cacti\cacti-0.8.6f\scripts\w32_exch_query_mailboxstats.pl exchange2003 get sendQueueSize,ReceiveQueueSize,MessagesSentPermin,MessagesSubmittedPermin,MessagesDeliveredPermin _Total
SendQueueSize:0 ReceiveQueueSize:0 MessagesSentPermin:13 MessagesSubmittedPermin
:12 MessagesDeliveredPermin:16
Re: Exchange Graphs running Cacti on Linux
I hacked up a quick script to query the NSClient on Windows through the check_nt program that comes with Nagios. It uses the same template that is posted in this thread (cacti_graph_template_exchange_delivery_statistics.xml), but ignores the Instance Name parameter... it just uses the Host Parameter for the IP of the Exchange Server.mbittman wrote:I am having trouble on figuring out exactly how to make the Exchange graphs work from Linux box. I am running Nagios and NSClient on my exchange server. But am not sure how to get the graphs to work in cacti. I tried importing the Exchange - Filtering Statistics xml template but graph all show NA. Tried other templates and get the same. I am retarded thanks.
Micah
It's a bit dirty, but it works fine for me.
It assumes that check_nt is in /usr/lib/nagios/plugins. Otherwise, change the script.
If anybody can tell me the WMI Counters to query for a front-end Exchange 2003 box that doesn't host any mailboxes, that would be great... I'm looking for mail in/out, and bounces. I've been fighting with the Performance monitor looking for information regarding this, but none of the counters seem to work.
I'm also wondering exactly how accurate these numbers are, since they are per minute, instead of per 5 minutes. There was a previous question about that here, but nobody answered it.
Enjoy.
- Attachments
-
- w32_exch_query_mailboxstats.pl.txt
- PERL script to query a Windows NSClient instance from Linux (rename to .pl, of course)
- (999 Bytes) Downloaded 608 times
Re: User Count hitting 100 and stopping
It appears I had a maximum limit of 100 on one of the data template ("Exchange - I.S. Stats") data source items ("Count Users"). You might be able to change it to 0 and it not have the max and it will be implemented immediately, worst case you'll have to recreate the data source after you change it to 0...I'm not sure -- Give it a try.Brettw wrote:Ive just installed the scripts and all seem to be working well however on the Exchange Users graph it seems to peak at 100 then doesnt graph?
-
- Posts: 31
- Joined: Fri Jul 01, 2005 12:07 pm
Instance Name on Graph Template?
Is there a way to automatically put the instance name used on the graph itself?
is this working on Win2000server with exchange2000?
is this working on Win2000server with exchange2000?
-
- Posts: 9
- Joined: Mon Oct 10, 2005 5:45 am
Who is online
Users browsing this forum: No registered users and 1 guest