Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Apr 23, 2019 3:11 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 108 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next
Author Message
 Post subject: Exchange 2003 scripts from Windows Cacti
PostPosted: Thu Mar 09, 2006 3:25 am 
Offline

Joined: Mon Jul 18, 2005 10:42 pm
Posts: 43
Location: Melbourne, Australia
I have setup some nice exchange 2003 scripts (well I think so :wink: )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


Attachments:
File comment: Exchange Client Latency
exchange_latency.JPG
exchange_latency.JPG [ 41.08 KiB | Viewed 79930 times ]
File comment: Exchange Queues
exchange_queues.JPG
exchange_queues.JPG [ 39.23 KiB | Viewed 79930 times ]
File comment: Exchange Messages
exchange_messages.JPG
exchange_messages.JPG [ 52.32 KiB | Viewed 79930 times ]
File comment: Exchange Memory
exchange_memory.JPG
exchange_memory.JPG [ 53.91 KiB | Viewed 79930 times ]
File comment: Exchange Database
exchange_database.JPG
exchange_database.JPG [ 42.91 KiB | Viewed 79931 times ]


Last edited by DAP on Thu Mar 09, 2006 4:11 am, edited 2 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 09, 2006 3:30 am 
Offline

Joined: Mon Jul 18, 2005 10:42 pm
Posts: 43
Location: Melbourne, Australia
Here are the scripts. Put these in your <cacti dir>\scripts folder.

Rename to *.pl extension (ie, remove the .txt extension)


Attachments:
File comment: Exchange memory script (this can obviously apply to any Windows server)
windows_memory.pl.txt [1.22 KiB]
Downloaded 7895 times
File comment: Exchange Queues script
windows_exchangequeues.pl.txt [1.26 KiB]
Downloaded 6028 times
File comment: Exchange Message stats script
windows_exchangemessages.pl.txt [1.41 KiB]
Downloaded 5703 times
File comment: Exchange Client Latency script
windows_exchangelatency.pl.txt [884 Bytes]
Downloaded 4810 times
File comment: Exchange Database script
windows_exchangedb.pl.txt [823 Bytes]
Downloaded 5064 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 09, 2006 3:30 am 
Offline

Joined: Mon Jul 18, 2005 10:42 pm
Posts: 43
Location: Melbourne, Australia
Here are the Data Templates.

Import using Cacti.

Important: Once imported, edit the script command to include your paths.


Attachments:
File comment: Memory data template
cacti_data_template_windows_memory_utilisation.xml [8.44 KiB]
Downloaded 5463 times
File comment: Exchange Queues data template
cacti_data_template_windows_exchange_queues.xml [7.45 KiB]
Downloaded 4593 times
File comment: Exchange message stats data template
cacti_data_template_windows_exchange_messages.xml [10.41 KiB]
Downloaded 4622 times
File comment: Exchange Client Latency data template
cacti_data_template_windows_exchange_latency.xml [5.54 KiB]
Downloaded 4122 times
File comment: Exchange Database data template
cacti_data_template_windows_exchange_database.xml [6.32 KiB]
Downloaded 4248 times


Last edited by DAP on Tue May 23, 2006 9:00 am, edited 3 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 09, 2006 3:36 am 
Offline

Joined: Mon Jul 18, 2005 10:42 pm
Posts: 43
Location: Melbourne, Australia
Here are the Graph Templates.

Import using Cacti.


Attachments:
File comment: Memory graph template
cacti_graph_template_windows_memory_utilisation.xml [25.52 KiB]
Downloaded 4430 times
File comment: Exchange Queues graph template
cacti_graph_template_windows_exchange_queues.xml [21.28 KiB]
Downloaded 4375 times
File comment: Exchange message stats graph template
cacti_graph_template_windows_exchange_messages.xml [31.72 KiB]
Downloaded 4238 times
File comment: Exchange client latency graph template
cacti_graph_template_windows_exchange_latency.xml [14.37 KiB]
Downloaded 4035 times
File comment: Exchange database graph template
cacti_graph_template_windows_exchange_database.xml [17.72 KiB]
Downloaded 4132 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 09, 2006 9:56 am 
Offline

Joined: Mon Mar 06, 2006 9:47 pm
Posts: 20
these work much better than the others. good job!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 2:14 am 
Offline

Joined: Sun Mar 05, 2006 4:05 am
Posts: 32
Location: Connecticut
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 7:20 pm 
Offline

Joined: Mon Jul 18, 2005 10:42 pm
Posts: 43
Location: Melbourne, Australia
[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.


Attachments:
File comment: WMI Security
wmimgmt_security.JPG
wmimgmt_security.JPG [ 32.18 KiB | Viewed 79781 times ]


Last edited by DAP on Sun Mar 12, 2006 8:53 pm, edited 1 time in total.
Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 8:52 pm 
Offline

Joined: Sun Mar 05, 2006 4:05 am
Posts: 32
Location: Connecticut
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")


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 9:06 pm 
Offline

Joined: Mon Jul 18, 2005 10:42 pm
Posts: 43
Location: Melbourne, Australia
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 10:01 pm 
Offline

Joined: Sun Mar 05, 2006 4:05 am
Posts: 32
Location: Connecticut
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?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 10:30 pm 
Offline

Joined: Mon Jul 18, 2005 10:42 pm
Posts: 43
Location: Melbourne, Australia
Which particular graph are you getting this error? Are others working?

Can you post the results from running the script manually?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 12:21 am 
Offline

Joined: Sun Mar 05, 2006 4:05 am
Posts: 32
Location: Connecticut
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 12:40 am 
Offline

Joined: Mon Jul 18, 2005 10:42 pm
Posts: 43
Location: Melbourne, Australia
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)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 12:34 pm 
Offline

Joined: Sun Mar 05, 2006 4:05 am
Posts: 32
Location: Connecticut
windows 2003 server SP1
and no I dont have IMF turned on


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 7:34 pm 
Offline

Joined: Mon Jul 18, 2005 10:42 pm
Posts: 43
Location: Melbourne, Australia
Try running WMI Scriptomatic (http://www.microsoft.com/downloads/details.aspx?FamilyID=09dfc342-648b-4119-b7eb-783b0f7d1178&DisplayLang=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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 108 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group