Skip to main content

Coroot-node-agent

Coroot-node-agent is a Prometheus- and OpenTelemetry-compatible agent that gathers comprehensive telemetry data about all containers running on a node and the node itself.

It collects and exports the following telemetry:

  • Metrics: Exported in Prometheus format or sent using the Prometheus Remote Write protocol.
  • Traces: eBPF-based network and application traces sent via OTLP/HTTP (OpenTelemetry protocol).
  • Logs: Discovers container logs and sends them via OTLP/HTTP.
  • Profiles: Uses the Pyroscope eBPF profiler to collect CPU profiles and sends them via a custom HTTP-based protocol.

Node Agent Configuration​

You can configure coroot-node-agent using command-line flags or environment variables.

FlagEnv VariableDefaultDescription
--listenLISTEN0.0.0.0:80HTTP listen address
--cgroupfs-rootCGROUPFS_ROOT/sys/fs/cgroupPath to the host's cgroup filesystem root
--disable-log-parsingDISABLE_LOG_PARSINGfalseDisable container log parsing
--disable-json-log-parsingDISABLE_JSON_LOG_PARSINGfalseDisable extracting the message, severity, and attributes from JSON-formatted logs
--disable-pingerDISABLE_PINGERfalseDisable ICMP ping to upstreams
--disable-l7-tracingDISABLE_L7_TRACINGfalseDisable application-layer (L7) tracing
--disable-gpu-monitoringDISABLE_GPU_MONITORINGfalseDisable GPU monitoring (NVML)
--enable-java-tlsENABLE_JAVA_TLSfalseEnable Java TLS instrumentation via dynamic agent loading
--enable-java-async-profilerENABLE_JAVA_ASYNC_PROFILERfalseEnable Java profiling via async-profiler (CPU, memory allocations, lock contention)
--ebpf-io-profilingEBPF_IO_PROFILINGtrueEnable eBPF disk I/O profiling (block I/O time and bytes by code path)
--go-heap-profilerGO_HEAP_PROFILERenabledGo heap profiling mode: disabled, enabled (passive), or force (enable profiling in all Go apps)
--instrumentation-delayINSTRUMENTATION_DELAY30sDelay before enabling Python GIL and Node.js event loop instrumentation, after a process is started
--container-allowlistCONTAINER_ALLOWLIST–List of allowed containers (regex patterns)
--container-denylistCONTAINER_DENYLIST–List of denied containers (regex patterns)
--skip-systemd-system-servicesSKIP_SYSTEMD_SYSTEM_SERVICEStrueSkip well-known systemd system services (apt, motd, udev, etc.)
--exclude-http-requests-by-pathEXCLUDE_HTTP_REQUESTS_BY_PATH–Exclude HTTP paths from metrics/traces
--track-public-networkTRACK_PUBLIC_NETWORK0.0.0.0/0Public IP networks to track
--ephemeral-port-rangeEPHEMERAL_PORT_RANGE32768-60999TCP ports to exclude from tracking
--providerPROVIDER–provider label for node_cloud_info
--regionREGION–region label for node_cloud_info
--availability-zoneAVAILABILITY_ZONE–availability_zone label for node_cloud_info
--instance-typeINSTANCE_TYPE–instance_type label for node_cloud_info
--instance-life-cycleINSTANCE_LIFE_CYCLE–instance_life_cycle label for node_cloud_info
--log-per-secondLOG_PER_SECOND10.0Rate limit for logs per second
--log-burstLOG_BURST100Max burst for log rate limiting
--log-patterns-per-containerLOG_PATTERNS_PER_CONTAINER256Max unique log patterns per container per level
--log-pattern-extraction-limitLOG_PATTERN_EXTRACTION_LIMIT100Max log messages per second per container for which patterns are extracted. Over-limit messages are counted under a dedicated event was sampled pattern (0 - unlimited)
--max-fqdns-per-containerMAX_FQDNS_PER_CONTAINER50Max unique FQDN values per container in container_dns_requests_total; extras are bucketed under ~other
--max-label-lengthMAX_LABEL_LENGTH4096Max metric label length
--collector-endpointCOLLECTOR_ENDPOINT–Unified base URL for telemetry export
--api-keyAPI_KEY–Coroot API key
--metrics-endpointMETRICS_ENDPOINT–Custom URL for metrics export
--traces-endpointTRACES_ENDPOINT–Custom URL for traces export
--traces-samplingTRACES_SAMPLING1.0Trace sampling rate (0.0 to 1.0)
--logs-endpointLOGS_ENDPOINT–Custom URL for logs export
--profiles-endpointPROFILES_ENDPOINT–Custom URL for profiles export
--profiles-prune-fractionPROFILES_PRUNE_FRACTION0.0025Drop insignificant profile code paths accounting for less than this fraction of the profile total (0 to disable)
--insecure-skip-verifyINSECURE_SKIP_VERIFYfalseSkip TLS certificate verification
--ca-fileCA_FILE–Path to the custom CA certificate file
--scrape-intervalSCRAPE_INTERVAL15sHow often to collect internal metrics
--wal-dirWAL_DIR/tmp/coroot-node-agentDirectory for WAL storage
--max-spool-sizeMAX_SPOOL_SIZE500MBMax size for on-disk spool
--config-fileCONFIG_FILE/etc/coroot-node-agent/config.yamlPath to the optional YAML configuration file (see Configuration file)

Configuration file​

Databases running on a node can be monitored by the node agent itself, from inside the node, instead of by coroot-cluster-agent. This is meant for the cases where the cluster agent cannot reach the database: a MySQL or Postgres server installed as a system service on a VM and listening on 127.0.0.1 only, or a database in a network the cluster agent has no route to. For everything else, including databases in Kubernetes and managed cloud databases, use the cluster agent.

The databases to monitor are listed in a YAML file. The agent reads it once at startup from the path given by --config-file, /etc/coroot-node-agent/config.yaml by default. The file is optional: when it is missing, the agent runs as usual and monitors no databases. When the agent runs as a container, mount the file into the container at that path. Environment variable references (${VAR}) in the file are expanded when it is read, so credentials can be kept out of the file. This feature is not available on Windows.

databases:
- type: mysql # postgres, mysql, redis, memcached or mongodb
host: 127.0.0.1 # an IP address the server listens on, as seen from the node
port: "3306"
credentials:
username: coroot
password: ${MYSQL_PASSWORD}
params: {tls: "false"} # the same per-type parameters as in the cluster agent: tls, sslmode, authSource
- type: postgres
host: 127.0.0.1
port: "5432"
credentials: {username: coroot, password: ${PG_PASSWORD}}
params: {sslmode: disable}
- type: redis
host: 127.0.0.1
port: "6379"

Every ten seconds the agent looks for a process on the node that listens on the configured address. The address must be an IP address, not a hostname. A loopback address matches only a server running in the host network namespace, that is a system service rather than a container. For a server in a container, use one of the container's own IP addresses. Once the listening process is found, the agent connects to the database from the node and attributes everything it collects to that process's container (a systemd unit, a Docker container or a pod), so the data shows up on the same application as the server's CPU, memory, network and log telemetry. If the server is stopped, the collection stops with it and resumes when it is back.

What is collected is the same as with the cluster agent: the per-type metrics described on the database pages (Postgres, MySQL, Redis, MongoDB, Memcached), and the schema and settings changes shown as events on the application, which are sent through the agent's logs endpoint. The required database privileges are also the same. The MySQL error log is not read from performance_schema.error_log in this mode, since the node agent already collects the server's log file and journal as container logs.

Windows​

The Windows agent uses the same flags, but only the platform-independent subset. Linux-only capabilities (eBPF L7 tracing and profiling, cgroups, Java/Python/Node.js instrumentation, the ICMP pinger, systemd handling, and trace/profile export) do not apply.

Flag names are identical (for example --scrape-interval), but environment variables are prefixed with COROOT_. On Windows environment variables are global, so the prefix avoids clashing with other software. For example, SCRAPE_INTERVAL becomes COROOT_SCRAPE_INTERVAL.

FlagEnv VariableDescription
--collector-endpointCOROOT_COLLECTOR_ENDPOINTBase URL of your Coroot instance
--api-keyCOROOT_API_KEYProject API key
--scrape-intervalCOROOT_SCRAPE_INTERVALMetrics collection interval
--metrics-endpoint / --logs-endpointCOROOT_METRICS_ENDPOINT / COROOT_LOGS_ENDPOINTCustom export URLs
--insecure-skip-verifyCOROOT_INSECURE_SKIP_VERIFYSkip TLS verification of the collector
--ca-fileCOROOT_CA_FILEPath to a custom CA certificate
--disable-log-parsingCOROOT_DISABLE_LOG_PARSINGDisable Windows Event Log and container log collection
--disable-json-log-parsingCOROOT_DISABLE_JSON_LOG_PARSINGDisable extracting the message, severity, and attributes from JSON-formatted logs
--disable-gpu-monitoringCOROOT_DISABLE_GPU_MONITORINGDisable NVIDIA GPU monitoring
--container-allowlist / --container-denylistCOROOT_CONTAINER_ALLOWLIST / COROOT_CONTAINER_DENYLISTRegex of services to include or exclude
--provider / --region / --availability-zone / --instance-type / --instance-life-cycleCOROOT_PROVIDER and so onOverride node_cloud_info labels
--wal-dir / --max-spool-sizeCOROOT_WAL_DIR / COROOT_MAX_SPOOL_SIZESpool directory and max size
--listenCOROOT_LISTENLocal /metrics listen address

See the Windows installation guide for setting these via the MSI or machine environment variables.

Container Environment Variables​

You can disable specific functionality for individual containers by setting environment variables within the container:

Environment VariableDescription
COROOT_EBPF_PROFILING=disabledDisable eBPF profiling for this container
COROOT_LOG_MONITORING=disabledDisable log monitoring and parsing for this container
COROOT_EBPF_TRACES=disabledDisable eBPF traces for this container

These environment variables are read from the container's process environment and allow fine-grained control over which containers are monitored by the agent.

Looking for 24/7 support from the Coroot team? Subscribe to Coroot Enterprise:Start free trial