Please add "Whitespace" channel to "Exchange Database sensor"!
Exchange Whitespace
Votes:
0
11 Replies
Votes:
0
we decided not to add that channel to our existing exchange sensors, because even Microsoft says to get reliable data on the whitespace of a database you need to dismount the database and use ESEUTIL
http://blogs.technet.com/b/exchange/archive/2011/12/14/database-maintenance-in-exchange-2010.aspx -> 'How can I check whitepace in a database?
Votes:
0
Ok, please add "AvailableNewMailboxSpace" channel, it's enough.
Votes:
0
Hello,
we will see what we can do!
Votes:
0
Hi,
as this is the first request for adding this channel we want to make a script available for you to see if this value is usefull and to give other customers the chance to comment on it.
As you can see, the request itself and parsing the value is only a 3 liner + output, the rest of the script may be cut off but it may be helpful in case of an error.
Simply pack the following script in a .ps1-file that must be stored in the 'Custom Sensors\EXEXML'-folder of your PRTG-Installation. After that you can add it as a 'EXE/Script Advanced'-sensor.
Param( [string]$server, [string]$user, [string]$password, [string]$item="Mailboxdatabase" ) # To get this script running with PRTGNetworkMonitor you need to enable RemoteSigned-scripting for 32bit-processes. # This can be done with running 'c:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe "Set-ExecutionPolicy RemoteSigned"' on a system with default paths # Examples of Parameters-string in sensorsettings # Environment ->'Set placeholders as environmentValues': # -item MailboxDataBase # Environment ->'Default Environment': # -server %host -user %windowsdomain\%windowsuser -password %windowspassword -item MailboxDatabase # -server <ip-address or fqdn of the host> -user <domainname>\<username> -password <password> -item MailboxDatabase # declare script-wide variables $warningpreference = "silentlyContinue" $script:resultText = "OK" function main { $statis = Get-MailboxDatabase -status $item; $statis.AvailableNewMailboxSpace -match "[\(]{1}(.*?)\bbytes[\)]{1}" $value = [long]$matches[1]; $result = @" <result> <value>$value</value> <unit>BytesMemory</unit> <channel>Available New Mailbox Space</channel> </result> <text> $($json.status) </text> "@ write-host @" <?xml version=1.0 encoding=UTF-8 ?> <prtg> $result </prtg> "@ } function checkCredentials { $paramerrors = @() if ($server -eq $null) { if (-not ($Env:prtg_host -eq $null)) { $script:server = $Env:prtg_host } else { $paramerrors += "No Serverinformation applied" } } if ($user -eq $null) { if ($Env:prtg_windowsuser -ne $null) { $user = $Env:prtg_windowsuser } else { $paramerrors += "No Userinformation applied" } } if ($user -eq $null) { if (($Env:prtg_windowsdomain -ne $null) -and ($Env:prtg_windowsuser -ne $null)) { $user = "$($Env:windowsdomain)\$($Env:prtg_windowsuser)" } else { $paramerrors += "No Domaininformation applied" } } if ($password -eq $null) { if ($Env:prtg_windowspassword -ne $null) { $password = $Env:prtg_windowspassword } else { $paramerrors += "No Password applied" } } if ($paramerrors.count -gt 0) { printErrorXml "$([string]::join(", ", $paramerrors))" } $secpasswd = ConvertTo-SecureString $password -AsPlainText -Force $myCred = New-Object System.Management.Automation.PSCredential ($user, $secpasswd) $script:session = connect $myCred } function connect ($mycred){ # use the currently loggedon user for the connection #$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://$server/PowerShell/ -Authentication Kerberos # or use the credentials from params $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://$server/PowerShell/ -Authentication Kerberos -Credential $myCred # using out-null to supress the instantiating-message within the output... Import-PSSession $Session -WarningAction silentlyContinue | out-null $session } function disconnect($session) { # leave the session and free the connection, the default connectionlimit is 18 to a specific Computer! Exit-pssession if ($session -ne $null) { Remove-PSSession -session $session } } # print a xml-errormessage function printErrorXml($errortext = $script:resultText) { write-host @" <?xml version=1.0 encoding=UTF-8 ?> <prtg> <error>1</error> <text>$errortext</text> </prtg> "@ disconnect($session) exit } checkCredentials main disconnect($session) exit
Votes:
0
I get error: "Error reading response: Invalid XML (Structural error in xml file, 1 open items.)"
Votes:
0
When you are running the script from the commandline, which output do you get?
Votes:
0
Hi, this sensor would be very usefull to us. Does a channel like this already exist in your product at this date?
Import-PSSession : No command proxies have been created, because all of the requested remote commands would shadow exis ting local commands. Use the AllowClobber parameter if you want to shadow existing local commands. At C:\users\ronnyvdb.ecudxb\Desktop\whitespace.ps1:98 char:21 + Import-PSSession <<<< $Session -WarningAction silentlyContinue | out-null + CategoryInfo : InvalidResult: (:) [Import-PSSession], ArgumentException + FullyQualifiedErrorId : ErrorNoCommandsImportedBecauseOfSkipping,Microsoft.PowerShell.Commands.ImportPSSessionCo mmand The operation couldn't be performed because object 'MailboxDatabase' couldn't be found on 'SRVDOMAIN.ECUDXB.ECULINE.NET '. + CategoryInfo : NotSpecified: (:) [Get-MailboxDatabase], ManagementObjectNotFoundException + FullyQualifiedErrorId : 780B9795,Microsoft.Exchange.Management.SystemConfigurationTasks.GetMailboxDatabase False Cannot index into a null array. At C:\users\ronnyvdb.ecudxb\Desktop\whitespace.ps1:30 char:29 + $value = [long]$matches[ <<<< 1]; + CategoryInfo : InvalidOperation: (1:Int32) [], RuntimeException + FullyQualifiedErrorId : NullArray <?xml version=1.0 encoding=UTF-8 ?> <prtg> <result> <value></value> <unit>BytesMemory</unit> <channel>Available New Mailbox Space</channel> </result> <text> </text> </prtg>
Created on Mar 16, 2015 7:42:37 AM
Last change on Mar 16, 2015 7:52:23 AM by
Torsten Lindner [Paessler Support]
Votes:
0
Due to the very few requests, there are no changes to this. We will leave this open though, in case further requests come in.
Votes:
0
Hello.
Thanks for the custom sensor, atm we are using it alot, but I wonder does anyone have an idea of how to get the same information from the Exchange 2007, its a bit tiring to be looking through event log every few days.
Votes:
0
Please add the whitespace channel. This will allow my customer to monitor the effect of mailbox cleanup actions of it's users.
Votes:
0
Hello,
This feature is still on our wish list, but I am afraid that there are no plans to implement it in the near future, sorry.
Best regards
Add comment