PDA

View Full Version : Monitoring online mailboxes on an exchange server


schyth
19-06-2008, 07:39
Hi,

Im trying to monitor how many mailboxes are online on my Exchange server cluster - the values is present in the perfmon key "\MSFTESQL-Exchange:Service\Catalogs mounted", problem is that this key have a - sign in it, which according to the Zabbix manual isn't supported in a key. Im just getting the message that it's not supported.

Fair enough, so im turning it around, making a UserParameterin the config file using the vbs script found in this thread

http://www.zabbix.com/forum/showthread.php?t=6153

When i run the script manually with

cscript //nologo script.vbs "\MSFTESQL-Exchange:Service\Catalogs mounted"

i get the correct value (6 as a float value in my case), but when i insert this line into the zabbit conf file:

UserParameter=msexmb.onl,cscript //nologo script.vbs "\MSFTESQL-Exchange:Service\Catalogs mounted"

and run zabbix_agentd.exe -c zabbix_agentd.conf -t msexmb.onl i get this error message:

c:\zabbix\script.vbs(32,1) Microsoft VBScript runtime error: Subscript out of range: '[number 1]'

I am so lost as the script works outside the zabbix_agentd.conf file...

Anyone got any good ideas?

schyth
19-06-2008, 10:14
Just adding the agent debug info, not that it tells me much - but here it is:

4828:20080619:102238 Requested [msexmb.onl]
4828:20080619:102239 Before
4828:20080619:102239 Run remote command [cmd /C "cscript //Nologo c:\zabbix\MSEXMBONL.vbs "\MSFTESQL-Exchange:Service\Catalogs mounted""] Result [102] [c:\zabbix\MSEXMBONL.]...
4828:20080619:102239 Sending back [c:\zabbix\MSEXMBONL.vbs(32, 1) Microsoft VBScript runtime error: Subscript out of range: '[number: 1]']
2188:20080619:102256 Processing request.

schyth
19-06-2008, 11:12
Added a few debugs to the vbs script, and even though the typeperf command string is correct, the command output when running it through the zabbix_agentd is:

C:\zabbix>zabbix_agentd.exe -c zabbix_agentd.conf -t msexmb.onl
msexmb.onl [t|
Exiting please wait...
Error: No valid counters.]

in stead of:

"(PDH-CSV 4.0)","\\DKEXMB01\MSFTESQL-Exchange:Service\Catalogs mounted"
"06/19/2008 11:10:57.965","6.000000"
Exiting please wait...
The command completed successfully.

as it should be...

Can this be some sort of security issue?
As i see it the zabbix_agentd runs a local service account - and i would suspect the vbs script being executed as that same user.

swaterhouse
19-06-2008, 14:17
It could be security related but I doubt it. The best way to try is to set the service to log on as yourself or an admin TEMPORARILY to see if it works. If it does try to figure out what permission the service needs and create a user with only the needed permissions and set the service to run under that account.

schyth
19-06-2008, 14:45
Tried to make the service run as the domainadmin, but with the same result...