Watchlog Agent Installation Guide
This guide will walk you through the steps to install and run the Watchlog Agent on your server.
The Watchlog Agent is a Node.js application designed to collect and send server metrics to Watchlog.
Please follow the steps below to get started.
Ubuntu
Source (Other Servers)
How to install watchlog on ubuntu server ?
Installation
Install Watchlog Agent with the following script:
Replace your-api-key and your-server with your actual Watchlog API key and Server in Dashboard .
sudo apiKey="your-api-key" server="your-server" bash -c "$(curl -L https://watchlog.io/ubuntu/watchlog-script.sh)"
Copy
Managing the Agent
  • Start the agent:
    sudo systemctl start watchlog-agent.service
    Copy
  • Enable the agent to start on boot:
    sudo systemctl enable watchlog-agent.service
    Copy
  • Check the status of the agent:
    sudo systemctl status watchlog-agent.service
    Copy
  • Stop the agent:
    sudo systemctl stop watchlog-agent.service
    Copy
  • Remove the agent:
    sudo systemctl stop watchlog-agent.service
    sudo systemctl disable watchlog-agent.service
    sudo rm /etc/systemd/system/watchlog-agent.service
    sudo rm -R /opt/watchlog-agent
    sudo systemctl daemon-reload
After installing the agent on the server. You must connect to it in code. You can do this through the following packages :
Nodejs
Python
Php
Java
INSTALLATION
$ npm install watchlog-metric
Usage