Skip to content
share library_books

Install Logagent

Installation for Linux & Mac OS X

Install Node.js

Official Node.js downloads and instructions. E.g. for Debian/Ubuntu:

curl -sL | sudo -E bash -
sudo apt-get install -y nodejs

Install Logagent npm package

sudo npm i -g @sematext/logagent 

Install service (Linux, Mac OS X)

  1. Get a free account at

  2. create a Logs App to obtain an App Token for Sematext Cloud, Sematext logs management and analysis system

  3. Install Logagent as system service

Logagent detects the init system and installs Systemd or Upstart service scripts. On Mac OSX it creates a Launchd service. Simply run:

  # Install logagent package globally 
  sudo npm i -g @sematext/logagent
  sudo logagent-setup -i LOGS_TOKEN
  # for EU region: 
  # sudo logagent-setup -i LOGS_TOKEN -u
  # for local Elasticsearch
  # sudo logagent-setup -i indexName -u http://localhost:9200

The setup script generates the configuraton file in /etc/sematext/logagent.conf. The default settings ship all logs from /var/log/**/*.log to Sematext Cloud.

Location of service scripts:

  • upstart: /etc/init/logagent.conf
  • systemd: /etc/systemd/system/logagent.service
  • launchd: /Library/LaunchDaemons/com.sematext.logagent.plist

Start/stop service:

  • upstart: service logagent stop/start
  • systemd: systemctl stop/start logagent
  • launchd: launchctl start/stop com.sematext.logagent