• 0
Sam Gendler

isLinux() is false for ec2 instances added automatically

Question

I recently enabled collector-based monitoring for resources discovered via my AWS Cloud Account. My intention was to enable snmp based monitoring of instances, since cloudwatch doesn't give visibility into a lot of metrics that are otherwise useful - disk utilization, most notably.  However, while the ec2 instances did pick up basic collector monitoring - ping, Host Status, etc - none of the extended data sources that are automatically applied if I add the instance to the UI manually were enabled. Looking at data source definitions, many snmp data sources use functions like Servers() and isLinux() in their applies_to expressions, in addition to looking for various snmp-based strings in system.categories.  The definition of Servers() is visible in the user appliesTo functions, and it can be easily modified to include 'system.cloud.category == "AWS/ECS"' as one of the clauses.  However, the definition of isLinux() isn't visible and it doesn't appear that the linux-ness of the ec2 instance is visible via the standard properties, even though manually adding the instance via the logicmonitor UI would cause it to be correctly identified as both an SNMP-enabled resource and as a resource running linux. Instead, I had to build groups based on system.cloud.category and other variables in order to apply the following values to system.categories: snmpTCPUDP,Netsnmp,snmpHR,snmpUptime,snmp.  The only categories it picked up, by default, were AWS/EC2 and collectorDataSources.

To some extent, it feels like a bug that an instance added via the UI gets treated differently than an instance added automatically via cloud account detection - it seems that there is no value for system.sysinfo when the instance is automatically added via cloud account detection.  But in the absence of a fix for that bug, is there some other way to make isLinux() return true for a linux-based EC2 instance? What about other built-in functions that don't seem to have modifiable, or even visible, definitions?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

@Sam Gendler the instances added via your cloud account shouldn't be handled differently. Once assigned, the local Collector should run Auto Properties to categorize the instance and populate system.sysinfo. The device should get the snmp system.categories values and match the isLinux() function at that point. Were SNMP credentials added / inherited for the device? You might try running Active Discovery manually & seeing if the instance gets categorized then (though there should have been a run auto triggered):

image.png.66aeed179f6ce79dfadfe9bce451413b.png

Share this post


Link to post
Share on other sites
  • 0

SNMP credentials do exist - at the top level so there's no way to avoid them - and the collector does correctly populate some snmp data sources, so I know the access is working.  I can do arbitrary snmpwalk commends from the collector host to the instances in question, so I know the network ACLs and security groups are correct (also, I spent far longer than should have been necessary getting them to work in the first place, so I KNOW they are correct).  But it does not seem to be picking up auto properties correctly.  I have no system.sysinfo property and I'm unsure how that gets populated.  It could be that everything is failing due to a lack of sysinfo value - the isLinux() function seems likely to be dependent on it, since that's the only property that contains the word linux on the instances that were manually added and which seem to function correctly.

When I manually add an instance via the wizard, it fails to recognize the type of the server automatically, instead asking me to select the OS.  I do that and it then tries to scan it and everything works correctly (actually, by default, it seems to fail to find the account properties specifying the SNMP credentials, so it first tries a scan, fails, and asks me to provide credentials.  I give it the same credentials I have in the account properties and then everything works correctly - I get a system.sysinfo property and everything else looks about right).  If I add it via the expert page instead of the wizard, it picks up the account properties for snmp, but it doesn't seem to get the sysinfo stuff - I guess because it doesn't know it is a linux host.  So how do I manually tell it it is a linux host?  What does the body of that function look like?  I still don't even know for sure what properties/functionality it is lacking since I don't know what logicmonitor is looking for.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.