Richard Hsu

Monitoring Linux systems using SSH

Recommended Posts

We request another way for Logic Monitor to gather information from Linux based systems besides SNMP. Using SNMP involves installing NET-SNMP so taking up additional storage space. It would be better if Logic Monitor had an option for monitoring Linux systems like we had using Sitescope. In Sitescope all it needed was SSH and a dedicated login credential for the system. The Monitor would connect to the Linux based system through SSH and run scripts pertaining to what aspects were monitoring on that system. Then stores the results to be displayed on the console. Similar to using WMI in Windows.

  • Upvote 3

Share this post


Link to post
Share on other sites

I agree we need a non-SNMP method to monitor Linux, even if that entails deploying a collector on each server.  Leveraging other tools like collectd would also be nice options.  We have run into various environments where SNMP (even SNMPv3) is verboten due to perceived security concerns.  Even if allowed, manually configuring SNMP on many servers to enable basic data collection seems like a bad plan.

Share this post


Link to post
Share on other sites

Are ssh keys supported yet?  Better yet would be the ability to fetch an ssh key, by name, from a key management service such as those offered by AWS and others.  I don't want to have to encode passwords into the logicmonitor interface, and I certainly don't want to have to leave a private key with access to all my production resources on my collector, but my collector runs on an ec2 instance that has an instance role assigned to it, so it would be trivial to give that role a policy which allows it to fetch a key by name.  If the basic ssh functionality included in scripts were to include the ability to look up an ssh key, or could receive the output of a different data source (I could write a script to fetch the key easily enough), that would be ideal, since modifying every data source to use a different script would be a drag.  This would give me the ability to use key-based authentication for ssh while still allowing me to do key management without having to update filesystems and logicmonitor properties.  I could simply rotate in a fresh key in the key management service and everything would continue to function normally.

Share this post


Link to post
Share on other sites

Could be done now using the Expect library (as is used by Config modules).

I would still like SNMP as well, not to replace it.  As we have black box Linux appliances too.

Edited by Mosh

Share this post


Link to post
Share on other sites

There is now a collection of SSH based datasources for monitoring Linux: 

Linux_CPU_Cores, Linux_Block_DevicePerformance, Linux_Memory_Usage, Linux_Host_Uptime, Linux_Filesystem_Usage, Linux_CPU_Load, Linux_Network_TCPUDP, Linux_Network_Interfaces

They work in tandem with the Linux_Monitoring_SSH PropertySource.

These can all be added via the LogicMonitor DataSource Repository. 

Share this post


Link to post
Share on other sites

FYI for those tracking here - I believe we are currently working on updated versions of these that will provide the ability to use SSH keys for authentication. Stay tuned ... !

Share this post


Link to post
Share on other sites
On 6/27/2018 at 1:14 AM, Jake Cohen said:

Hey @Mosh - You can find it with locator code: CGWHNZ

I can't find any of these except the one you gave the code for.

Does anyone have the codes for the other linux SSH datasources?

Share this post


Link to post
Share on other sites

Hey @SeanC,

You should be able to pull down all the modules via the UI - they are all published to our core repository and start with Linux_SSH_*

See https://www.logicmonitor.com/support/logicmodules/about-logicmodules/keeping-your-datasources-up-to-date/ for additional information.

Let me know if you can't pull them into your account and we can share the locator codes, if need be(!)

Cheers,

Kerry

Share this post


Link to post
Share on other sites

Hi Kerry

I had a look there first and the only ones starting with 'Linux' in my list are:

Linux Disk Inodes
Linux_Sensors_Fans
Linux_Sensors_Temperature
Linux_Sensors_Voltage

Do I need to look at a different server than v128.core.logicmonitor.com ?

Share this post


Link to post
Share on other sites

They should be available for all accounts - I would try reaching out to our chat support - they should be able to help with this right away.

If you run out of luck there, let me know and I can grab those locator codes for you.

Thanks,

Kerry

* Just in case, I went ahead and grabbed these. FYI though, the latest/ greatest will always be the repository (!)

Module Name Version Locator Code
Linux_SSH_CPUCores 1.2 HTHH4C
Linux_SSH_CPUMemory 1.1 C3KH9F
Linux_SSH_Filesystems 1.1 EJHMRX
Linux_SSH_NetworkInterfaces 1.2 E693TD
Linux_SSH_NetworkTCPUDP 1.1 CLMGCE
Linux_SSH_Uptime 1.1 7ADDAY
Edited by Kerry DeVilbiss
added locator codes / modules

Share this post


Link to post
Share on other sites

Thanks Kerry, turns out my problem was er... me.

I didn't realise that someone else had already added them and I wasn't aware they no longer appear in the repository if they're already added XD

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
Reply to this topic...

×   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.