Exchange 2003 scripts from Windows Cacti

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

Moderators: Developers, Moderators

Post Reply
joex51
Posts: 32
Joined: Sun Mar 05, 2006 4:05 am
Location: Connecticut

Post by joex51 »

This is what I get when I run the memory script against my exchange server.

C:\Inetpub\wwwroot\cacti\scripts>perl windows_memory.pl gorthaur
FreePhysicalMemory:588492 TotalVisibleMemorySize:2096692 CommitLimit:4210757632
CommittedBytes:1623674880 PoolPagedBytes:32505856 PoolNonpagedBytes:35753984

But i still get nan for data in my graph.
I went into the data source for this script and set the correct path for it. it was set to the default path for your cacti server. after i changed it i still have no data in my graphs. should i reboot cacti box?
DAP
Posts: 43
Joined: Mon Jul 18, 2005 10:42 pm
Location: Melbourne, Australia

Post by DAP »

I just re-read your previous replies and noted you are using CACTID as your poller. Try using CMD and see if that works better (I am using CMD).
joex51
Posts: 32
Joined: Sun Mar 05, 2006 4:05 am
Location: Connecticut

Post by joex51 »

DAP,
I ran scriptomatic. all the WMI calls are there. before I ive into recreating scripts I am going to delete and recreate the graphs. split them up create 2 device one for drive space and traffic and one for just exchange graphs and let you know how I make out.
BTW I ran all the scripts manually against my exchange server they all returned valid results.
I am thinking that maybe because i created these graphs with a the wrong script path it might be an issue.
DAP
Posts: 43
Joined: Mon Jul 18, 2005 10:42 pm
Location: Melbourne, Australia

Post by DAP »

Did you try changing your poller to CMD.PHP to see if that made a difference?
DAP
Posts: 43
Joined: Mon Jul 18, 2005 10:42 pm
Location: Melbourne, Australia

Post by DAP »

Please see http://forums.cacti.net/viewtopic.php?t=12480 re a problem I have noticed.
joex51
Posts: 32
Joined: Sun Mar 05, 2006 4:05 am
Location: Connecticut

Post by joex51 »

I used scriptomatic and found that the data was there.
I dont know what I am doing wrong with this.

this is the cacti log entry:

03/14/2006 11:40:40 PM - CACTID: Poller[0] Host[13] DS[157] SCRIPT: c:/perl/bin/perl.exe c:/inetpub/wwwroot/cacti/scripts/windows_memory.pl
03/14/2006 11:40:40 PM - CACTID: Poller[0] Host[13] DS[157] WARNING: Result from SCRIPT not valid. Partial Result: ...
03/14/2006 11:40:40 PM - CACTID: Poller[0] Host[13] ERROR: Empty result [localhost]: 'c:/perl/bin/perl.exe c:/inetpub/wwwroot/cacti/scripts/windows_memory.pl

this is what i get when I run the script manually:

C:\Inetpub\wwwroot\cacti\scripts>perl windows_memory.pl localhost
FreePhysicalMemory:731964 TotalVisibleMemorySize:1048180 CommitLimit:2593849344
CommittedBytes:245723136 PoolPagedBytes:22777856 PoolNonpagedBytes:27643904
C:\Inetpub\wwwroot\cacti\scripts>

and attached is the pic of the graph
Attachments
test.JPG
test.JPG (46.3 KiB) Viewed 14789 times
joex51
Posts: 32
Joined: Sun Mar 05, 2006 4:05 am
Location: Connecticut

Post by joex51 »

i have changed my poller to cmdphp i will let you know
DAP
Posts: 43
Joined: Mon Jul 18, 2005 10:42 pm
Location: Melbourne, Australia

Post by DAP »

I have set a MAX limit on all the Data Sources in the Exchange Messages Data Template to "1000000". This seems to fix the issue when the exchange/smtp services are restarted. See (http://forums.cacti.net/viewtopic.php?t=12480)
DevilSun
Cacti User
Posts: 166
Joined: Fri Jul 16, 2004 1:59 pm
Location: Oregon

Post by DevilSun »

Scripts look good, found out that your exchangedb script has your server hardcoded in it. Also, all of my data input methods have hardcoded "SCRIPT" paths, that's why mine weren't working -- so update all your data input methods and it should work fine -- like this:
c:/skilled-rrdtool/perl/bin/perl.exe c:/skilled-rrdtool/cacti/scripts/windows_exchangequeues.pl <hostname>
to
perl <path_cacti>/scripts/windows_exchangequeues.pl <hostname>
joex51
Posts: 32
Joined: Sun Mar 05, 2006 4:05 am
Location: Connecticut

Post by joex51 »

I figured out what I had to do.
I created a "cactiadmin" account on the cacti server to run the CMD in the background so I did not get the command promt popping up every 5 min.
So I had to add the "cactiadmin" account to the local administrators group on the server I was running the scripts against.

In short the account running cmd.php has to have the permissions to WMI on the server you are trying to get stats from.

Now everything Looks Good

Good Job DAP!!!!
DAP
Posts: 43
Joined: Mon Jul 18, 2005 10:42 pm
Location: Melbourne, Australia

Post by DAP »

Oops! Thanks DevilSun. I have adjusted my script.
JonathanC
Posts: 7
Joined: Tue Feb 07, 2006 1:15 pm

Post by JonathanC »

Has anyone tried these scrpits on Exchange 2000?

Thanks!
Brettw
Posts: 26
Joined: Fri Mar 18, 2005 12:25 am

Post by Brettw »

Nice scripts DAP,

good to see someone in Aus is contributing :D
You may want to upload the modified files with the non hardcoded details as I downloaded the ones from the inital post and they have the hardcoded db and script locations in them

Cheers

Brett
hunghui
Posts: 2
Joined: Thu Jan 05, 2006 8:06 pm
Contact:

Post by hunghui »

scripts is windows platform perl , but my cacti is running on unix !
I don't know to modify perl file ! does anyone can do it ?
Jeff_Smith
Posts: 14
Joined: Thu May 04, 2006 11:53 am

Post by Jeff_Smith »

AWESOME

Thanks for the great scripts.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest