Collecting memory usage via SNMP for AWS EC2 Linux instances
Summary: Joe Milacek is experiencing difficulties collecting memory usage data from AWS EC2 Linux instances using SNMP. Despite setting up a cloud connector, IAM role, and collector with the necessary permissions and network connectivity, memory data is not being retrieved, although CPU data is available. The author followed instructions from LogicMonitor's support page but encountered an error related to the system using the EC2 instance ID instead of the IP or hostname. The user is seeking assistance to resolve this issue.
I am having a hell of a time accomplishing this. I have the cloud connector setup for my AWS account, the IAM role with all permissions (tests fine), and a collector running in the account. The collector has the correct network connectivity (tested) to access these EC2 instances.
I have assigned this collector to the cloud connector.
The cloud connector finds all of my EC2 instances, and shows data like CPU usage. However, none of them show memory usage.
I have followed these instructions (twice now, from scratch): the "Collecting AWS EC2 Memory Data from Linux Instances using SNMP" section on https://www.logicmonitor.com/support/lm-cloud/monitoring-lm-cloud/enabling-cloud-monitoring-using-local-collector
However, I still receive no data. I can walk the device and receive data via the collector debug screen, but this is what I see when I run "poll now" from the device page in LM (Memory Usage):
Timestamp:
2026-01-29 09:23:13
Can't resolve host - us-east-1:ec2:realinstanceid
Diagnose:
Command: /usr/local/logicmonitor/agent/diagnosetool/snmpget -v 2c -c ****** -r 0 -t 5 us-east-1:ec2:realinstanceid 1.3.6.1.4.1.2021.4.6.0 1.3.6.1.4.1.2021.4.4.0 1.3.6.1.4.1.2021.4.15.0 1.3.6.1.4.1.2021.11.62.0 1.3.6.1.4.1.2021.11.63.0 1.3.6.1.4.1.2021.4.5.0 1.3.6.1.4.1.2021.4.3.0
Output:
snmpget: Unknown host (us-east-1:ec2:realinstanceid)
Suggestions:
Please check credentials or OID values for host=us-east-1:ec2:realinstanceid:161 with version=v2c community=****.
Why is it using the ec2 instance ID and not the IP? Or even the host name?
Help, I am about to go insane!
I also just realize in taking this screenshot that all of my cloud resources have this same unusable format for the IP Address/DNS Name: the region:instance-id pair.