How to monitor Exchange 2003 with a Windows cacti

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

creposukre
Posts: 15
Joined: Sat May 12, 2007 5:51 am
Location: Niort, FRANCE

How to monitor Exchange 2003 with a Windows cacti

Post by creposukre »

Hi, i've got W2003SBS and i've cacti working well on IIS now :D (I opened a topic 1 month ago because i had some problems).
It's very useful and i've got many graphs, cpu, disk usage, etc. 8)
Everything is perfect. :wink:
But i would like to go farther, i would like to monitor Exchange.
I found this topic : http://forums.cacti.net/about12383.html
I download every files needed, i installed ActivePerl, SNMP WMI, and i specified Perl executable path in the data templates, but it doesn't works. :-?
Did i missed something ? :roll:
Can you help me ?

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

Post by mcutting »

Does your poller account have access to WMI on the servers you are polling ? What happens if you run the script from CLI - do you get any output ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
creposukre
Posts: 15
Joined: Sat May 12, 2007 5:51 am
Location: Niort, FRANCE

Post by creposukre »

Yes, poller account is administrator account, so there's no problem there.
I tried to turn on debug mode for one of my Exchange graphs and it says :
RRDTool Command:

c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="RIMBA-SRV - Exchange (Database)" \
--rigid \
--base=1000 \
--height=175 \
--width=575 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Database Activity" \
--slope-mode \
DEF:a="C\:/Inetpub/wwwroot/cacti/rra/rimbasrv_logwritessec_45.rrd":DatabaseReadsSec:AVERAGE \
DEF:b="C\:/Inetpub/wwwroot/cacti/rra/rimbasrv_logwritessec_45.rrd":DatabaseWritesSec:AVERAGE \
DEF:c="C\:/Inetpub/wwwroot/cacti/rra/rimbasrv_logwritessec_45.rrd":LogReadsSec:AVERAGE \
DEF:d="C\:/Inetpub/wwwroot/cacti/rra/rimbasrv_logwritessec_45.rrd":LogWritesSec:AVERAGE \
LINE1:a#00CF00:"I/O Database Reads/sec" \
GPRINT:a:LAST:" Current\:%8.0lf" \
GPRINT:a:AVERAGE:"Average\:%8.0lf" \
GPRINT:a:MAX:"Maximum\:%8.0lf\n" \
LINE1:b#002A97:"I/O Database Writes/sec" \
GPRINT:b:LAST:"Current\:%8.0lf" \
GPRINT:b:AVERAGE:"Average\:%8.0lf" \
GPRINT:b:MAX:"Maximum\:%8.0lf\n" \
LINE1:c#FFFF00:"I/O Log Reads/sec" \
GPRINT:c:LAST:" Current\:%8.0lf" \
GPRINT:c:AVERAGE:"Average\:%8.0lf" \
GPRINT:c:MAX:"Maximum\:%8.0lf\n" \
LINE1:d#FF0000:"I/O Log Writes/sec" \
GPRINT:d:LAST:" Current\:%8.0lf" \
GPRINT:d:AVERAGE:"Average\:%8.0lf" \
GPRINT:d:MAX:"Maximum\:%8.0lf\n"

RRDTool Says:

OK
:(

But i still got "nan" on my graph.

Moreover, i've this message in my cacti log file :
06/14/2007 11:10:14 AM - CMDPHP: Poller[0] Host[2] DS[45] WARNING: Result from CMD not valid. Partial Result:
I don't know what to do ....
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Manually run the wmi script (that cacti is running) to see if it works. Make sure to use the same account that the cacti scheduled task is using when testing the script.
creposukre
Posts: 15
Joined: Sat May 12, 2007 5:51 am
Location: Niort, FRANCE

Post by creposukre »

The command is:
perl C:/Inetpub/wwwroot/cacti/scripts/windows_exchangedb.pl <hostname>
but when i execute it under windows i just can see a cmd window with nothing inside. I tried to replace <hostname> but it's the same, and nothing change in cacti.
What can i do ?

PS: I heard about a software called "nsclient", what is that for, should i install it ?

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

Post by mcutting »

Are your Exchange servers either:

Exchange 2003, running on Windows 2000 ?
Exchange 2000, running on Windows 2000 ?

If either of the above is the case, then these scripts (aparts from the queues one) do not work - they are designed for Exchange 2003 running under Windows 2003.

If you want to use NSClient, then this is a good way forward if you are using Linux. If you are using Windows, then I would stick with WMI, as it can monitor far more than SNMP or PERFMON (which is what NSClient will collect data from).

If you want to use NSClient, this means that you have to have a service running on your Exchange server (called Nagios Agent). This uses the same default port as Exchange, meaning that you are going to run into issues where the NSClient service will sometimes not start.

The port can be changed, but this would need to be reflected in the scripts that you run against the daemon running on the Windows boxes.

Personally, I would stick with WMI if you have CACTI running under Windows.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
creposukre
Posts: 15
Joined: Sat May 12, 2007 5:51 am
Location: Niort, FRANCE

Post by creposukre »

I have cacti running on IIS 6.0 on Windows Server 2003 with Exchange Server 2003 on the same machine... and it's this machine i want to monitor.
I believe you when you say WMI is better than NsClient in my case, i just wanted to know what it is.

Anyway my problem is not here...
Cacti is unable to collect data from WMI...
Other graphs are good (except Exchange graphs)...RRDTool on this graph is good...the WMI command is good...Everything looks good except my graphs.
Cacti log file looks like this :
06/15/2007 02:35:16 PM - SYSTEM STATS: Time:15.6932 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:16 RRDsProcessed:10
06/15/2007 02:35:15 PM - CMDPHP: Poller[0] Time: 14.2102 s, Theads: N/A, Hosts: 1
06/15/2007 02:35:15 PM - CMDPHP: Poller[0] Host[2] DS[40] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get total 2, output: 300082855936
06/15/2007 02:35:15 PM - CMDPHP: Poller[0] Host[2] DS[44] SNMP: v2: 192.168.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.65539, output: 69128468
06/15/2007 02:35:15 PM - CMDPHP: Poller[0] Host[2] DS[44] SNMP: v2: 192.168.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.65539, output: 1964784631
06/15/2007 02:35:14 PM - CMDPHP: Poller[0] Host[2] DS[36] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get total 6, output: 1072824320
06/15/2007 02:35:14 PM - CMDPHP: Poller[0] Host[2] DS[36] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get used 6, output: 753139712
06/15/2007 02:35:14 PM - CMDPHP: Poller[0] Host[2] DS[35] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get used 5, output: 1106575360
06/15/2007 02:35:14 PM - CMDPHP: Poller[0] Host[2] DS[35] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get total 5, output: 2587230208
06/15/2007 02:35:14 PM - CMDPHP: Poller[0] Host[2] DS[40] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get used 2, output: 11640049664
06/15/2007 02:35:13 PM - CMDPHP: Poller[0] Host[2] DS[39] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get total 1, output: 250048479232
06/15/2007 02:35:13 PM - CMDPHP: Poller[0] Host[2] DS[42] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_cpu.php ss_host_cpu 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get usage 0, output: 4
06/15/2007 02:35:13 PM - CMDPHP: Poller[0] Host[2] DS[41] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get total 3, output: 500105216000
06/15/2007 02:35:13 PM - CMDPHP: Poller[0] Host[2] DS[41] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get used 3, output: 426609528832
06/15/2007 02:35:13 PM - CMDPHP: Poller[0] Host[2] DS[39] SERVER: C:\Inetpub\wwwroot\cacti\scripts\ss_host_disk.php ss_host_disk 192.168.0.1 2 2:161:500:rimba:::MD5::[None] get used 1, output: 18536566784
06/15/2007 02:35:13 PM - CMDPHP: Poller[0] Host[2] DS[45] CMD: perl C:/Inetpub/wwwroot/cacti/scripts/windows_exchangedb.pl 192.168.0.1, output: U
06/15/2007 02:35:13 PM - CMDPHP: Poller[0] Host[2] DS[45] WARNING: Result from CMD not valid. Partial Result:
06/15/2007 02:35:01 PM - CMDPHP: Poller[0] Host[2] DS[38] SNMP: v2: 192.168.0.1, dsname: proc, oid: .1.3.6.1.2.1.25.1.6.0, output: 77
06/15/2007 02:35:01 PM - CMDPHP: Poller[0] Host[2] DS[37] SNMP: v2: 192.168.0.1, dsname: users, oid: .1.3.6.1.2.1.25.1.5.0, output: 7
06/15/2007 02:35:01 PM - CMDPHP: Poller[0] Host[2] SNMP: Host responded to SNMP
06/15/2007 02:35:01 PM - CMDPHP: Poller[0] PHP Script Server Started Properly
06/15/2007 02:35:01 PM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cmd
Any idea that could help me solving my problem ?

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

Post by mcutting »

creposukre - Logon to the Exchange server, open a command prompt, and type wmiadap /f, and press enter

Try running the scripts again, from CLI first.

If this doesn't work, then make sure that the IISHelper service has access to WMI.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
wijs2
Posts: 21
Joined: Fri Jun 08, 2007 5:35 am
Location: The Netherlands
Contact:

Post by wijs2 »

The scripts from http://forums.cacti.net/about12383.html, do the work with Windows 2003 SP2, Exchange 2003 SP2?

I'm also getting Nan graphs!
[size=75]Cacti: [color=darkred]0.8.6j[/color][/size]
[size=75]Cactid: [color=darkred]cactid-086preJ-cygwin-1.5.24-2[/color][/size]
[size=75]Cygwin (cygwin1.dll version): [color=darkred]1.5.24-2[/color][/size]
[size=75]MySQL: [color=darkred]mysql-5.0.41-win32[/color][/size]
[size=75]Net-SNMP: [color=darkred]net-snmp-5.4.0-1.win32[/color][/size]
[size=75]Operating System: [color=darkred]MS WS 2003 Ent. SP2 [Version 5.2.3790][/color][/size]
[size=75]PHP: [color=darkred]php-5.2.3-win32[/color][/size]
[size=75]RRDTool: [color=darkred]rrdtool-1.2.15-cygwin-1.5.20[/color][/size]
[size=75]Perl: [color=darkred]ActivePerl-5.8.8.820[/color][/size]
[size=75]Webserver: [color=darkred]IIS V6.0[/color][/size]
[size=75]*** Plugins ***[/size]
[size=75][color=darkred]thold-0.3.4[/color][/size]
wijs2
Posts: 21
Joined: Fri Jun 08, 2007 5:35 am
Location: The Netherlands
Contact:

Post by wijs2 »

Hi,

I'm having the same issues as creposukre. My graphics also show "nan".

This is what I did:

1. Changed "Data Input Methods" to my local paths. example -> E:/Perl/bin/perl.exe E:/wwwroot/scripts/windows_exchangemessages.pl <MAILSERVER>
2. Changed the security settings in wmimgmt.msc on the <MAILSERVER> as stated in FAQ of BSOD2600 and stated in http://forums.cacti.net/about12383.html
3. Followed up the rest of WMI related changes as stated in the FAQ of BSOD2600

Result command line:

1.
input: E:/Perl/bin/perl.exe E:/wwwroot/scripts/windows_exchangemessages.pl <MAILSERVER>
output: MB_MsgsSubmitted:55716 MB_MsgsDelivered:154743 MB_MsgsSent:63576 SMTP_MsgBytesReceived:87343843 SMTP_MsgBytesSent:23127032 SMTP_MsgsDelivered:3334 SMTP_MsgsReceived:1606 SMTP_MsgsSent:845

No errors in the logs

Graph debug:
E:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=1181833332 \
--end=1181919732 \
--title="<MAILSERVER> - Exchange (Messages)" \
--rigid \
--base=1000 \
--height=175 \
--width=575 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2007/06/14 17\:02\:12 To 2007/06/15 17\:02\:12\c" \
COMMENT:" \n" \
--vertical-label="Messages/Sec" \
--slope-mode \
--font TITLE:10:C:\Windows\Fonts\Tahoma.ttf \
--font AXIS:8:C:\Windows\Fonts\Tahoma.ttf \
--font LEGEND:8:C:\Windows\Fonts\Tahoma.ttf \
--font UNIT:8:C:\Windows\Fonts\Tahoma.ttf \
DEF:a="E\:/wwwroot/rra/jbmail_smtp_msgbytesreceiv_187.rrd":MB_MsgsDelivered:AVERAGE \
DEF:b="E\:/wwwroot/rra/jbmail_smtp_msgbytesreceiv_187.rrd":MB_MsgsSubmitted:AVERAGE \
DEF:c="E\:/wwwroot/rra/jbmail_smtp_msgbytesreceiv_187.rrd":MB_MsgsSent:AVERAGE \
DEF:d="E\:/wwwroot/rra/jbmail_smtp_msgbytesreceiv_187.rrd":SMTP_MsgsDelivered:AVERAGE \
DEF:e="E\:/wwwroot/rra/jbmail_smtp_msgbytesreceiv_187.rrd":SMTP_MsgsReceived:AVERAGE \
DEF:f="E\:/wwwroot/rra/jbmail_smtp_msgbytesreceiv_187.rrd":SMTP_MsgBytesReceiv:AVERAGE \
DEF:g="E\:/wwwroot/rra/jbmail_smtp_msgbytesreceiv_187.rrd":SMTP_MsgsSent:AVERAGE \
DEF:h="E\:/wwwroot/rra/jbmail_smtp_msgbytesreceiv_187.rrd":SMTP_MsgBytesSent:AVERAGE \
LINE1:a#00CF00:"MBox Msgs Delivered" \
GPRINT:a:LAST:"Current\:%5.1lf" \
GPRINT:a:AVERAGE:"Average\:%5.1lf" \
GPRINT:a:MAX:"Maximum\:%5.1lf" \
COMMENT:"(Total 0)\n" \
LINE1:b#002A97:"MBox Msgs Submitted" \
GPRINT:b:LAST:"Current\:%5.1lf" \
GPRINT:b:AVERAGE:"Average\:%5.1lf" \
GPRINT:b:MAX:"Maximum\:%5.1lf" \
COMMENT:"(Total 0)\n" \
LINE1:c#00A0C1:"MBox Msgs Sent" \
GPRINT:c:LAST:" Current\:%5.1lf" \
GPRINT:c:AVERAGE:"Average\:%5.1lf" \
GPRINT:c:MAX:"Maximum\:%5.1lf" \
COMMENT:"(Total 0)\n" \
LINE1:d#FFFF00:"SMTP Msgs Delivered" \
GPRINT:d:LAST:"Current\:%5.1lf" \
GPRINT:d:AVERAGE:"Average\:%5.1lf" \
GPRINT:d:MAX:"Maximum\:%5.1lf" \
COMMENT:"(Total 0)\n" \
LINE1:e#FF5F00:"SMTP Msgs Received" \
GPRINT:e:LAST:" Current\:%5.1lf" \
GPRINT:e:AVERAGE:"Average\:%5.1lf" \
GPRINT:e:MAX:"Maximum\:%5.1lf" \
COMMENT:"(Total 0," \
COMMENT:"0 bytes)\n" \
LINE1:g#F51D30:"SMTP Msgs Sent" \
GPRINT:g:LAST:" Current\:%5.1lf" \
GPRINT:g:AVERAGE:"Average\:%5.1lf" \
GPRINT:g:MAX:"Maximum\:%5.1lf" \
COMMENT:"(Total 0," \
COMMENT:"0 bytes)\n"

NTFS permissions are set correctly on the folder e:\wwwroot\rra

C:\Inetpub\wwwroot\cacti\rra\
IIS_WPG----Modify
IUSR_----Modify

(this folder, subfolder and files)

Strange thing is tho that new graphics are made with entirly different permissions. These are:
Domain users----Read & Execute
Everyone----Read & Execute
Cacti_scheduled_tasks_account----Read & Write

As you can see no inherited permissions! So I set the permissions as they should be, no result!!! Also the Owner is set to the Cacti_scheduled_tasks_account. This is also not the same al the other rrd files in the same directory!

Permissions should be good after this! Right?

What am I missing? My graphs are not updated!!!
[size=75]Cacti: [color=darkred]0.8.6j[/color][/size]
[size=75]Cactid: [color=darkred]cactid-086preJ-cygwin-1.5.24-2[/color][/size]
[size=75]Cygwin (cygwin1.dll version): [color=darkred]1.5.24-2[/color][/size]
[size=75]MySQL: [color=darkred]mysql-5.0.41-win32[/color][/size]
[size=75]Net-SNMP: [color=darkred]net-snmp-5.4.0-1.win32[/color][/size]
[size=75]Operating System: [color=darkred]MS WS 2003 Ent. SP2 [Version 5.2.3790][/color][/size]
[size=75]PHP: [color=darkred]php-5.2.3-win32[/color][/size]
[size=75]RRDTool: [color=darkred]rrdtool-1.2.15-cygwin-1.5.20[/color][/size]
[size=75]Perl: [color=darkred]ActivePerl-5.8.8.820[/color][/size]
[size=75]Webserver: [color=darkred]IIS V6.0[/color][/size]
[size=75]*** Plugins ***[/size]
[size=75][color=darkred]thold-0.3.4[/color][/size]
creposukre
Posts: 15
Joined: Sat May 12, 2007 5:51 am
Location: Niort, FRANCE

Post by creposukre »

mcutting - I tried the command "wmiadap /f", but there's no result.
I deeply looked up in http://forums.cacti.net/about12383.html and i've the same problem than joex51. When i take a look in my server logs i can see :

Event ID: 47
WMI ADAP was unable to retrieve data from the PerfLib subkey: SYSTEM\CurrentControlSet\Services\mssindex\Performance\Library, code d'erreur : 0x80041009

Then i search Microsoft KB and found this : http://support.microsoft.com/kb/834475/en-us
which not helps very much !
creposukre
Posts: 15
Joined: Sat May 12, 2007 5:51 am
Location: Niort, FRANCE

Post by creposukre »

I rebooted my server... and now it works well :(
Weird... :-?
In any case thank you guys for helping me. :D

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

Post by mcutting »

creposukre wrote:mcutting - I tried the command "wmiadap /f", but there's no result.
I deeply looked up in http://forums.cacti.net/about12383.html and i've the same problem than joex51. When i take a look in my server logs i can see :

Event ID: 47
WMI ADAP was unable to retrieve data from the PerfLib subkey: SYSTEM\CurrentControlSet\Services\mssindex\Performance\Library, code d'erreur : 0x80041009

Then i search Microsoft KB and found this : http://support.microsoft.com/kb/834475/en-us
which not helps very much !
There won't be any output from the command "wmiadap /f". This simply rebuilds the WMI database on the local machine. Glad you got it working anyway
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
wijs2
Posts: 21
Joined: Fri Jun 08, 2007 5:35 am
Location: The Netherlands
Contact:

Post by wijs2 »

Still having nan-graphs :-(

Any ideas looking at my previous posts?
[size=75]Cacti: [color=darkred]0.8.6j[/color][/size]
[size=75]Cactid: [color=darkred]cactid-086preJ-cygwin-1.5.24-2[/color][/size]
[size=75]Cygwin (cygwin1.dll version): [color=darkred]1.5.24-2[/color][/size]
[size=75]MySQL: [color=darkred]mysql-5.0.41-win32[/color][/size]
[size=75]Net-SNMP: [color=darkred]net-snmp-5.4.0-1.win32[/color][/size]
[size=75]Operating System: [color=darkred]MS WS 2003 Ent. SP2 [Version 5.2.3790][/color][/size]
[size=75]PHP: [color=darkred]php-5.2.3-win32[/color][/size]
[size=75]RRDTool: [color=darkred]rrdtool-1.2.15-cygwin-1.5.20[/color][/size]
[size=75]Perl: [color=darkred]ActivePerl-5.8.8.820[/color][/size]
[size=75]Webserver: [color=darkred]IIS V6.0[/color][/size]
[size=75]*** Plugins ***[/size]
[size=75][color=darkred]thold-0.3.4[/color][/size]
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

What happens if you change "E:/wwwroot/" to "<path_cacti>" in your data source, clear the poller cache, and try again ? May not make any difference, but I cannot see any reason as to why this will not work.

Does your poller account have access to WMI ? Is the output above from the same account used to run the poller ?

Do any PERL scripts run properly under CACTID ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests