Enabling Monitoring via Local Collector
To monitor AWS EC2 instances, Azure VMs, and GCP Compute Engine instances comprehensively, it’s important to look not only at CloudWatch / Azure Monitor / Stackdriver 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, Azure, or GCP environment, you can enable collection of non-AWS/Azure/GCP 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/GCP specific data (e.g., CloudWatch data, Azure Monitor data, and Stackdriver 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, Azure Monitor, and GCP Stackdriver data:
Enabling data collection via a local Collector
To enable local Collector data collection for your AWS EC2 instances, Azure VMs, or GCP Compute Engine instances, perform the following steps:
- Select Manage for your AWS / Azure / GCP account (or, you can perform the following steps when you first add your AWS / Azure / GCP account into LogicMonitor).
- Edit the EC2 / VM / Compute Engine service row in the monitored services section, and toggle the ‘Enable monitoring via local Collector’ option to the enabled position.
- (Optional) Enable more frequent discovery for the EC2 / VM / Compute Engine service. Enabling this option will allow you to configure LogicMonitor to check for new EC2 / VM / Compute Engine 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 / VM / Compute Eggine service.
- Add Collector Assignments - these assignments will map Collectors to the EC2 instances / VMs / Compute Engine instances they should monitor. You can assign Collectors based on EC2, VM, or Compute Engine 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, system.azure, and system.gcp can be used in this field, currently.
- Save your changes.
After saving, the system.sysinfo property will be automatically populated for the EC2 instances / VMs / Compute Engine 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).