Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 3.17 KB

monitor-linux.md

File metadata and controls

67 lines (51 loc) · 3.17 KB

Monitor Linux with the ServiceNow Collector

Linux Distibution Support Status Architecture
Red Hat Enterprise Linux (RHEL), Amazon Linux last three major versions ARM, AMD
Ubuntu last three major versions ARM, AMD
Debian last three major versions ARM, AMD

Automated package install for Linux server monitoring

This install approach automatically downloads dependencies and installs the collector as a service on Linux using a Debian or RPM package. Priviliged (root) access is needed.

  1. As sudo, run the following in your shell. If you do not specify an optional token, edit the configuration file after install complete.
  • export CLOUDOBS_TOKEN='your-cloudobs-access-token'
    sudo sh -c "$(curl -fsSlL https://github.com/lightstep/sn-collector/releases/latest/download/install-unix.sh)" install_unix.sh --ingest-token $CLOUDOBS_TOKEN
  1. Review the collector configuration installed in /opt/sn-collector/config.yaml. The collector will automatically start running with the default configuration.

  2. To uninstall, run:

  • sudo sh -c "$(curl -fsSlL https://github.com/lightstep/sn-collector/releases/latest/download/install-unix.sh)" install_unix.sh --uninstall

Package install for Linux server monitoring

Gather system metrics from a Linux system using an installed software package. Use this for servers and hosts that do not have Docker or a container runtime.

  1. Download the appropriate package for your system and CPU architecture from the Releases page of this repository.

    • If you're not sure about what architecture your system is using, inspect the output of the arch command.
    arch
  2. Install the downloaded package using the appropriate package manager for your Linux distribution.

  • RPM (RHEL, CentOS, Amazon Linux) package with yum:
    sudo yum install -y otelcol-servicenow_version_linux_arch.rpm 
  • Debian (Ubuntu) package with apt-get:
    sudo apt-get install -y otelcol-servicenow_version_linux_arch.deb 
  1. Follow the post-install instructions on starting the collector service.

Install for Linux host monitoring with Docker

Gather host system metrics from a Linux using a Docker image.

  1. Pull the latest Docker image for the collector.
  • docker pull ghcr.io/lightstep/sn-collector/sn-collector-experimental:latest
  1. Run the collector as a container, but mount the host filesystem to gather host metrics. Edit the configuration file as needed.
  • docker run --rm --name sn-collector-experimental \
      -v ./collector/config/otelcol-docker-hostmetrics.yaml:/etc/otelcol/config.yaml \
      -v /var/run/docker.sock:/var/run/docker.sock \
      -v /:/hostfs
      -e LS_TOKEN=your-cloud-obs-token
      ghcr.io/lightstep/sn-collector/sn-collector-experimental:latest
  1. View the container logs and verify data is being sent.