Quick Setup
Option 1: Quick Setup with Installer
Step 1
Run the install script in a Linux terminal. If you copy/paste this from dmon.io/jobs/config then the telemetryKey will be provided. Otherwise you'll need to copy the key from that page for the installer.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/dmon-io/client/main/install.sh)"
Step 2
Go to dmon.io/jobs/config and adopt the device.
(Uninstall)
- If you install as root, a cron job is placed in /etc/cron.d/dmon. Delete this file and optionally delete /usr/local/bin/dmon.py.
- If you install as a user, edit your local crontab with `crontab -e` and remove the dmon line. Optionally delete ~/.local/bin/dmon.py.
Option 2: Manual Installation
Step 1
Download a metrics push script. On linux you can:
curl -s -O https://raw.githubusercontent.com/dmon-io/client/main/dmon.py
Other push scripts are available at the dmon.io client github.com repo.
Step 2
Configure the script to run every minute to push updated status and metrics to dmon.io. As a cron string, this looks like:
* * * * * python3 /path/dmon.py --net eth0 --cron {telemetryKey} {jobName}
Edit --net to reflect your primary network interface. Use your own {jobName}, a string identifier of your choosing. Populate your secret {telemetryKey} (from dmon.io) here.
Step 3
Go to dmon.io and adopt the job. Wait a few minutes and see the pretty graphs on the job detail page.
Option 3: (alternate) No Metrics
If metrics are not needed, you can still send a heartbeat, allowing dmon.io to establish a heartbeat interval and alerting account owners if heartbeats are missed.
Setting this up is usually done with a cron job using your dmon.io provided {TelementryKey} and a {JobName} of your choice. Keep your {TelemetryKey} private as it is the key to checking in to your account's job namespace.
* * * * * curl -s https://in.dmon.io/{TelemetryKey}/{JobName} > /dev/null