|
|
| Author |
Message |
DAP
Joined: 18 Jul 2005 Posts: 43 Location: Melbourne, Australia
|
Posted: Thu Mar 09, 2006 3:25 am Post subject: 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
| Description: |
|
| Filesize: |
41.08 KB |
| Viewed: |
38769 Time(s) |

|
| Description: |
|
| Filesize: |
39.23 KB |
| Viewed: |
38769 Time(s) |

|
| Description: |
|
| Filesize: |
52.32 KB |
| Viewed: |
38769 Time(s) |

|
| Description: |
|
| Filesize: |
53.91 KB |
| Viewed: |
38769 Time(s) |

|
| Description: |
|
| Filesize: |
42.91 KB |
| Viewed: |
38770 Time(s) |

|
Last edited by DAP on Thu Mar 09, 2006 4:11 am; edited 2 times in total |
|
| Back to top |
|
 |
DAP
Joined: 18 Jul 2005 Posts: 43 Location: Melbourne, Australia
|
Posted: Thu Mar 09, 2006 3:30 am Post subject: |
|
|
Here are the scripts. Put these in your <cacti dir>\scripts folder.
Rename to *.pl extension (ie, remove the .txt extension)
| Description: |
| Exchange memory script (this can obviously apply to any Windows server) |
|
 Download |
| Filename: |
windows_memory.pl.txt |
| Filesize: |
1.22 KB |
| Downloaded: |
4520 Time(s) |
| Description: |
|
 Download |
| Filename: |
windows_exchangequeues.pl.txt |
| Filesize: |
1.26 KB |
| Downloaded: |
3207 Time(s) |
| Description: |
| Exchange Message stats script |
|
 Download |
| Filename: |
windows_exchangemessages.pl.txt |
| Filesize: |
1.41 KB |
| Downloaded: |
2973 Time(s) |
| Description: |
| Exchange Client Latency script |
|
 Download |
| Filename: |
windows_exchangelatency.pl.txt |
| Filesize: |
884 Bytes |
| Downloaded: |
2543 Time(s) |
| Description: |
|
 Download |
| Filename: |
windows_exchangedb.pl.txt |
| Filesize: |
823 Bytes |
| Downloaded: |
2662 Time(s) |
|
|
| Back to top |
|
 |
DAP
Joined: 18 Jul 2005 Posts: 43 Location: Melbourne, Australia
|
Posted: Thu Mar 09, 2006 3:30 am Post subject: |
|
|
Here are the Data Templates.
Import using Cacti.
Important: Once imported, edit the script command to include your paths.
| Description: |
|
 Download |
| Filename: |
cacti_data_template_windows_memory_utilisation.xml |
| Filesize: |
8.44 KB |
| Downloaded: |
2911 Time(s) |
| Description: |
| Exchange Queues data template |
|
 Download |
| Filename: |
cacti_data_template_windows_exchange_queues.xml |
| Filesize: |
7.45 KB |
| Downloaded: |
2382 Time(s) |
| Description: |
| Exchange message stats data template |
|
 Download |
| Filename: |
cacti_data_template_windows_exchange_messages.xml |
| Filesize: |
10.41 KB |
| Downloaded: |
2339 Time(s) |
| Description: |
| Exchange Client Latency data template |
|
 Download |
| Filename: |
cacti_data_template_windows_exchange_latency.xml |
| Filesize: |
5.54 KB |
| Downloaded: |
2116 Time(s) |
| Description: |
| Exchange Database data template |
|
 Download |
| Filename: |
cacti_data_template_windows_exchange_database.xml |
| Filesize: |
6.32 KB |
| Downloaded: |
2099 Time(s) |
Last edited by DAP on Tue May 23, 2006 9:00 am; edited 3 times in total |
|
| Back to top |
|
 |
DAP
Joined: 18 Jul 2005 Posts: 43 Location: Melbourne, Australia
|
Posted: Thu Mar 09, 2006 3:36 am Post subject: |
|
|
Here are the Graph Templates.
Import using Cacti.
| Description: |
|
 Download |
| Filename: |
cacti_graph_template_windows_memory_utilisation.xml |
| Filesize: |
25.52 KB |
| Downloaded: |
2327 Time(s) |
| Description: |
| Exchange Queues graph template |
|
 Download |
| Filename: |
cacti_graph_template_windows_exchange_queues.xml |
| Filesize: |
21.28 KB |
| Downloaded: |
2167 Time(s) |
| Description: |
| Exchange message stats graph template |
|
 Download |
| Filename: |
cacti_graph_template_windows_exchange_messages.xml |
| Filesize: |
31.72 KB |
| Downloaded: |
2244 Time(s) |
| Description: |
| Exchange client latency graph template |
|
 Download |
| Filename: |
cacti_graph_template_windows_exchange_latency.xml |
| Filesize: |
14.37 KB |
| Downloaded: |
2059 Time(s) |
| Description: |
| Exchange database graph template |
|
 Download |
| Filename: |
cacti_graph_template_windows_exchange_database.xml |
| Filesize: |
17.72 KB |
| Downloaded: |
2014 Time(s) |
|
|
| Back to top |
|
 |
ihyln
Joined: 06 Mar 2006 Posts: 20
|
Posted: Thu Mar 09, 2006 9:56 am Post subject: |
|
|
| these work much better than the others. good job!
|
|
| Back to top |
|
 |
joex51
Joined: 05 Mar 2006 Posts: 32 Location: Connecticut
|
Posted: Sun Mar 12, 2006 2:14 am Post subject: |
|
|
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.
|
|
| Back to top |
|
 |
DAP
Joined: 18 Jul 2005 Posts: 43 Location: Melbourne, Australia
|
Posted: Sun Mar 12, 2006 7:20 pm Post subject: |
|
|
[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.
| Description: |
|
| Filesize: |
32.18 KB |
| Viewed: |
38620 Time(s) |

|
Last edited by DAP on Sun Mar 12, 2006 8:53 pm; edited 1 time in total |
|
| Back to top |
|
 |
joex51
Joined: 05 Mar 2006 Posts: 32 Location: Connecticut
|
Posted: Sun Mar 12, 2006 8:52 pm Post subject: |
|
|
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")
|
|
| Back to top |
|
 |
DAP
Joined: 18 Jul 2005 Posts: 43 Location: Melbourne, Australia
|
Posted: Sun Mar 12, 2006 9:06 pm Post subject: |
|
|
You shouldn't need to include the server name in the script. That should be done automatically when you create the graphs.
Check Cacti logs. Do you report any errors?
*Database script will work for Exchange SP1 and SP2.
|
|
| Back to top |
|
 |
joex51
Joined: 05 Mar 2006 Posts: 32 Location: Connecticut
|
Posted: Sun Mar 12, 2006 10:01 pm Post subject: |
|
|
DAP,
i am getting a warning.
03/12/2006 09:55:18 PM - CACTID: Poller[0] Host[10] DS[128] WARNING: Result from SCRIPT not valid. Partial Result: ...
should make my time out longer?
|
|
| Back to top |
|
 |
DAP
Joined: 18 Jul 2005 Posts: 43 Location: Melbourne, Australia
|
Posted: Sun Mar 12, 2006 10:30 pm Post subject: |
|
|
Which particular graph are you getting this error? Are others working?
Can you post the results from running the script manually?
|
|
| Back to top |
|
 |
joex51
Joined: 05 Mar 2006 Posts: 32 Location: Connecticut
|
Posted: Mon Mar 13, 2006 12:21 am Post subject: |
|
|
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.
|
|
| Back to top |
|
 |
DAP
Joined: 18 Jul 2005 Posts: 43 Location: Melbourne, Australia
|
Posted: Mon Mar 13, 2006 12:40 am Post subject: |
|
|
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-2004-11-541415.html)
|
|
| Back to top |
|
 |
joex51
Joined: 05 Mar 2006 Posts: 32 Location: Connecticut
|
Posted: Mon Mar 13, 2006 12:34 pm Post subject: |
|
|
windows 2003 server SP1
and no I dont have IMF turned on
|
|
| Back to top |
|
 |
DAP
Joined: 18 Jul 2005 Posts: 43 Location: Melbourne, Australia
|
|
| Back to top |
|
 |
|