What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Monitoring IIS 6 SMTP Server on Windows Server 2012R2

Votes:

0

We are trying to monitor the RemoteQueueLength in WMI for IIS6 SMTP on Windows Server 2012R2. PRTG returns the following from running a batch file calling the 64bit version of Powershell. We did try just running it under the native 32bit Powershell that PRTG utilizes still.

C:\Windows\system32>C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -file "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\checkSMTPQueue.ps1" 
Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESS
DENIED))
At C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\checkSMTPQ
ueue.ps1:3 char:28
+ $SMTPObject = Get-WmiObject <<<<  -Query "SELECT RemoteQueueLength,MessageSen
dRetries,NDRsGenerated,OutboundConnectionsRefused,OutboundConnectionsTotal,Remo
teRetryQueueLength,TotalMessagesSubmitted from Win32_PerfRawData_SMTPSVC_SMTPSe
rver Where Name='_Total'" -ComputerName server01a
    + CategoryInfo          : NotSpecified: (:) [Get-WmiObject], UnauthorizedA 
   ccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.Pow 
   erShell.Commands.GetWmiObjectCommand
 
<prtg>
<result><channel>RemoteQueueLength</channel><value></value></result>
</prtg>

From the 64bit powershell command line, it works:

PS>  Get-WmiObject -Query "SELECT RemoteQueueLength from Win32_PerfRawData_SMTPSVC_SMTPSe
rver Where Name ='_Total'" -ComputerName server01a


__GENUS           : 2
__CLASS           : Win32_PerfRawData_SMTPSVC_SMTPServer
__SUPERCLASS      :
__DYNASTY         :
__RELPATH         :
__PROPERTY_COUNT  : 1
__DERIVATION      : {}
__SERVER          :
__NAMESPACE       :
__PATH            :
RemoteQueueLength : 0

From the 32bit powershell command line, it fails:

PS C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML> Get-WmiObject -Query "SELECT RemoteQueueLength from Win32_PerfRawData_SMTPSVC_SMTPServer Where Name ='_Total'" -ComputerName server01
Get-WmiObject : Invalid class
At line:1 char:14
+ Get-WmiObject <<<<  -Query "SELECT RemoteQueueLength from Win32_PerfRawData_SMTPSVC_SMTPServer Where Name ='_Total'" -ComputerName v-smtp-02a
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

Any thoughts on how to get PRTG to monitor queue info? Have we simply over thought it and there is a simpler solution?

32bit 32bit-to-64-bit 64bit powershell smtp wmi

Created on Jun 27, 2014 8:41:38 PM



6 Replies

Votes:

0

Hello,

did you consider using the WMI Custom Sensor? Just supply the WQL Query

SELECT RemoteQueueLength from Win32_PerfRawData_SMTPSVC_SMTPServer Where Name ='_Total'

into an according wql-file, and then use this sensor?

best regards.

Created on Jul 2, 2014 12:35:54 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Good morning,

We were already using WQL on the 2003 version of these servers running IIS 6.0 SMTP. The WQL scripts are essentially the same line suggested above.

I think the issue seems to stem from Perfmon not providing counters when run in 32bit mode. Starting PerfMon, mmc really, in 32bit mode does not show the SMTP counters. 64bit mode does.

Any suggestions?

-Scott

Created on Jul 3, 2014 1:30:59 PM



Votes:

0

I'm afraid no, we do not have suggestions for it. Did you consult with Microsoft already? It's their performance counter(s) and their PerfMon.

Created on Jul 3, 2014 2:01:58 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Wasn't quite expecting that kind of response. We are aware that it is Microsoft performance counters, but it is your monitoring product we pay to monitor our service. I wasn't looking for an immediate fix, perhaps you can tell me when your product will be able to monitor Microsoft's 64bit counters?

-Scott

Created on Jul 3, 2014 2:06:13 PM



Votes:

0

That not even the "normal" Pefmon can access the counters, is a sign that the issue is more on the counter side, than on the side accessing it. For PRTG currently there are no plans for a 64bit Probe in the near future. Sorry.

Created on Jul 3, 2014 2:27:06 PM by  Torsten Lindner [Paessler Support]



Votes:

0

I just ran into this myself. Attempting to monitor the IIS 6.0 SMTP service in Windows 2012 R2 core. 64-bit queries work, but there is no class registered for 32-bit. I realize that Paessler has no plans to release a 64 bit version, but this significantly diminishes the usefulness of this particular sensor since most systems will be running 64bit these days. I have run into the 64/32 bit issue with other sensors as well and it seems like Paessler would want to provide some sort of advice or solution since this will affect an increasing number of devices and users.

Created on Jun 10, 2016 6:46:35 PM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.