• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 97
  • Last Modified:

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.
0
Leo
Asked:
Leo
3 Solutions
 
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
 
TjnoNetwork 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
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
TjnoNetwork 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
 
TjnoNetwork 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now