The agent is configured via its configuration file
You can use any text editor to open and edit this file.
The option you can use vary from version to version. To get an overview of all possible option execute
cagent -p on the command line. This print the current running configuration with all possible options.
Copy the options you want to change and insert it to the
Cagent version 1.6.0 supports the following options.
# operation_mode, possible values:# "full": perform all checks unless disabled individually through other config option. Default.# "minimal": perform just the checks for CPU utilization, CPU Load, Memory Usage, and Disk fill levels.# "heartbeat": Just send the heartbeat according to the heartbeat interval.# Applies only to io_mode = http, ignored on the command line.operation_mode = "full"# interval to push metrics to the HUBinterval = 90.0# send a heartbeat without metrics to the HUB every X secondsheartbeat = 15.0# pid file locationpid = ""# log file locationlog = "/var/log/cagent/cagent.log"# "local" for local unix socket or URL e.g. "udp://localhost:514" for remote syslog serverlog_syslog = ""# "debug", "info", "error" verbose level; can be overridden with -v flaglog_level = "error"#io_mode = "http"#hub_url = "https://hub.cloudradar.io/ctrapper/"#hub_user = "xxxxx"#hub_password = "yyyy"# enable gzip when sending results to the HUBhub_gzip = true# time limit in seconds for requests made to Hub.# The timeout includes connection time, any redirects, and reading the response body.# Min: 1, Max: 600. default: 30hub_request_timeout = 30#hub_proxy = ""#hub_proxy_user = ""#hub_proxy_password = ""# default ['avg1']cpu_load_data_gathering_mode = ["avg1"]# default ['avg1']cpu_utilisation_gathering_mode = ["avg1"]# default ['user','system','idle','iowait']cpu_utilisation_types = ["user", "system", "idle", "iowait"]# default ['ext3','ext4','xfs','jfs','ntfs','btrfs','hfs','apfs','fat32','smbfs','nfs']fs_type_include = ["ext3", "ext4", "xfs", "jfs", "ntfs", "btrfs", "hfs", "apfs", "fat32", "smbfs", "nfs"]# Exclude file systems by name, disabled by defaultfs_path_exclude = # Having fs_path_exclude_recurse = false the specified path must match a mountpoint or it will be ignored# Having fs_path_exclude_recurse = true the specified path can be any folder and all mountpoints underneath will be excludedfs_path_exclude_recurse = false# default ['free_B', 'free_percent', 'total_B', 'read_B_per_s', 'write_B_per_s', 'read_ops_per_s', 'write_ops_per_s', 'inodes_used_percent']fs_metrics = ["free_B", "free_percent", "total_B", "read_B_per_s", "write_B_per_s", "read_ops_per_s", "write_ops_per_s", "inodes_used_percent"]# To avoid monitoring of so-called mount binds mount points are identified by the path and device name.# Mountpoints pointing to the same device are ignored. What appears first in /proc/self/mountinfo is considered as the original.# Applies only to Linuxfs_identify_mountpoints_by_device = true#net_interface_exclude = # default ["^vnet(.*)$", "^virbr(.*)$", "^vmnet(.*)$", "^vEthernet(.*)$"]. On Windows, also "Pseudo-Interface" is added to listnet_interface_exclude_regex = ["^vnet(.*)$", "^virbr(.*)$", "^vmnet(.*)$", "^vEthernet(.*)$"]# default truenet_interface_exclude_disconnected = true# default truenet_interface_exclude_loopback = true# default ['in_B_per_s','out_B_per_s','total_out_B_per_s','total_in_B_per_s']net_metrics = ["in_B_per_s", "out_B_per_s", "total_out_B_per_s", "total_in_B_per_s"]# If the value is not specified, cagent will try to query the maximum speed of the network cards to calculate the bandwidth usage (default)# Depending on the network card type this is not always reliable.# Some virtual network cards, for example, report a maximum speed lower than the real speed.# You can set a fixed value by using <number of Bytes per second> + <K, M or G as a quantifier>.# Examples: "125M" (equals 1 GigaBit), "12.5M" (equals 100 MegaBits), "12.5G" (equals 100 GigaBit)net_interface_max_speed = ""# default ['uname','os_kernel','os_family','os_arch','cpu_model','fqdn','memory_total_B']system_fields = ["uname", "os_kernel", "os_family", "os_arch", "cpu_model", "fqdn", "memory_total_B"]# default truehardware_inventory = true# default truediscover_autostarting_services_only = true# default truetemperature_monitoring = true# Software raid monitoring# Auto-detect software raids by reading /proc/mdstat and monitor them# default truesoftware_raid_monitoring = true# Enable S.M.A.R.T monitoring of hard disks# default falsesmart_monitoring = false# Path to a smartctl binary (smartctl.exe on windows, path must be escaped) version >= 7# See https://docs.cloudradar.io/configuring-hosts/installing-agents/troubleshoot-s.m.a.r.t-monitoring# smartctl = "C:\\Program Files\\smartmontools\\bin\\smartctl.exe"# smartctl = "/usr/local/bin/smartctl"smartctl = ""[cpu_utilisation_analysis]# target value to start the analysisthreshold = 10.0# threshold compare function, possible values: 'lt', 'lte', 'gt', 'gte'function = "lt"metric = "idle"# should be one of values of cpu_utilisation_gathering_modegathering_mode = "avg1"# number of processes to returnreport_processes = 5# how much time analysis will continue to perform after the CPU utilisation returns to the normal valuetrailing_process_analysis_minutes = 5[logs]# Enable monitoring of hardware health for MegaRaids# reported by the storcli command-line tool# Refer to https://docs.cloudradar.io/cagent/modules#storcli# On Linux make sure a sudo rule exists. The storcli command is always executed via sudo. Example:# cagent ALL= NOPASSWD: /opt/MegaRAID/storcli/storcli64 /call show all J[storcli]# Enable on Windows:# binary = 'C:\Program Files\storcli\storcli64.exe'# Enable on Linux:# binary = '/opt/storcli/sbin/storcli64'binary = ""# Settings for the jobmon wrapper for the job monitoring[jobmon]# Path to spool dirspool_dir = "/var/lib/cagent/jobmon"# Record the last 4 KB of the error output. Default: truerecord_stderr = true# Record the last 4 KB of the standard output. Default: falserecord_stdout = false# Failed jobs will be processed as alerts. Possible values alert, warning or none. Default: alertseverity = "alert"# Monitor the available updates using the operating system updates service# Uses apt-get, apt-check or yum, Requires sudo rules. DEB and RPM packages install them automatically.# On Windows, it requires windows updates to be switched on, ignored if windows updates are switched off[system_updates_checks]# Set 'false' to disable checking available updatesenabled = true# Maximum time the package manager is allowed to spend fetching available updates, ignored on windowsfetch_timeout = 30# Check for available updates every N seconds. Minimum is 300 secondscheck_interval = 14400# Monitor the basic performance metrics of a MySQL or MariaDB database# ** EXPERIMENTAL **# ** Do not use in production environments **[mysql_monitoring]# Set 'false' to disable checking available updatesenabled = false# Use 127.0.0.1 or the path to the mysql.socket, connecting to remote databases is not supportedconnect = ""# Create a user with minimal rights# mysql > GRANT USAGE ON *.* TO [email protected] IDENTIFIED BY '<password>';user = ""# Maximum time the package manager is allowed to spend fetching available updatespassword = ""# Maximum time to wait for mysql server to connect using provided credentialsconnect_timeout = 0.0# Cagent monitors all running processes and reports them for further processing to the Hub.# On heavy loaded systems or if you don't need process monitoring at all,# you can change the following settings.[process_monitoring]enabled = true# Monitor kernel tasks identified by process group 0# Ignored on Windows.enable_kerneltask_monitoring = true# The process list is sorted by PID descending. Only the top N processes are monitored.max_number_monitored_processes = 500# Control how cagent installs self-updates. Windows-only[self_update]# Set 'false' to disable self-updatesenabled = false# URL for updates feedurl = ""# Cagent will check for new versions every N secondscheck_interval = 21600# Cagent monitors all running docker containers and reports them for further processing to the Hub.# You can change the following settings.[docker_monitoring]# Set 'false' to disable docker monitoring'enabled = true
Operation Mode: If you want to run the agent in the minimal operation mode, insert the following line to the
operation_mode = "minimal"
Do not monitor software raids: On NAS for example Synology RAIDs are often created for all available bays even if they are empty. The monitoring will consider the raid as broken because devices are missing. To not get bothered by false alerts, switch of the RAID monitoring by adding this line to the
software_raid_monitoring = false
Exclude a filesystem (drive letter) from the monitoring: If you want to exclude a Window drive from being monitored, enter the following line to
fs_path_exclude = ["D:"]
Any changes to the config file require a restart of the service. On Linux execute
systemctl restart cagent. On Windows use the service control panel or execute on the command line.
sc stop cagentsc start cagent