Hi,
I need to monitor the last time since received email. As we have over 300 emails, i need a sensor that can monitor when the last email arrived. If we don`t receive an email during one hour than give an error. Currently we are using a PowerShell script that monitors the number of emails present in a mailbox, we need to add monitoring by hour. Is there a way to achieve this with PRTG? Can someone give us a hand? This is the script we are using for number of emails:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://server.domain/PowerShell/ -Authentication Kerberos Import-PSSession $Session -DisableNameChecking $Inbox = Get-MailboxFolderStatistics -Identity "mailbox1.com"| Where {$_.Name -match "Inbox|Postvak IN"} | Select ItemsInFolder Write-Host "<prtg>" "<result>" "<channel>Country - Mailbox1</channel>" "<value>$($Inbox.ItemsInFolder)</value>" "</result>" $Inbox = Get-MailboxFolderStatistics -Identity "mailbox2.com"| Where {$_.Name -match "Inbox|Postvak IN"} | Select ItemsInFolder Write-Host "<result>" "<channel>Country - Mailbox2</channel>" "<value>$($Inbox.ItemsInFolder)</value>" "</result>" Remove-PSSession $Session "</prtg>"
Add comment