Skip to content

Linux

Linux#

Overview#

Unryo monitors your Linux hosts with statistics on processor, disk, swap, processes, logs and more.

You can monitor your Linux host in multiple ways:

  • SNMP polling: you configure an Unryo collector to poll remotelly one or multiple Linux hosts (using SNMP queries).
  • Unryo local agent: you install an Unryo agent locally on each Linux host you want to monitor.
  • Prometheus Node Exporter: you run Node Exporter as a service on your Linux hosts, then the Unryo collector scrape metrics from the Linux servers directly.
  • Prometheus Server: you run Node Exporter as a service on your Linux hosts and configure a Prometheus server to scrape metrics from them. Then, the Unryo collector communicates with the Prometheus server (PromQL queries) to retrieve metrics.

image

Monitoring Linux Servers with SNMP#

Prerequisites#

Install snmp and snmpd on every Linux host you want to monitor

sudo apt-get update && sudo apt-get install snmp snmpd

Install MIBS files

Installing mibs file downloader:

sudo apt-get install snmp-mibs-downloader

Install mibs files:

sudo download-mibs

Edit configuration file

Open the file in an editor:

sudo vi /etc/snmp/snmpd.conf

Edit the agentAdress at line 15

from:

agentAddress udp:127.0.0.1:161

to:

agentAddress udp:161

Edit view configuration

from:

view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1

to:

view   systemonly  included   .1.3.6.1.2.1.1
# view   systemonly  included   .1.3.6.1.2.1.25.1
view systemview included .1.3.6.1.2.1.25

Edit rocommunity remove on both line 51 and 53 the flag -V systemonly and rename the public rocommunity to your community string of choice.

from:

rocommunity public  default    -V systemonly

rocommunity6 public  default   -V systemonly

to:

rocommunity unryocommunity  default

rocommunity6 unryocommunity  default

Comment IPv6 resolving around line 53.

from:

# rocommunity6 public  default

Start snmpd service#

Start service:

service snmpd start

Restart service:

service snmpd restart

Verify Setup#

Retrieve the private address:

ifconfig

Then run the following snmpwalk command to validate the setup:

/usr/bin/snmpwalk -v 2c -c <rocommunity_string> <ip_address> 1.3

Configuration#

Go in Configuration Management.

image

Click on the + button to add a new configuration.

image

Select the template Linux SNMP. Select the Collector on which you want this configuration to be deployed; and provide a Configuration Name that is meaningful for you. The Description is optional.

image

In the template, enter the correct settings for your Linux server(s). Other configuration options are possible. Browse the template to discover them.

Once done, click Apply to start the monitoring.

Metrics#

Categories Metrics
OS statistics CPU usage, Load, Memory, File Systems, Swap, Network Statistics, ...
Process Monitoring Monitor a specific process for health, presence or absence.
File Monitoring Collect statistics about given file(s): presence, size in bytes, modification time
Script Execution Read metrics from one or more commands