LM Cloud

Enabling EC2/VM Monitoring via Local Collector

To monitor AWS EC2 instances and Azure VMs comprehensively, it’s important to look not only at CloudWatch / Azure Monitor API metrics, but also at metrics for the operation systems and any running applications.  Typically, it’s easiest to get application and OS level metrics via a traditional LogicMonitor Collector, rather than, for example, set up custom CloudWatch metrics to capture this information.  

If you have a LogicMonitor Collector installed within your AWS or Azure environment, you can enable collection of non-AWS/Azure API data (such as OS and application level metrics) via that Collector.  With a Collector in place, you'll be able to take advantage of LogicMonitor's entire LogicModule library for your cloud resources, including DataSources, EventSources, PropertySources, etc. AWS/Azure specific data (e.g., CloudWatch data and Azure Monitor data) will continue to be collected by a LogicMonitor maintained Cloud Collector, but you’ll be able to view the data collected by a local Collector data alongside the CloudWatch and Azure Monitor data:



Enabling data collection via a local Collector

To enable local Collector data collection for your AWS EC2 instances or Azure VMs, perform the following steps:

  1. Select Manage for your AWS / Azure account (or, you can perform the following steps when you first add your AWS / Azure account into LogicMonitor).
  2. Edit the EC2 / VM service row in the monitored services section, and toggle the ‘Enable monitoring via local Collector’ option to the enabled position.
  3. (Optional) Enable more frequent discovery for the EC2 / VM service.  Enabling this option will allow you to configure LogicMonitor to check for new EC2 / VM instances up to every 10 minutes (more frequent than the default frequency for all services, which has a minimum of 1 hour).  This frequency will only apply to the EC2 or VM service.
  4. Add Collector Assignments - these assignments will map Collectors to the EC2 instances / VMs they should monitor.  You can assign Collectors based on EC2 or VM properties like AWS region or VPC, Azure subnet, or a custom tag.  You may want to also add a condition to exclude stopped instances from getting a Collector assignment, to avoid receiving alerts for DataSources like Ping - you can do this by adding ‘&& system.aws.stateName != “stopped"’ to an existing query. Note that only properties starting with system.aws and system.azure can be used in this field, currently.
  5. Save your changes.


After saving, the system.sysinfo property will be automatically populated for the EC2 instances which you assigned a Collector to, and LogicMonitor DataSources will apply accordingly.  The assigned Collectors will run Active Discovery for these DataSources, and you should see instances and data shortly thereafter:





What happens if I disable the monitoring via local Collector?

If you disable monitoring via local Collector after it has already been enabled, any data collected by the local Collector will be deleted.  CloudWatch data collection will continue being collected by a LogicMonitor maintained Collector.

What happens if my EC2 instances have two IP addresses?

We will use the first private IP address listed

What happens if an EC2 instance matches two Collector assignments?

The last assignment will take priority.

What happens if I unselect a region for monitoring the EC2 service?

If you configure the EC2 instances that no longer match to be deleted, they will be deleted according to schedule.  If you do not configure the EC2 instances to be deleted, but the instances no longer match the criteria in the EC2 service settings, CloudWatch data collection will stop and local Collector based data collection will continue (assuming a local Collector was assigned and that the ‘enable monitoring via local Collector’ option is still enabled).