Exchange 2003 scripts from Windows Cacti
Moderators: Developers, Moderators
Exchange 2003 scripts from Windows Cacti
I have setup some nice exchange 2003 scripts (well I think so )which work well for me and I wanted to share with community. I have taken some ideas from other exchange scripts in these forums.
These will work with Cacti on Windows and require WMI access. The below examples are from Windows 2003 SP1/Exchange 2003 SP1 server.
Cheers
These will work with Cacti on Windows and require WMI access. The below examples are from Windows 2003 SP1/Exchange 2003 SP1 server.
Cheers
- Attachments
-
- Exchange Database
- exchange_database.JPG (42.91 KiB) Viewed 83912 times
-
- Exchange Memory
- exchange_memory.JPG (53.91 KiB) Viewed 83911 times
-
- Exchange Messages
- exchange_messages.JPG (52.32 KiB) Viewed 83911 times
-
- Exchange Queues
- exchange_queues.JPG (39.23 KiB) Viewed 83911 times
-
- Exchange Client Latency
- exchange_latency.JPG (41.08 KiB) Viewed 83911 times
Last edited by DAP on Thu Mar 09, 2006 4:11 am, edited 2 times in total.
Here are the scripts. Put these in your <cacti dir>\scripts folder.
Rename to *.pl extension (ie, remove the .txt extension)
Rename to *.pl extension (ie, remove the .txt extension)
- Attachments
-
- windows_exchangedb.pl.txt
- Exchange Database script
- (823 Bytes) Downloaded 5234 times
-
- windows_exchangelatency.pl.txt
- Exchange Client Latency script
- (884 Bytes) Downloaded 4975 times
-
- windows_exchangemessages.pl.txt
- Exchange Message stats script
- (1.41 KiB) Downloaded 5871 times
-
- windows_exchangequeues.pl.txt
- Exchange Queues script
- (1.26 KiB) Downloaded 6201 times
-
- windows_memory.pl.txt
- Exchange memory script (this can obviously apply to any Windows server)
- (1.22 KiB) Downloaded 8061 times
Here are the Data Templates.
Import using Cacti.
Important: Once imported, edit the script command to include your paths.
Import using Cacti.
Important: Once imported, edit the script command to include your paths.
- Attachments
-
- cacti_data_template_windows_exchange_latency.xml
- Exchange Client Latency data template
- (5.54 KiB) Downloaded 4271 times
-
- cacti_data_template_windows_exchange_messages.xml
- Exchange message stats data template
- (10.41 KiB) Downloaded 4789 times
-
- cacti_data_template_windows_exchange_queues.xml
- Exchange Queues data template
- (7.45 KiB) Downloaded 4735 times
-
- cacti_data_template_windows_memory_utilisation.xml
- Memory data template
- (8.44 KiB) Downloaded 5700 times
-
- cacti_data_template_windows_exchange_database.xml
- Exchange Database data template
- (6.32 KiB) Downloaded 4417 times
Last edited by DAP on Tue May 23, 2006 9:00 am, edited 3 times in total.
Here are the Graph Templates.
Import using Cacti.
Import using Cacti.
- Attachments
-
- cacti_graph_template_windows_exchange_database.xml
- Exchange database graph template
- (17.72 KiB) Downloaded 4283 times
-
- cacti_graph_template_windows_exchange_latency.xml
- Exchange client latency graph template
- (14.37 KiB) Downloaded 4196 times
-
- cacti_graph_template_windows_exchange_messages.xml
- Exchange message stats graph template
- (31.72 KiB) Downloaded 4394 times
-
- cacti_graph_template_windows_exchange_queues.xml
- Exchange Queues graph template
- (21.28 KiB) Downloaded 4527 times
-
- cacti_graph_template_windows_memory_utilisation.xml
- Memory graph template
- (25.52 KiB) Downloaded 4601 times
Graphs Look nice unfortunately I cant seem to get them to retreive data from My exchange Server. I have WMI snmp Provider installed as well as SNMP on the exchange server, But I am Getting nan on my graphs.
Is there some permission issue I have to address. cacti Box is not joined to 2003 domain but Obviously the Exchange server is.
does this need a Domain account to run?
are there any tweaks to WMI on the exchange server or to the scripts I might need to Do.
I am getting data from SNMP queries that go to the Exchange server.
Is there some permission issue I have to address. cacti Box is not joined to 2003 domain but Obviously the Exchange server is.
does this need a Domain account to run?
are there any tweaks to WMI on the exchange server or to the scripts I might need to Do.
I am getting data from SNMP queries that go to the Exchange server.
[Edit] Very first thing to check is the Data Input Method. Edit the script command to reflect your path structure. Then try below.
-------------------------
The first thing to try is run the script on your Cacti box and see if you get results.
eg, perl windows_exchangemessages.pl <servername>
You should see something like,
c:\skilled-rrdtool\cacti\scripts>perl windows_exchangemessages.pl semelex02
MB_MsgsSubmitted:89017 MB_MsgsDelivered:445191 MB_MsgsSent:95136 SMTP_MsgBytesRe
ceived:19829668735 SMTP_MsgBytesSent:4887490719 SMTP_MsgsDelivered:344614 SMTP_M
sgsReceived:179101 SMTP_MsgsSent:36968
If you don't see results, or see some WMI error, try the next step below.
On your exchange server, run "wmimgmt.msc", right-click "WMI Control" and select Properties. Click on Security tab and then Security button. Add "Everyone" and tick "Remote Enable". Restart WMI service on your server.
Now re-run the script manually again.
NOTE: If this works, change "Everyone" to a secure domain account.
If you still don't see any results (which happened to me a few times), try running this command on your exchange server,
wmiadap /f
Restart the WMI service and run the script once again.
Also, the database script will only work on Exchange SP1.
The key is making sure the script returns results when run manually. I did run into these same problems you are so keep trying.
Hope this helps.
-------------------------
The first thing to try is run the script on your Cacti box and see if you get results.
eg, perl windows_exchangemessages.pl <servername>
You should see something like,
c:\skilled-rrdtool\cacti\scripts>perl windows_exchangemessages.pl semelex02
MB_MsgsSubmitted:89017 MB_MsgsDelivered:445191 MB_MsgsSent:95136 SMTP_MsgBytesRe
ceived:19829668735 SMTP_MsgBytesSent:4887490719 SMTP_MsgsDelivered:344614 SMTP_M
sgsReceived:179101 SMTP_MsgsSent:36968
If you don't see results, or see some WMI error, try the next step below.
On your exchange server, run "wmimgmt.msc", right-click "WMI Control" and select Properties. Click on Security tab and then Security button. Add "Everyone" and tick "Remote Enable". Restart WMI service on your server.
Now re-run the script manually again.
NOTE: If this works, change "Everyone" to a secure domain account.
If you still don't see any results (which happened to me a few times), try running this command on your exchange server,
wmiadap /f
Restart the WMI service and run the script once again.
Also, the database script will only work on Exchange SP1.
The key is making sure the script returns results when run manually. I did run into these same problems you are so keep trying.
Hope this helps.
- Attachments
-
- WMI Security
- wmimgmt_security.JPG (32.18 KiB) Viewed 83762 times
Last edited by DAP on Sun Mar 12, 2006 8:53 pm, edited 1 time in total.
OK I ran the scripts manuallythe windows_memory scripts on both my cacti box and my exchange server.
They both returned results correctly But I am still not getting any Data in my graphs.
Do I have to change the script to include the server I am trying to get data from?
Do you think that the DB script will work on SP2 for exchange 2003?
i.e. from
my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2")
to
my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\myservername\\CIMV2")
They both returned results correctly But I am still not getting any Data in my graphs.
Do I have to change the script to include the server I am trying to get data from?
Do you think that the DB script will work on SP2 for exchange 2003?
i.e. from
my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2")
to
my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\myservername\\CIMV2")
DAP,
I ran the memory.pl script against my exchange server and it ran correctly.(but there is no data in the graphs.
None of the exchange scripts have run correctly manually yet.
as I said I did run the memory script but no data.
SO on the off chance I decided to check my event log on my exchange server and this is what i found.
WMI ADAP was unable to create the object Win32_PerfFormattedData_MSExchangeUCF_MSExchangeIntelligentMessageFilter for Performance Library MSExchangeUCF because error 0x80041002 was returned
According to microsoft this has something to do with namespace of the object being called and that it does not exist there.
This looks like something on the exchang server not with cacti.
I will run the wmiadap /f and try restarting the service and change the security. then get back to you about this.
I ran the memory.pl script against my exchange server and it ran correctly.(but there is no data in the graphs.
None of the exchange scripts have run correctly manually yet.
as I said I did run the memory script but no data.
SO on the off chance I decided to check my event log on my exchange server and this is what i found.
WMI ADAP was unable to create the object Win32_PerfFormattedData_MSExchangeUCF_MSExchangeIntelligentMessageFilter for Performance Library MSExchangeUCF because error 0x80041002 was returned
According to microsoft this has something to do with namespace of the object being called and that it does not exist there.
This looks like something on the exchang server not with cacti.
I will run the wmiadap /f and try restarting the service and change the security. then get back to you about this.
What version of Windows server? You will need Windows Server 2003 to be able to query Win32_PerfFormattedData*.
Your event log error refers to Microsoft Intelligent Message filter (IMF). Do you have that installed? None of these queries get any IMF information.
I did find this which may help with those errors (http://www.webservertalk.com/archive128 ... 41415.html)
Your event log error refers to Microsoft Intelligent Message filter (IMF). Do you have that installed? None of these queries get any IMF information.
I did find this which may help with those errors (http://www.webservertalk.com/archive128 ... 41415.html)
Try running WMI Scriptomatic (http://www.microsoft.com/downloads/deta ... layLang=en) to see if you can see the performance counters on the exchange server.
This is what I use to see what I can graph.
This is what I use to see what I can graph.
Who is online
Users browsing this forum: No registered users and 0 guests