WHERE DO I START?
You are here:Integrations > Linux
  • Top ↑

Linux

Summary

Installing the Linux agent provides a quick way to deploy and collect metrics with a richer set of metadata out of the box. The agent will automatically discover and collect KPI metrics and allows the integration of CloudWatch and agent metrics. Using various plugins, our agent can also pull metrics from many different products running on a Linux operating system in addition to pulling metrics from the Linux OS (host). If you cannot install our agent on the host or you have a containerized environment, our Linux agent can also be installed using a docker container; you can find those instructions here.

Important   We're constantly improving our Linux agent, so it's important you upgrade to the latest version whenever possible. Check out the recently closed issues and pull requests as well as the release history to see why you should upgrade.
Relevant Topic(s)   

Configuration

Note    If you need to disable an existing Linux integration or view the unique API key assigned to your account, navigate to the Integrations page under the user account drop-down menu and click the integration designated as Infrastructure under the Integration column. If you want to learn more about the Netuitive StatsD server, go here.

Setting up the Linux agent is a three step process:

  1. Copy the install command from the Linux integration setup page.
  2. Install the Linux agent on your system using the install command you copied.
  3. Edit the netuitive-agent.conf file as necessary.

Step 1: Copy the install command from the Linux integration setup page

Note   If you cannot install the Linux agent on the host or have a containerized environment, you may install the Linux agent Docker container instead.
  1. From the top navigation menu, select Integrations.
  2. Select the Linux card. The name should be already populated, and Data Collection should be enabled.
  3. Highlight the one-line install command from the instructions and copy them. A unique API key for your account has already been generated and included in the command line.
    Tip   If you'd prefer to specify the element name, copy the following instead:
    sudo N_APIKEY=your-apikey N_HOSTNAME=your-element-name bash -c "$(curl -Ls http://repos.app.netuitive.com/linux.sh)"

    ...where your-apikey is the API key generated from the integration and your-element-name can be any element name you wish (it should be unique from your other elements).

Step 2: Install the Linux agent on your system using the install command you copied

  1. Paste the command from step 1.3 into your command line. This will install the agent and add your account's unique API key to the configuration file.
    Tip   If you install our Linux agent on an AWS EC2 or Azure VM, the EC2's / VM's power state (it will come in as the attribute hostRunning with a value of true or false) and tags are copied over to the corresponding Linux SERVER element. You can then use this information to create policies.
    Note   If you'd prefer to manually install the agent, see Manually Installing the Linux Agent.

Step 3: Edit the Linux agent configuration file

  1. Navigate to the Linux Agent configuration file. The file can typically be found at /opt/netuitive-agent/conf/netuitive-agent.conf.
  2. Ensure the API key provided in step 1 is input in the netuitive-agent.conf file (the highlighted portion below). The section below is only a portion of the config file. Go here to view the full config file.
  3. [[NetuitiveHandler]]
    ### NetuitiveCloud URL to post the metrics
    url = https://api.app.netuitive.com/ingest/infrastructure
    
    ## Netuitive Datasource api key
    api_key = <datasource api key>
    
    ### Uncomment to add tags (optional)
    # tags = tag1:tag1val, tag2:tag2val
    
    ### Uncomment to add relations
    # relations = element1, element2
    
    # How many samples to store before sending to Netuitive
    batch = 100
    
    # how many batches to store before trimming
    max_backlog_multiplier = 5
    
    # Trim down how many batches
    trim_backlog_multiplier = 4
    
    # local statsd server
    [[[statsd]]]
    enabled = False
  4. Optionally, substitute the tags value with desired tags and uncomment the line to pass in tags for your Netuitive agent element.
  5. Optionally, substitute the relations value with desired element relationships; be sure to include the fully qualified name of the element(s). Uncomment the line to pass in relationships for your Netuitive agent element.
  6. Optionally, adjust the various default collectors (CPU, DiskSpace, DiskUsage, Heartbeat, LoadAverage, Memory, VMStat, Network) using the configuration options found here.
    Note   Even though the Heartbeat collector is a default collector, it has its own separate file (HeartbeatCollector.conf) that is typically found in /opt/netuitive-agent/conf/collectors

    These collectors are configured to get the most out of Netuitive's default policies and dashboards, so don't change the following configuration options without guidance:

    • metrics_blacklist
    • metrics_whitelist
    • simple
    • include_cpu_pct

  7. Save the configuration file.
  8. Restart the Linux agent service to begin monitoring your data with Netuitive.
    Note   This integration's package (computed metrics, dashboards, and policies that will give you important events and alerts) will be automatically enabled and provisioned to your account as soon as Netuitive receives data from the integration. The PACKAGES button on the integration setup page will become active once data is received, so you'll be able to disable and re-enable the package at will.

    The most common commands are (depending on your distro):
    • service netuitive-agent {stop|start|restart}
    • /etc/init.d/netuitive-agent {stop|start|restart}
    • initctl {stop|start|restart} netuitive-agent
    • systemctl {stop|start|restart} netuitive-agent
  9. Tip   You can put the agent in Debug mode by changing the "logger_root" section of the configuration file from "INFO" to "DEBUG".

Additional Configuration Options

Collector Option Default Description
CPU byte_unit byte Default numeric output(s).
enabled True Enable collecting CPU metrics.
measure_collector_time False Measure the collector's run time in milliseconds.
metrics_blacklist None Regex list to match metrics to block. Mutually exclusive with metrics_whitelist option.
metrics_whitelist None Regex list to match metrics to transmit. Mutually exclusive with metrics_blacklist option.
normalize False Enable dividing by the number CPUs for CPU totals.
percore False Enable collecting metrics per CPU core or just the total of the cores.
simple False Enable returning only the aggregate CPU percentage metric.
include_cpu_pct True Includes the CPU percentage metric in collection.
Diskspace byte_unit byte Default numeric output(s).
enabled True Enable collecting Diskspace metrics.
exclude_filters ^/boot, ^/mnt A list of regex patterns to exclude from collection.
filesystems None Types of filesystems to examine.
measure_collector_time False Measure the collector's run time in milliseconds.
metrics_blacklist None Regex list to match metrics to block. Mutually exclusive with metrics_whitelist option.
metrics_whitelist None Regex list to match metrics to transmit. Mutually exclusive with metrics_blacklist option.
simple True Reduces the amount of metrics collected to the bare minimum necessary.
Disk Usage byte_unit byte Default numeric output(s).
devices None Regex pattern to determine which device metrics to collect.
enabled True Enable collecting Disk Usage metrics.
measure_collector_time False Measure the collector's run time in milliseconds.
metrics_blacklist None Regex list to match metrics to block. Mutually exclusive with metrics_whitelist option.
metrics_whitelist (?:^.*\.io$|^.*\.average_queue_length$|^.*\.await$|^.*\.iops$|^.*\.read_await$|^.*\.reads$|^.*\.util_percentage|^.*\.write_await$|^.*\.writes$) Regex list to match metrics to transmit. Mutually exclusive with metrics_blacklist option.
sector_size 512 The size used to calculate sector usage.
send_zero False Tells the collector to send IO data even when there is no IO.
Heartbeat enabled True Enable collected the Heartbeat metric.
path netuitive

Path to the Netuitive agent.

Load Average byte_unit byte Default numeric output(s).
enabled True Enable collecting Load Average metrics.
measure_collector_time False Measure the collector's run time in milliseconds.
metrics_blacklist None Regex list to match metrics to block. Mutually exclusive with metrics_whitelist option.
metrics_whitelist None Regex list to match metrics to transmit. Mutually exclusive with metrics_blacklist option.
simple False Reduces the amount of metrics collected to the bare minimum necessary.
Memory byte_unit byte Default numeric output(s).
detailed False Set to True to collect all nodes.
enabled True Enable collecting Memory metrics.
measure_collector_time False Measure the collector's run time in milliseconds.
metrics_blacklist None Regex list to match metrics to block. Mutually exclusive with metrics_whitelist option.
metrics_whitelist None Regex list to match metrics to transmit. Mutually exclusive with metrics_blacklist option.
Network byte_unit bit, byte, Default numeric output(s).
enabled True Enable collecting Memory metrics.
greedy False Greedy match interfaces.
interfaces eth, bond, em, p1p, eno, enp, ens, enx List of interface types to collect.
measure_collector_time False Measure the collector's run time in milliseconds.
metrics_blacklist None Regex list to match metrics to block. Mutually exclusive with metrics_whitelist option.
metrics_whitelist (?:^.*\.rx_byte$|^.*\.rx_errors$|^.*\.rx_packets$|^.*\.tx_byte$|^.*\.tx_errors$|^.*\.tx_packets$) Regex list to match metrics to transmit. Mutually exclusive with metrics_blacklist option.
VM Stat byte_unit byte Default numeric output(s).
enabled True Enable collecting VM Stat metrics.
measure_collector_time False Measure the collector's run time in milliseconds.
metrics_blacklist None Regex list to match metrics to block. Mutually exclusive with metrics_whitelist option.
metrics_whitelist None Regex list to match metrics to transmit. Mutually exclusive with metrics_blacklist option.

Changing Element Display Names

You can change how certain elements' names are displayed in the application to help distinguish between each instance.

  1. Under the Data Collection checkbox, click Advanced. A menu expands.
  2. Hover next to Element Name; an edit icon will appear. Click the icon.
  3. Type the desired name into the field.
    Example(s)   
    • An element name of ${meta.originalName} would resolve to whatever name comes in with the original element payload before it would be replaced with the optional element name template.
      Note   The element name template preview in the UI will resolve this field to [original name] as a placeholder because Netuitive only knows what the current name is, not what the incoming name might be.
    • An element name of ${tags.InternalName} (${tags.Name}) will give you something like MyServer (ip-10.101.3.99)
    • An element name of ${tags.Name} (${attributes.availabilityZone) would return something like ServerX (eu-west-1c)
  4. Select an element to use as a preview for your new element name using the Element To Preview drop-down menu.
  5. Next to the Element Name field, click Preview to view your new template using the selected element.
  6. If you're satisfied with the name, press Enter on your keyboard while in the Element Name field to lock in the name. Exit the integration setup page and wait until the next analytics cycle (5 minutes) to see your changes.

Dependencies

OS

Redhat 6 and 7
CentOS 6 and 7
Amazon Linux (latest)
Ubuntu 12, 14, 15, and 16
Debian 7, 8, and 9

Miscellaneous

Linux Agent
  • CPU:
    /proc/stat
  • Diskspace:
    /proc/mounts
  • Disk Usage:
    /proc/diskstats
  • Load Average:
    /proc/loadavg
  • Memory:
    /proc/stat
  • Network:
    /proc/net/dev
  • VM Stat:
    /proc/vmstat