Exchange 2013 and Drive alerts

Need assistance in two Powershell / batch scripts / free tool which can send alerts for;

  1. We are running Exchange 2013, is there a way to set an alert when the message queue is above 50 messages? and  Exchange Services are down.
  2. Disk space (C: drive) is less then 8GB, and Resource utilization is more then 90%.
Thanks.
LVL 8
LeoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
from exchange management shell
Get-Queue -Filter {MessageCount -gt 50}

 $drives=Get-WmiObject Win32_LogicalDisk -ComputerName $RemoteComputerName

        foreach ($drive in $drives){
            
            $drivename=$drive.DeviceID
            $freespace=[int]($drive.FreeSpace/1GB)
            $totalspace=[int]($drive.Size/1GB)
            $usedspace=$totalspace - $freespace
            $output=$output+$drivename+"`t`t"+$usedspace+"`t`t`t`t`t`t"+$freespace+"`t`t`t`t`t`t"+$totalspace+"`n"
        }

Open in new window


sample
 
if (Get-Queue -Filter {MessageCount -gt 50})  { write-host "Message Queue over limit}
$drives=Get-WmiObject Win32_LogicalDisk 

        foreach ($drive in $drives){
            
            $drivename=$drive.DeviceID
            $freespace=[int]($drive.FreeSpace/1GB)
            $totalspace=[int]($drive.Size/1GB)
            $usedspace=$totalspace - $freespace
            if($freespace -le 80) {
              write-host ("$drivename`t>>$freespace<<") -ForegroundColor Red -BackgroundColor Black
              }
            
        

Open in new window

1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DP230Network AdministratorCommented:
We are using Zabbix (free, open source). It can monitor not only servers but also network devices, just configure the Zabbix agent on Window server, the items you need to observe, the trigger when something goes wrong. This is mine for example: these are latest data of Exchange 2016 server

zabbix.JPG
and the trigger:

trigger.JPG
and monitoring the problem:

problem.JPG
you can find some brief concepts here for SNMP devices: https://www.experts-exchange.com/articles/31203/Monitoring-SNMP-devices-with-Zabbix.html
1
Hasin Ahmed ChoudharyExchange AdministratorCommented:
Heard of it for the first time. Looks interesting. Is it completely free or have to pay for the advanced features?
0
Discover the Answer to Productive IT

Discover app within WatchGuard's Wi-Fi Cloud helps you optimize W-Fi user experience with the most complete set of visibility, troubleshooting, and network health features. Quickly pinpointing network problems will lead to more happy users and most importantly, productive IT.

DP230Network AdministratorCommented:
Hi, yes it is completely free. You can build it from source or just download the pre-built appliance. You just need to configure a host, then clone it as many as you want to other hosts. It might take time for the beginners, but based on my experience, it should be less than 2 weeks.
0
Derek SouterITO Svc Delivery Cons IIICommented:
you can configure the event log to send emails when specific events are logged - so, if the events are logged in the event logs (I previously had the servers notify me if the queue went over a specific limit), then you don't need anything else.    or you could run a scheduled script/powershell to check for the relevant conditions, and send an alert.

using one of the continuous monitoring tools would be a better solution (such as Zabbix mentioned by 13L@CK_H3@RT) , and would provide real-time alerts
1
DP230Network AdministratorCommented:
Please close this one!
0
Seth SimmonsSr. Systems AdministratorCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- David Johnson CD MVP (https:#a42515796)
-- 13L@CK_H3@RT (https:#a42515832)
-- Derek Souter (https:#a42516318)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

seth2740
Experts-Exchange Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.