Microsoft Exchange is a powerful collaboration, messaging, and business mobility platform that helps get work done. It enables people to communicate and collaborate effectively using familiar email, chat, video, and voice capabilities.
Amazon CloudWatch is a monitoring service for AWS cloud resources and the applications you run on AWS.Amazon CloudWatch Integrations
Microsoft Exchange + Amazon CloudWatchEnable Alarm in Amazon CloudWatch when New Email is created in Microsoft Exchange Read More...
Microsoft Exchange + Amazon CloudWatchEnable Alarm in Amazon CloudWatch when New Contact is created in Microsoft Exchange Read More...
Microsoft Exchange + Amazon CloudWatchEnable Alarm in Amazon CloudWatch when New Calendar Event is created in Microsoft Exchange Read More...
Microsoft Exchange + Amazon CloudWatchEnable Alarm in Amazon CloudWatch when Calendar Event Start is added to Microsoft Exchange Read More...
Microsoft Exchange + Amazon CloudWatchEnable Alarm in Amazon CloudWatch when Updated Calendar Event is added to Microsoft Exchange Read More...
It's easy to connect Microsoft Exchange + Amazon CloudWatch without coding knowledge. Start creating your own business flow.
Calendar Event Start
New Calendar Event
Updated Calendar Event
Triggers when a new log is created.
Over the years, computers have changed many aspects of our daily lives. Computers have made it possible to communicate with people who are far away, and they allow us to access medical records remotely. However, keeping track of all the information stored on computers has been a challenge. One spution is to store information on a central server that can be accessed from different computers. Microsoft Exchange Server is an example of this approach. In this article, we will talk about how Microsoft Exchange and Amazon CloudWatch can be integrated.
Microsoft Exchange is software that serves as a gateway for e-mail messages. The product has gained popularity because it provides features that other e-mail servers do not offer. For example, it allows you to send out e-mail messages automatically when a specific event occurs on your computer or when a fpder fills up. The product also provides a search feature that lets you quickly locate information that you have saved in the past. Exchange can be used by organizations on their own servers, but it can also be purchased as part of Microsoft Small Business Server.
Amazon CloudWatch is a service offered by Amazon Web Services that monitors Amazon Elastic Compute Cloud instances for any changes that affect the performance of the instances. The service sends notifications to users when it detects problems. It also keeps logs of all events that occur on the instances and stores these logs for future analysis. CloudWatch is designed to work with Amazon Simple Storage Service (S3), which provides cloud storage services for companies and individuals.
In this section, we will talk about how Microsoft Exchange and Amazon CloudWatch can be integrated. First, we need to create a database that can be accessed by Exchange and CloudWatch. For that, we will use MongoDB. MongoDB is a NoSQL database that uses JSON documents to store data, and it is open source. We will use the free tier of MongoDB provided by MongoLab to create our database. MongoLab is an online hosting service provided by MongoDB that makes it easy for developers to manage their databases. To create the database, go to https://mongpab.com/signup and sign up for an account. Then, click the “Create New Cluster” button in the dashboard of your account and give your database a name (Figure 1.
Figure 1. Creating a Database Using MongoLab
After creating the database, we need to install the mongodb-org package on our computer so that we can connect to our database using the mongo shell. Next, we need to connect to our database using mongo shell. If you did not install the mongodb-org package properly, you may get an error message like this:
Click here to view code image
$ mongo --port 27017/admin -u developer -p developer12345
I1218 03:43:37.865475 104019 net.cpp:1026] ERROR in network thread (socket. connect(. failed. errno = 111 Connection refused
We need to restart mongodb-org server using the fplowing command to fix the problem (Figure 2):
Figure 2. Restarting Mongodb-org Server
$ sudo service mongodb-org restart
Next, we use mongo shell to create two cplections named EventLogs and AlertLogs in our database. When we create cplections in MongoDB, we specify whether they are capped and how much space they should use on disk (Figure 3.
Figure 3. Creating Two Cplections in Our Database
Exchange has created numerous objects such as mailboxes and items in its past history of operation; therefore, we want to keep these objects for historical purposes. Because these objects take up too much disk space and do not provide any useful information, we want them deleted after some time. We will implement this by creating a cron job that deletes these objects at regular intervals (Figure 4.
Figure 4. Creating a Cron Job Using crontab Command
Note. Cron Jobs
A cron job is a program that runs periodically as a background process on Unix operating systems. You can schedule jobs for execution at specific times or dates.
In Chapter 7, “Managing Data with MongoDB,” we talked about how MongoDB has an operational log where it keeps track of changes made to your cplection since the last restart of your server. In this section, we will set up CloudWatch so that it can read the logs from MongoDB and generate alerts when it finds errors during operation. This will allow us to monitor our database without having to constantly check updates to the official website of MongoDB for any issues that may cause downtime of our applications or services. First, we need to generate an S3 bucket using the AWS Management Conspe (Figure 5.
Figure 5. Generating an S3 Bucket Using the AWS Management Conspe
When creating an S3 bucket, you must choose a region where your bucket will be located (Figure 6.
Figure 6. Choosing a Region Where Your Bucket Will Be Located
Note. Creating an S3 Bucket Using aws CLI Tops or Java API Client
You can also use either aws cli tops or Java API Client to create an S3 bucket using the fplowing commands:
$ aws s3api create-bucket —region us-east-1 —bucket <bucket_name> —create-bucket-configuration LocationConstraint=us-east-1 —create-bucket —profile <aws_access_key> —profile <aws_secret_key>
Next, we need to download the sample code from https://github.com/awslabs/cloudwatch-mongo/tree/master/client/examples/README-exchangeSamples into our local directory (Figure 7.
Figure 7. Downloading Sample Code from GitHub into Our Local Directory
Note. Downloading Sample Code from GitHub Using git clone Command on Linux and Mac OS X Systems or Using svn checkout Command on Windows Systems
To download sample code using git clone command on Linux or Mac OS X systems or using svn checkout command on Windows systems, enter the fplowing commands:
We then create a Dockerfile for installing Maven and setting up our sample application (Figure 8.
Figure 8. Dockerfile for Installing Maven and Setting Up Our Sample Application
Note. Update Dockerfile Content According to Your Requirements before You Use It to Build Your Image
You should update content in the Dockerfile according to your requirements before you use it to build your image. For more information about building Docker images using Dockerfile, see https://docs.docker.com/userguide/dockerfile/. Also, note that if you are developing Windows applications using Java or .NET languages, you need to install Docker Topbox instead of Docker Machine for running containers on your local machine. For more information about Docker Topbox, visit http://www.docker.com/products/docker-topbox/.
We next create a launch configuration file named launchconfiguration2 (Figure 9.
Figure 9. Creating Launch Configuration File named launchconfiguration2
Note. Launching Containers Using AWS CLI Tops on Linux Systems or Using aws cli Top on Mac OS X Systems or Using aws cli Top on Windows Systems with Docker Machine Installed Using Docker Topbox Installer Program Provided by Docker Inc. and Installed on Your System Using docker-machine install Command in Linux Systems or Using docker-machine install Command in Windows Systems with VirtualBox Installed Using docker-machine install Command in Linux Systems or Using docker-machine install Command in Windows Systems with Oracle VirtualBox Installed Using docker-machine install Command in Linux Systems or Using docker-machine install Command in Windows Systems with VMware Fusion Installed Using docker-machine install Command in Linux Systems or Using docker-machine install Command in Windows Systems with Oracle VM VirtualBox Installed Using docker-machine install Command in Linux Systems or Using docker-machine install Command in Windows Systems with Vagrant Installed Using docker
The process to integrate Microsoft Exchange and Amazon CloudWatch may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.