Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Exchange 2003 scripts from Windows Cacti
Goto page 1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
DAP



Joined: 18 Jul 2005
Posts: 43
Location: Melbourne, Australia

PostPosted: Thu Mar 09, 2006 3:25 am    Post subject: Exchange 2003 scripts from Windows Cacti Reply with quote

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



exchange_latency.JPG
 Description:
Exchange Client Latency
 Filesize:  41.08 KB
 Viewed:  37066 Time(s)

exchange_latency.JPG



exchange_queues.JPG
 Description:
Exchange Queues
 Filesize:  39.23 KB
 Viewed:  37066 Time(s)

exchange_queues.JPG



exchange_messages.JPG
 Description:
Exchange Messages
 Filesize:  52.32 KB
 Viewed:  37066 Time(s)

exchange_messages.JPG



exchange_memory.JPG
 Description:
Exchange Memory
 Filesize:  53.91 KB
 Viewed:  37066 Time(s)

exchange_memory.JPG



exchange_database.JPG
 Description:
Exchange Database
 Filesize:  42.91 KB
 Viewed:  37067 Time(s)

exchange_database.JPG




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

PostPosted: Thu Mar 09, 2006 3:30 am    Post subject: Reply with quote

Here are the scripts. Put these in your <cacti dir>\scripts folder.

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



windows_memory.pl.txt
 Description:
Exchange memory script (this can obviously apply to any Windows server)

Download
 Filename:  windows_memory.pl.txt
 Filesize:  1.22 KB
 Downloaded:  4338 Time(s)


windows_exchangequeues.pl.txt
 Description:
Exchange Queues script

Download
 Filename:  windows_exchangequeues.pl.txt
 Filesize:  1.26 KB
 Downloaded:  3077 Time(s)


windows_exchangemessages.pl.txt
 Description:
Exchange Message stats script

Download
 Filename:  windows_exchangemessages.pl.txt
 Filesize:  1.41 KB
 Downloaded:  2861 Time(s)


windows_exchangelatency.pl.txt
 Description:
Exchange Client Latency script

Download
 Filename:  windows_exchangelatency.pl.txt
 Filesize:  884 Bytes
 Downloaded:  2441 Time(s)


windows_exchangedb.pl.txt
 Description:
Exchange Database script

Download
 Filename:  windows_exchangedb.pl.txt
 Filesize:  823 Bytes
 Downloaded:  2543 Time(s)

Back to top
DAP



Joined: 18 Jul 2005
Posts: 43
Location: Melbourne, Australia

PostPosted: Thu Mar 09, 2006 3:30 am    Post subject: Reply with quote

Here are the Data Templates.

Import using Cacti.

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



cacti_data_template_windows_memory_utilisation.xml
 Description:
Memory data template

Download
 Filename:  cacti_data_template_windows_memory_utilisation.xml
 Filesize:  8.44 KB
 Downloaded:  2783 Time(s)


cacti_data_template_windows_exchange_queues.xml
 Description:
Exchange Queues data template

Download
 Filename:  cacti_data_template_windows_exchange_queues.xml
 Filesize:  7.45 KB
 Downloaded:  2272 Time(s)


cacti_data_template_windows_exchange_messages.xml
 Description:
Exchange message stats data template

Download
 Filename:  cacti_data_template_windows_exchange_messages.xml
 Filesize:  10.41 KB
 Downloaded:  2241 Time(s)


cacti_data_template_windows_exchange_latency.xml
 Description:
Exchange Client Latency data template

Download
 Filename:  cacti_data_template_windows_exchange_latency.xml
 Filesize:  5.54 KB
 Downloaded:  2016 Time(s)


cacti_data_template_windows_exchange_database.xml
 Description:
Exchange Database data template

Download
 Filename:  cacti_data_template_windows_exchange_database.xml
 Filesize:  6.32 KB
 Downloaded:  2002 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

PostPosted: Thu Mar 09, 2006 3:36 am    Post subject: Reply with quote

Here are the Graph Templates.

Import using Cacti.



cacti_graph_template_windows_memory_utilisation.xml
 Description:
Memory graph template

Download
 Filename:  cacti_graph_template_windows_memory_utilisation.xml
 Filesize:  25.52 KB
 Downloaded:  2225 Time(s)


cacti_graph_template_windows_exchange_queues.xml
 Description:
Exchange Queues graph template

Download
 Filename:  cacti_graph_template_windows_exchange_queues.xml
 Filesize:  21.28 KB
 Downloaded:  2064 Time(s)


cacti_graph_template_windows_exchange_messages.xml
 Description:
Exchange message stats graph template

Download
 Filename:  cacti_graph_template_windows_exchange_messages.xml
 Filesize:  31.72 KB
 Downloaded:  2145 Time(s)


cacti_graph_template_windows_exchange_latency.xml
 Description:
Exchange client latency graph template

Download
 Filename:  cacti_graph_template_windows_exchange_latency.xml
 Filesize:  14.37 KB
 Downloaded:  1966 Time(s)


cacti_graph_template_windows_exchange_database.xml
 Description:
Exchange database graph template

Download
 Filename:  cacti_graph_template_windows_exchange_database.xml
 Filesize:  17.72 KB
 Downloaded:  1916 Time(s)

Back to top
ihyln



Joined: 06 Mar 2006
Posts: 20

PostPosted: Thu Mar 09, 2006 9:56 am    Post subject: Reply with quote

these work much better than the others. good job!
Back to top
joex51



Joined: 05 Mar 2006
Posts: 30
Location: Connecticut

PostPosted: Sun Mar 12, 2006 2:14 am    Post subject: Reply with quote

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

PostPosted: Sun Mar 12, 2006 7:20 pm    Post subject: Reply with quote

[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.



wmimgmt_security.JPG
 Description:
WMI Security
 Filesize:  32.18 KB
 Viewed:  36917 Time(s)

wmimgmt_security.JPG




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: 30
Location: Connecticut

PostPosted: Sun Mar 12, 2006 8:52 pm    Post subject: Reply with quote

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

PostPosted: Sun Mar 12, 2006 9:06 pm    Post subject: Reply with quote

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: 30
Location: Connecticut

PostPosted: Sun Mar 12, 2006 10:01 pm    Post subject: Reply with quote

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

PostPosted: Sun Mar 12, 2006 10:30 pm    Post subject: Reply with quote

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: 30
Location: Connecticut

PostPosted: Mon Mar 13, 2006 12:21 am    Post subject: Reply with quote

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

PostPosted: Mon Mar 13, 2006 12:40 am    Post subject: Reply with quote

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: 30
Location: Connecticut

PostPosted: Mon Mar 13, 2006 12:34 pm    Post subject: Reply with quote

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

PostPosted: Mon Mar 13, 2006 7:34 pm    Post subject: Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page 1, 2, 3, 4, 5, 6, 7  Next
Page 1 of 7

 



Powered by phpBB © 2001, 2005 phpBB Group