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.serviceCopy
- Enable the agent to start on boot: sudo systemctl enable watchlog-agent.serviceCopy
- Check the status of the agent: sudo systemctl status watchlog-agent.serviceCopy
- Stop the agent: sudo systemctl stop watchlog-agent.serviceCopy
- Remove the agent: sudo systemctl stop watchlog-agent.servicesudo systemctl disable watchlog-agent.servicesudo rm /etc/systemd/system/watchlog-agent.servicesudo rm -R /opt/watchlog-agentsudo 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