Setting Watchman Monitoring Preferences from the Command Line is an efficient method when using deployment scripts and secure shell (ssh).
Configuration
The main configuration file is client_settings.conf
and is located
/etc/monitoringclient/client_settings.conf
Plugins will create settings files as-needed in the plugin-support folder
/etc/monitoringclient/plugin-support/
Plugins
Reboot Notifications
The volumes plugin on Linux creates a table in:
/etc/monitoringclient/plugin-support/check_reboot_time_settings.conf
Editing this (sudo will be required) will allow you to adjust the capacity monitoring for root volume:
{
"Reboot_Time_Threshold": 60,
"Warn_On_Reboot": false,
"Last_Reboot": 1581534965,
"Report_Boot_Time": true
}
Adjust the Warn_On_Reboot
to true
or false
, as desired.
Root Volume Capacity Monitoring
The volumes plugin on Linux creates a table in:
/etc/monitoringclient/plugin-support/check_root_capacity_settings.conf
Editing this (sudo will be required) will allow you to adjust the capacity monitoring for root volume:
{
"Plugin_Enabled": true,
"Root_Warn_Level": 90
}
Adjust the Root_Warn_Level
threshold between 1 and 99, as desired.
Volume Monitoring
fdisk -l
, parted -l
, and lsblk
are all tools that will list attached volumes.
The volumes plugin on Linux creates a table in:
/etc/monitoringclient/plugin-support/check_volumes_settings.conf
Editing this (sudo will be required) will allow you to adjust the presence and capacity monitoring for attached volumes:
{
"Path": "/extra-storage",
"Monitor_Presence": false,
"Monitor_Usage": false,
"Name": "xvdc",
"Usage_Threshold": 90
},
Set false to true where needed, and adjust the threshold between 1 and 99, as desired.
Monitoring Client
Installing Python2
If you receive a warning:
This package currently requires Python 2.x
Please install python2 through your package manager, then attempt the installation again.
Install Python2 with the following command:
sudo apt-get update && sudo apt-get install python
(Debian)
or
sudo yum update && sudo yum install python
(CentOS)
Automatic Updates
The Linux agent does attempt automatic updates by default.
The following command will enable automatic updates and is recommended:
sudo run-client --auto-update true
To disable automatic updates, use the following command:
sudo run-client --auto-update false
Manual Run
The agent can be asked to report manually using the following command:
sudo run-client -F
Manual Update
The agent can be updated manually using the following command:
sudo run-client -F --update
Removal
The agent can be manually removed using the following command:
sudo run-client -F --remove
Remote removal is a part of the Linux agent's automatic update process, and is only available if automatic updates are enabled.
Permalink: https://www.watchmanmonitoring.com/linux-cli
How can this article be improved?
Please sign in to leave a comment.