Exchange Perl Scripts via WMI
Moderators: Developers, Moderators
What class and what values are you looking at for those RPC graphs? I've found that some of the "Persecond" type counters are really per second, and are only valid for that second so it doesn't give a very good number because it's only looking at that specific second every 5 minutes as opposed to an average over those 5 minutes, or something like that. Some of thse "cooked" counters are better than they need to be, at least for what I'm doing.
-
- Cacti User
- Posts: 52
- Joined: Fri Mar 12, 2004 3:01 am
- Location: Beusichem
- Contact:
I imported the cacti_graph_template_exchange_connections.xml and copied all of the perl scripts in this topic to my <path>/scripts directory. I added the graphs to our exchange server but it seems to give no output as shown in the picture.
When I look at the graph source I can see the following:
I'm missing something here, can somebody give some advise?
When I look at the graph source I can see the following:
Code: Select all
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=1095083169 \
--end=1095169569 \
--title="Q-srv2 - Exchange Connections" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2004/09/13 15:46:09 To 2004/09/14 15:46:09\c" \
COMMENT:"\n" \
--vertical-label="Connections" \
DEF:a="C\:\Apache2\htdocs\cacti/rra/qsrv2_count_active_users_221.rrd":count_users:AVERAGE \
DEF:b="C\:\Apache2\htdocs\cacti/rra/qsrv2_count_active_users_221.rrd":count_active_users:AVERAGE \
AREA:a#005199:"Users" \
GPRINT:a:LAST:" Current\:%8.0lf" \
GPRINT:a:AVERAGE:"Average\:%8.0lf" \
GPRINT:a:MAX:"Maximum\:%8.0lf\n" \
LINE2:b#FF4105:"Active Users" \
GPRINT:b:LAST:"Current\:%8.0lf" \
GPRINT:b:AVERAGE:"Average\:%8.0lf" \
GPRINT:b:MAX:"Maximum\:%8.0lf"
- Attachments
-
- 1.JPG (115.96 KiB) Viewed 10783 times
-
- Cacti User
- Posts: 52
- Joined: Fri Mar 12, 2004 3:01 am
- Location: Beusichem
- Contact:
I get the following message:
This should be the command to run the script, shouldn't it?
Code: Select all
C:\Documents and Settings\Administrator.QUAERE>perl C:\Apache2\htdocs\cacti\scri
pts\w32_exch_query_isstats.pl q-srv2 get ActiveUserCount,UserCount
Check the computer and class name.
No information was found on the specified class!
What version of OS and Exchange you running? I know this works under Windows 2003 and Exchange 2003 -- can't guarantee others as I have no way of testing against them.
It uses the WMI class "Win32_PerfFormattedData_MSExchangeIS_MSExchangeIS" ... can you use WMI Browser to that machine and see if that exists in \\root\cimv2 WMI namespace?
It uses the WMI class "Win32_PerfFormattedData_MSExchangeIS_MSExchangeIS" ... can you use WMI Browser to that machine and see if that exists in \\root\cimv2 WMI namespace?
JTB, that link you posted made my SQL statistics appear in the WMI a few weeks ago, I however found it about a day before you posted it...none the less I was ECSTATIC to finally get some SQL statistics since SNMP support for SQL can only be obtained at install time if SNMP is installed on the machine. Thanks, I'm sure anyone using WMI will find it useful at least once. Oh, it also made my BackupExec stats show up too
-
- Cacti User
- Posts: 52
- Joined: Fri Mar 12, 2004 3:01 am
- Location: Beusichem
- Contact:
I'm testing it on a Win2k Server and Exchange 2000. Maybe that causes the problem. I'll get to testing this on a Win2k3 and Exchange 2003 tommorow.DevilSun wrote:What version of OS and Exchange you running? I know this works under Windows 2003 and Exchange 2003 -- can't guarantee others as I have no way of testing against them.
It uses the WMI class "Win32_PerfFormattedData_MSExchangeIS_MSExchangeIS" ... can you use WMI Browser to that machine and see if that exists in \\root\cimv2 WMI namespace?
-
- Cacti User
- Posts: 52
- Joined: Fri Mar 12, 2004 3:01 am
- Location: Beusichem
- Contact:
I tried to use the following line:
Outcome was: Can't talk WMI with host.
The WMI services are running on the target host.
So my 2c's are: The firewall is blocking some traffic.
Which port should we open up on the firewall in order to make this work? any suggestions?
[Edit]
I did take a look in the WMI Browser:
Code: Select all
perl C:\Apache2\htdocs\cacti\scripts\w32_exch_query_isstats.pl 'WAN Ipadres' get ActiveUserCount,UserCount
The WMI services are running on the target host.
So my 2c's are: The firewall is blocking some traffic.
Which port should we open up on the firewall in order to make this work? any suggestions?
[Edit]
I did take a look in the WMI Browser:
- Attachments
-
- wmi.JPG (34.67 KiB) Viewed 10717 times
Last edited by ..::BFS::.. on Wed Sep 22, 2004 9:18 am, edited 1 time in total.
forget it... opening wmi on the firewall leaves a big hole..::BFS::.. wrote:I tried to use the following line:
Outcome was: Can't talk WMI with host.Code: Select all
perl C:\Apache2\htdocs\cacti\scripts\w32_exch_query_isstats.pl 'WAN Ipadres' get ActiveUserCount,UserCount
Which port should we open up on the firewall in order to make this work? any suggestions?
The WMI services are running on the target host.
-
- Cacti User
- Posts: 52
- Joined: Fri Mar 12, 2004 3:01 am
- Location: Beusichem
- Contact:
WMI uses RPC ports, so I believe it's 135 and 445 initially, then I believe it allocates ports dynamically for use with communication although I'm not sure on that last part.
I've never tried using a computer name in quotes like you did (i.e. 'WAN Ipadres') or whatever...out of curiousity did you try just an ip address, or even any WMI stuff locally on your network the same way?
I've never tried using a computer name in quotes like you did (i.e. 'WAN Ipadres') or whatever...out of curiousity did you try just an ip address, or even any WMI stuff locally on your network the same way?
-
- Cacti User
- Posts: 52
- Joined: Fri Mar 12, 2004 3:01 am
- Location: Beusichem
- Contact:
Hi
Using your original Exchange script i have changed the wmi class so it works with Exchange 2000.
The problem is that i get valid data when running via the commandline but when it runs in cacti, the output states output:u and the graphs do not update.
I am running the latest cacti version 8.6b
Has anybody any ideas on this, details are copied below?
CACTI LOG:
10/13/2004 12:29:08 PM - CMDPHP: Poller[0] Host[3] CMD: perl c:\Inetpub\wwwroot\cacti\cacti-0.8.6/scripts/w32_exch_query_mailboxstats.pl 192.168.0.28 get SendQueueSize,ReceiveQueueSize,MessagesSentPermin,MessagesSubmittedPermin,MessagesDeliveredPermin _Total, output: U
COMMANDLINE results:
C:\Documents and Settings\>perl c:\Inetpub\wwwroot\cacti\cacti-0.8.6/scr
ipts/w32_exch_query_mailboxstats.pl 192.168.0.28 get SendQueueSize,ReceiveQueueS
ize,MessagesSentPermin,MessagesSubmittedPermin,MessagesDeliveredPermin _Total
SendQueueSize:0 ReceiveQueueSize:0 MessagesSentPermin:0 MessagesSubmittedPermin:
1 MessagesDeliveredPermin:0
Using your original Exchange script i have changed the wmi class so it works with Exchange 2000.
The problem is that i get valid data when running via the commandline but when it runs in cacti, the output states output:u and the graphs do not update.
I am running the latest cacti version 8.6b
Has anybody any ideas on this, details are copied below?
CACTI LOG:
10/13/2004 12:29:08 PM - CMDPHP: Poller[0] Host[3] CMD: perl c:\Inetpub\wwwroot\cacti\cacti-0.8.6/scripts/w32_exch_query_mailboxstats.pl 192.168.0.28 get SendQueueSize,ReceiveQueueSize,MessagesSentPermin,MessagesSubmittedPermin,MessagesDeliveredPermin _Total, output: U
COMMANDLINE results:
C:\Documents and Settings\>perl c:\Inetpub\wwwroot\cacti\cacti-0.8.6/scr
ipts/w32_exch_query_mailboxstats.pl 192.168.0.28 get SendQueueSize,ReceiveQueueS
ize,MessagesSentPermin,MessagesSubmittedPermin,MessagesDeliveredPermin _Total
SendQueueSize:0 ReceiveQueueSize:0 MessagesSentPermin:0 MessagesSubmittedPermin:
1 MessagesDeliveredPermin:0
Who is online
Users browsing this forum: No registered users and 1 guest