Manage Console Logging for Agent Components
Sysdig Agent provides the ability to set component-wise log levels that
override the global console logging level controlled by the
console_priority configuration option. The components represent
internal software modules and can be found in
By controlling logging at the fine-grained component level, you can
avoid excessive logging from certain components in
enable extra logging from specific components for troubleshooting.
To set component-level logging:
Determine the agent component you want to set the log level:
To do so,
Look at the console output.
If you’re using an orchestrator like Kubernetes, the log viewer facility, such as the
kubectllog command, shows the console log output.
Copy the component name.
The format of the log entry is:
<timestamp>, <<pid>.<tid>>, <log level>, <component>[pid]:[line]: <message>
For example, the given snippet from a sample log file shows log messages from
2020-09-07 17:56:01.173, 27979.28018, Information, sdjagent: Java classpath: /opt/draios/share/sdjagent.jar 2020-09-07 17:56:01.173, 27979.28018, Information, mountedfs_reader: Starting mounted_fs_reader with pid 27984 2020-09-07 17:56:01.174, 27979.28019, Information, watchdog_runnable:105: connection_manager starting 2020-09-07 17:56:01.174, 27979.28019, Information, protobuf_file_emitter:64: Will save protobufs for all message types 2020-09-07 17:56:01.174, 27979.28019, Information, connection_manager:282: Initiating connection to collector 2020-09-07 17:56:01.175, 27979.27979, Information, dragent:1243: Created Sysdig inspector
dragent.yamlfile and add the desired components:
In this example, you are setting the global level to notice and component log levels for
log: console_priority: notice console_priority_by_component: - "connection_manager: debug" - "protobuf_file_emitter: notice" - "watchdog_runnable: warning" - "sdjagent: error"
The log levels specified for components override global settings.
Restart the agent.
For example, if you have installed the agent as a service, then run:
$ service dragent restart
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.