New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Exchange Mailbox Sensor with Exchange 2016

Votes:

0

Your Vote:

Up

Down

Hi,

We have an issue with the Exchange Mailbox (PowerShell) sensor.

We are using this sensor to get alerted if a specific Mailbox is holding more than a few E-Mails this indicates that a script is not running correctly (sadly this is happening). But PRTG was a lot of help to get us notified.

A few days ago we changed from our old Exchange Server 2010 to a new Exchange Server 2016, after this change we are getting an item count that is a lot higher than before (like 154 more).

Surely we checked the mailbox and there aren’t 154 E-Mails in it. The sensor seems to function, the count goes up and down but the "Item Count" is a bit messed up. Even when this Mailbox is empty we get the "Item Count" from 154.

I also checked other Mailboxes the "Item Count" was different but the result is similar.

Maybe this sensor needs a small adjustment to get the right values from the exchange Server 2016.

Many thanks in advance.

exchange-2016 exchange-mailbox exchange-powershell

Created on Jan 31, 2019 4:33:34 PM by  Jacqueline Weigel (11) 2



17 Replies

Votes:

0

Your Vote:

Up

Down

Hi Jacqueline

Well, the sensor is using the IMAP protocol, which should still apply to 2016 :) I suspect something else to be off here. Are those mailboxes actively used by anybody? Or are they just there for checking purposes?

When recreating the Sensor in question, do you get the same results? Could you enable the
Write Result to Disk option in the Sensor settings and provide me with the log? It resides in the following directory:

C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)

...and should have the Sensor ID within it's filename. Please post the log content here and make sure to add !NOPUBLISH to it to avoid accidental publishing of confidential data.


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Feb 1, 2019 11:19:17 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello Stephan,

this mailbox isn't actively used by a real person. Its only purpose is to receive some E-Mails, a scheduled task executes a script that checks the Mails within it, does something with the information and then deletes the mail within this mailbox.

I recreated this Sensor several times, but with the exact same results.

I also took a look at the Logs from the sensor but I can’t see an obvious reason behind the values it displays.

Many thanks in advance.

Created on Feb 1, 2019 11:50:56 AM by  Jacqueline Weigel (11) 2



Votes:

0

Your Vote:

Up

Down

Could you post the log? Then I'll take a look :)


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Feb 1, 2019 11:58:40 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Stephan,

shortly after the normal post I added the logs with "!NOPUBLISH" like you suggested :). To keep everyone updated as well. Can you see them?

Created on Feb 1, 2019 12:02:31 PM by  Jacqueline Weigel (11) 2



Votes:

0

Your Vote:

Up

Down

Yep, I can see them, and there are indeed no indications of why the amount of mails doesn't match. Just out of curiosity, does this sensor have a Recycled folder or something like that? What does the following command, executed in the Exchange Management Shell, yield:

Get-Mailbox | Get-MailboxFolderStatistics | Where {$_.Name -match “Inbox|Sent Items|Deleted Items|Junk E-Mail”} | FT Identity, Name, ItemsInFolder -Autosize

Note that this will check all mailboxes. When you put Get-Mailbox -Anr '<SAMaccountName>'

...at the beginning, it should check only for the user's mailbox. That is, if I got the -Anr description correctly :)


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Feb 1, 2019 12:25:42 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Stephan,

Thank you for your help.

Get-Mailbox -Identity MAILBOXAD[email protected] | Get-MailboxFolderStatistics | Where {$_.Name -match "Inbox|Sent Items|Deleted Items|Junk E-Mail"} | FT Identity, Name, ItemsInFolder –Autosize

Does not return any results, because we use a German System :). If I adapt the code to that, we get the results we desire…

Identity					Name			ItemsInFolder
COMPANY.DOMAIN/…/MAILBOX\Posteingang		Posteingang		18
COMPANY.DOMAIN/…/MAILBOX\Gesendete Elemente	Gesendete Elemente	0
COMPANY.DOMAIN/…/MAILBOX\Gelöschte Elemente	Gelöschte Elemente	0
COMPANY.DOMAIN/…/MAILBOX\Junk-E-Mail		Junk-E-Mail		0

Even when I ask the Mailbox without the filter (to get absolutely everything) i can’t see the 154 that are presented to prtg.

Within a folder named “Deletions” are several items but this count exceeds the 154 by over multiple thousand Items, so this seems to be irrelevant.

The other folders are empty or nearly empty. If I count every Item besides the "Posteinngang" (that we like to monitor with 18 Items) and "Deletions" together I get 8 Items in total.

:) and if you mean the "Deleted Items" folder with "Recycled" folder then yes this Mailbox does have one but it is empty.

Created on Feb 1, 2019 2:27:47 PM by  Jacqueline Weigel (11) 2



Votes:

0

Your Vote:

Up

Down

Thanks for the testing! :) This is getting mysterious. Could you check if your own inbox is being monitored correctly?


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Feb 1, 2019 7:19:46 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Stephan,

I checked several other mailboxes and sadly no count is correct.

They all differ with other item counts so there is no consistency. So I guess every mailbox gets its own wrong basic item count.

Many thanks in advance.

Created on Feb 4, 2019 6:46:33 AM by  Jacqueline Weigel (11) 2



Votes:

1

Your Vote:

Up

Down

I'll forward this to our Sensor team, maybe they have some additional ideas. Might take a day or two until I hear from them. Thanks for your patience!


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Feb 4, 2019 6:50:50 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Turns out that we'll need the output of the following two commands, too:

Get-MailboxStatistics 
Get-MailboxStatistics -StoreMailboxIdentity [MailboxGuid/or LegacyDN]

The parameter "-StoreMailboxIdentity" is explained here. Thanks!


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Feb 4, 2019 4:06:15 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Stephan,

with this command we got the wrong count! It seems to count some items that are hidden and used by the system only.

So prtg just shows what it gets with this command, but how can we get the count right?

In our case and I guess in general it would be nice to get a reliable count of items that are "really" present in the Mailbox.

Get-MailboxStatistics -Database "DATABASENAME" -Filter 'DisplayName -eq "MAILBOXNAME" | Select DisplayName, ItemCount, DeletedItemCount, AssociatedItemCount,TotalItemSize | Sort-Object TotalItemSize -Descending
DisplayName         : MAILBOXNAME
ItemCount           : 159
DeletedItemCount    : 12044
AssociatedItemCount : 88
TotalItemSize       : 1.192 MB (1,249,913 bytes)

Many thanks in advance.

Created on Feb 5, 2019 8:34:24 AM by  Jacqueline Weigel (11) 2



Votes:

0

Your Vote:

Up

Down

This should only be the case for Exchange Online, at least according to this document. But you're using Exchange on premises, right?


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Feb 5, 2019 10:12:59 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Stephan,

i have read this article. And yes you are correct we are using Exchange on premises and not Exchange Online.

I can't get why the counts are different from each other...

Many thanks in advance.

Created on Feb 5, 2019 10:24:46 AM by  Jacqueline Weigel (11) 2



Votes:

0

Your Vote:

Up

Down

It would be interesting to know if these can actually be filtered within the PowerShell command we're using...I'll check back with our Exchange Administrator regarding this :)


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Feb 5, 2019 11:47:55 AM by  Stephan Linke [Paessler Support]



Votes:

1

Your Vote:

Up

Down

He hasn't heard of that either, but hasn't kept an eye on it as well during his reporting exports :( I'll open up a bug ticket regarding this to see if we can use any other approach for this sensor.

Thanks for reporting it!


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Feb 5, 2019 12:44:17 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Been following this a while now, I can't replicate it right now, but why don't you just create a script-sensor and use this command:

Get-MailboxFolderStatistics

The folder might be called INBOX but could be also language specific...

What you want is a simple item-count in the INBOX if I understand you right...

https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/get-mailboxfolderstatistics?view=exchange-ps

Regards

Florian

Created on Feb 5, 2019 3:26:39 PM by  Florian Rossmark (4,188) 3 2



Votes:

1

Your Vote:

Up

Down

It's the sensor that should actually show the elements in the inbox and ignore everything MS puts into it for administrative purposes :) As of now, due to that, the counter shows incorrect information (compared to manually checking the inbox) and that might cause confusion :)


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Feb 5, 2019 3:53:23 PM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


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.