Exchange 2003 scripts from Windows Cacti

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
fury
Posts: 13
Joined: Sun Dec 31, 2006 6:57 am

Post by fury »

where can i find these sripts for a linux cacti? could someone post a link?

thx
namiradaki
Posts: 10
Joined: Thu Jan 04, 2007 7:21 pm

Exchange 2003 SP2

Post by namiradaki »

Do these scripts work on Exch 2k3 SP2?

I only seem to be able to get some of the data for messages template, all the other one dont return any results.

Any suggestions?

Thanks for all your help in advance.

Nick
Soriac
Posts: 1
Joined: Tue Jan 30, 2007 4:33 am

Post by Soriac »

Hi,

may you can help me ? can't import graph template.

Error: XML parse error.

Why?

data template import works fine.

thx
psycho.chicken
Posts: 21
Joined: Wed Feb 14, 2007 8:46 pm

host

Post by psycho.chicken »

where do i specify the host that this script will run against? do i actually subsitiute <hostname> for <mailserver> ?
psycho.chicken
Posts: 21
Joined: Wed Feb 14, 2007 8:46 pm

Post by psycho.chicken »

Only half the graph is working...

half says 0.2m
and half says NaN...
psycho.chicken
Posts: 21
Joined: Wed Feb 14, 2007 8:46 pm

Post by psycho.chicken »

see attatchment
Attachments
cactieschange.JPG
cactieschange.JPG (126.55 KiB) Viewed 12514 times
mattsn0w
Posts: 6
Joined: Thu Apr 19, 2007 10:46 am
Location: San Jose, CA.

Post by mattsn0w »

probably a silly question, but has anyone been able to get the perl scripts working on Linux?

I've seen some posts through Google searches of people setting up WINE on Linux, and installing active state perl to get perl::Win32 working.

I have Cacti running on a Ubuntu Linux system, but may just setup a second box using win2k3 if it'll be easier to get access to WMI.
Dacob9906
Cacti User
Posts: 209
Joined: Tue Apr 03, 2007 1:01 pm
Location: Pullman Washington

Post by Dacob9906 »

DAP wrote:Here are the Data Templates.

Import using Cacti.

Important: Once imported, edit the script command to include your paths.
How do I edit the script command to include my path??
Jacob Bergman
Pullman School District
jbergman@psd267.wednet.edu

Operating System: winserv 2003
Webserver: IIS 6.0
Cacti: BETA windows installer 1.5 (BSOD2600)
mikedu44
Posts: 8
Joined: Mon Apr 23, 2007 9:01 am
Location: France

Post by mikedu44 »

Hi

I having a problem to run this exchange script, the log says:

04/30/2007 10:00:05 AM - CMDPHP: Poller[0] Host[4] DS[23] CMD: c:/perl/bin/perl.exe c:/www/cacti-0.8.6j/scripts/windows_exchangequeues.pl srv-xxx, output: U
04/30/2007 10:00:05 AM - CMDPHP: Poller[0] Host[4] DS[23] WARNING: Result from CMD not valid. Partial Result:
04/30/2007 10:00:05 AM - CMDPHP: Poller[0] Host[4] DS[22] CMD: c:/perl/bin/perl.exe c:/www/cacti-0.8.6j/scripts/windows_exchangemessages.pl srv-xxx, output: U
04/30/2007 10:00:05 AM - CMDPHP: Poller[0] Host[4] DS[22] WARNING: Result from CMD not valid. Partial Result:
04/30/2007 10:00:04 AM - CMDPHP: Poller[0] Host[4] DS[20] CMD: c:/skilled-rrdtool/perl/bin/perl.exe c:/skilled-rrdtool/cacti/scripts/windows_exchangedb.pl srv-xxx, output: U
04/30/2007 10:00:04 AM - CMDPHP: Poller[0] Host[4] DS[20] WARNING: Result from CMD not valid. Partial Result:
04/30/2007 10:00:04 AM - CMDPHP: Poller[0] Host[4] DS[21] CMD: c:/perl/bin/perl.exe c:/www/cacti-0.8.6j/scripts/windows_exchangelatency.pl srv-xxx, output: U
04/30/2007 10:00:04 AM - CMDPHP: Poller[0] Host[4] DS[21] WARNING: Result from CMD not valid. Partial Result:
04/30/2007 10:00:04 AM - CMDPHP: Poller[0] Host[4] SNMP: Host responded to SNMP

the result of perl command in attachement

Please, anybody can help me ?

Mike
Attachments
beug script exchange.JPG
beug script exchange.JPG (9.42 KiB) Viewed 12050 times
StevoDevo
Posts: 4
Joined: Mon Apr 30, 2007 6:06 pm

Post by StevoDevo »

Hi,

I'm having the problem where I can get the script to run but it doesn't return any results. I have checked the WMI security settings on my Exchange server and they allow EVERYONE to remote access the server (currently).

Below is when I execute the scripts from my Cacti Server:

Code: Select all

C:\Inetpub\wwwroot\cacti\scripts>perl windows_exchangemessages.pl snv-exh1

C:\Inetpub\wwwroot\cacti\scripts>perl windows_exchangedb.pl snv-exh1

C:\Inetpub\wwwroot\cacti\scripts>perl windows_exchangelatency.pl snv-exh1

C:\Inetpub\wwwroot\cacti\scripts>perl windows_exchangequeues.pl snv-exh1

C:\Inetpub\wwwroot\cacti\scripts>perl windows_memory.pl snv-exh1
FreePhysicalMemory:450028 TotalVisibleMemorySize:3144976 CommitLimit:5237317632
CommittedBytes:2815942656 PoolPagedBytes:49958912 PoolNonpagedBytes:37257216
C:\Inetpub\wwwroot\cacti\scripts>
The only script that returns results is the Memory one. I'm running Exchange SP2 on Windows Server 2003.

Any ideas?

Stevo
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Try running wmiadap /f at the command line to see if this helps. You should restart the WMI service after running this command.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
StevoDevo
Posts: 4
Joined: Mon Apr 30, 2007 6:06 pm

Post by StevoDevo »

Thanks - that worked... but now the only script returning no results is the DB scripts. I read in this thread that the creator had kept his DB name and computer name in the script, but I can't find it anywhere!

Here is the script I'm using - what do I need to change?

Code: Select all

use strict;
use Win32::OLE('in');

use constant wbemFlagReturnImmediately => 0x10;
use constant wbemFlagForwardOnly => 0x20;

my @computers = ($ARGV[0]);
foreach my $computer (@computers) {

   my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or die "WMI connection failed.\n";
   my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_PerfFormattedData_ESE_Database", "WQL",
                  wbemFlagReturnImmediately | wbemFlagForwardOnly);

   foreach my $objItem (in $colItems) {
      print "DatabaseReadsSec:$objItem->{IODatabaseReadsPersec} ";
      print "DatabaseWritesSec:$objItem->{IODatabaseWritesPersec} ";
      print "LogReadsSec:$objItem->{IOLogReadsPersec} ";
      print "LogWritesSec:$objItem->{IOLogWritesPersec} ";
      print "\n";
   }
}
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

I think this script was modified after someone else pointed it out,. I could never get this one working either, and to be honest, I decided to leave it alone. In terms of the Exchange DB, what are you looking to graph ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
briealeida
Posts: 19
Joined: Mon Jul 02, 2007 12:15 pm
Location: a pebble
Contact:

Post by briealeida »

@ fury, mattsn0w and hunghui

I know it's been a while. Crazy to think we're the only people running Cacti on Linux boxes?
Oh, well.

I've been working on this as well. The problem, as I believe it to be now, is the Perl module for OLE. If you get errors similar to this:

Can't locate WIN32/OLE.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/vendor_prel/5.8.8/i686-linux /usr/lib/perl5/vendor_perl/5.8.8 et cetera et cetera)


You have the same problem. I'm currently trying to find that Perl module, wget it and I'll fill you all in.
User avatar
briealeida
Posts: 19
Joined: Mon Jul 02, 2007 12:15 pm
Location: a pebble
Contact:

Post by briealeida »

That's totally not the case.

Sorry, guys.

I'm giving this up and sticking to switches, Linux boxes and networking stuff for Cacti and searching for the SNMP OIDs.

Completely screw WMI and OLE.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests