Logs produced by Sensu services – i.e. sensu-backend and sensu-agent – are often the best place to start when troubleshooting a variety of issues.
Each log message is associated with a log level, indicative of the relative severity of the event being logged:
|panic||😰 An error caused the service to exit uncleanly|
|fatal||👋 An error caused the service to exit cleanly (status 0)|
|error||❗❗ You should definitely look into this|
|warn||❗❓ Maybe you should look into this?|
|info||👌 Just so you know|
|debug||📈 Verbose output describing lower-level service operations|
These log levels can be configured by specifying the desired log level as the
log-level in the service configuration file (e.g.
backend.yml configuration files), or as an argument to the
command line flag:
sensu-agent start --log-level debug
Changes to log level via configuration file or command line arguments require restarting the service. For guidance on restarting a service, please consult the Operating section of the agent or backend reference, respectively.
Log file locations
Sensu services print structured log messages to standard output.
In order to capture these log messages to disk or another logging facility, Sensu services
make use of capabilities provided by the underlying operating service’s service
management. For example, logs are sent to the journald when systemd is the service manager,
whereas log messages are redirected to
/var/log/sensu when running under sysv
In the table below, the common targets for logging and example commands for
following those logs are described. The name of the desired service, e.g.
agent may be substituted for
|Platform||Version||Target||Command to follow log|
|RHEL/Centos||<= 6||log file||
|Ubuntu||<= 14.10||log file||
|Debian||<= 7||log file||
NOTE: Platform versions described above are for reference only and do not supercede the documented supported platforms.