You can view logs to quickly check the running status of a single server to troubleshoot issues. This topic describes the important logs that are provided by Microservices Engine (MSE). The logs are applicable to all applications for which MSE application protection is enabled.
MSE agent versions earlier than 4.3.0: ${BaseDir}=${user_home}/logs/csp.
MSE agent version 4.3.0 and later: ${BaseDir}=/home/admin/.opt/AliyunJavaAgent/logs/sentinel.
You can query the MSE agent version from the node details of your application.
File | Path | Description |
Second-level monitoring logs |
| Second-level monitoring logs are generated for resources. You can view the running status of resources in the logs. |
Blocking details logs |
| After a rule takes effect, requests that meet the rules are blocked and relevant logs are generated. |
Business logs |
| Business logs record the push, reception, and processing of rules and resource calls. The logs are useful for troubleshooting. |
Second-level monitoring logs
Second-level monitoring logs are generated for all resources and saved in the ${app_name}-metrics.log file in the ${BaseDir} path. Each row records the metric data of a resource in one second. The following data shows an example.
1718765870000|2024-06-19 02:57:50|/flow|30|5|30|10|13|0|1|1|IN1718765870000: the timestamp.2024-06-19 02:57:50: the formatted timestamp./flow: the resource name.30: the passed queries per second (QPS). The value represents the number of times the resource is passed in one second. The value also indicates the number of checks that are passed based on Sentinel rules.5: the rejected QPS. The value represents the number of times a resource is blocked in one second.30: the completed QPS. The value represents the number of times calls of a resource are made in one second, including the successful and failed calls.10: the abnormal QPS. The value represents the number of processing exceptions of a resource in one second.13: the average response time (RT) of a resource.0: You do not need to pay attention to this value.1: the parallelism. The value represents the number of requests that are being processed by a resource but their calls are not completed.
1: You do not need to pay attention to this value.
IN/OUT: the server request (IN) or client request (OUT) of the console.
Blocking details logs
Regardless of throttling, degradation, or system protection, their second-level blocking details logs are stored in the sentinel-block.log file in the ${BaseDir} path. Each row records the denial-related metric data of a resource in one second. The following sample data shows the data format.
2024-06-19 03:13:44|1|/a,ConcurrencyLimitException,default,origin,26133,1718766824000|1,0,0
2024-06-19 03:13:45|1|/flow,FlowException,default,origin,33593,1718766825000|6,0,022024-06-19 03:13:44: the formatted timestamp.1: the serial number. You do not need to pay attention to this value./a: the resource name.XXXException: the blocking type.FlowExceptionindicates interface throttling.ConcurrencyLimitExceptionindicates concurrency isolation.WebFlowExceptionindicates hot parameter protection (HTTP). ParamFlowException indicates hot parameter protection (RPC). DegradeException indicates circuit breaking or degradation.default: You do not need to pay attention to this value.origin: You do not need to pay attention to this value.26133: the ID of the rule for triggering throttling.1718766824000: the timestamp.
1,0,0: 1 indicates the number of throttling or degradation occurrences within one second. A value of 0 has no meaning and can be ignored.
Business Logs
Business logs are stored in the sentinel-record.log.xxx file in the ${BaseDir} path. The logs record information about pushing, reception, and processing of rules.