Skip to main content
Version: v1.7.x

Log Management

HertzBeat's log management feature provides comprehensive log data management capabilities, including log querying, statistical analysis, and batch deletion operations. Users can precisely search logs through various filter conditions, view detailed statistical charts, and clean up unnecessary log data.

Prerequisites

Before using the log management feature, you must first configure a database that supports log storage.

Feature Overview

In the HertzBeat interface, navigate to "Logs" -> "Log Management" page, where you'll see a comprehensive log management interface.

log_manage

Log Query Features

Filter Conditions

Log management supports the following filter conditions for precise querying:

Filter ConditionField NameData TypePurposeExample ValueUse Case
Time RangetimestampDateTimeSpecify query time window2024-01-01 00:00:00 to 2024-01-02 00:00:00Issue time period location, performance analysis
Trace IDtraceIdStringRequest tracing in distributed systems1234567890abcdefLink tracing, request flow analysis
Span IDspanIdStringIdentifier for specific operations in tracesabcdef1234567890Microservice call analysis
Severity NumberseverityNumberNumberOpenTelemetry standard level1-24Filter by numeric level
Severity TextseverityTextStringHuman-readable log levelERROR, WARN, INFOQuick filtering by level

Visualization Analysis Charts

Visualization analysis charts include basic statistical indicator charts and aggregated statistical charts. Click the "Show Statistics" button to expand and view them.

log_manage_chart

Basic Statistical Indicators

Statistical IndicatorDescriptionApplication ValueAnomaly Threshold Reference
Total LogsTotal number of logs matching query criteriaEvaluate system activity and data scaleSudden increase/decrease over 50% needs attention
FATAL LogsFatal error level log statisticsIdentify system critical failuresAny FATAL logs need immediate handling
ERROR LogsError level log statisticsMonitor system anomaliesOver 5% of total logs needs attention
WARN LogsWarning level log statisticsDiscover potential issues and performance bottlenecksContinuous growth trend needs analysis
INFO LogsInformation level log statisticsUnderstand normal system operation statusShould be the main body of logs
DEBUG LogsDebug level log statisticsDevelopment debugging and issue troubleshootingShould control quantity in production environment

Aggregated Statistical Charts

Chart NameChart TypeDisplay ContentMain PurposeIncluded Metrics/Levels
Severity Distribution ChartPie chartQuantity distribution of different log levelsQuickly understand log severity distributionFATAL, ERROR, WARN, INFO, DEBUG
Trace Coverage ChartPie chartProportion of logs with trace informationAnalyze system trace coverageNumber of logs with Trace ID
Number of logs with Span ID
Number of logs with both Trace and Span
Number of logs without trace information
Log Trend ChartTimeline chartHourly statistics of log quantity trendsAnalyze log generation time patterns and anomaly peaksTime granularity: Hourly statistics
Analysis dimension: Time pattern recognition, anomaly peak detection

Column Display Configuration

Click the "Column Settings" button to customize table column display:

  • Time: Log generation timestamp
  • Observed Time: Time when log was observed
  • Severity: Log level label
  • Log Content: Main message content
  • Attributes: Log additional attribute information
  • Resource: Resource-related information
  • Trace ID: Distributed tracing identifier
  • Span ID: Operation span identifier
  • Trace Flags: Trace flag information
  • Instrumentation Scope Info: Instrumentation scope information
  • Dropped Count: Number of dropped attributes

Log Details View

Click any log entry in the table to open the details modal:

log_manage

Basic Information Section

  • Severity: Display level label and color identifier
  • Timestamp: Formatted detailed time display
  • Trace ID: Complete distributed tracing identifier
  • Span ID: Complete operation span identifier

Complete JSON Data

  • Raw Data: Display complete JSON format of log entry
  • Copy Function: Support one-click copy to clipboard
  • Formatted Display: JSON data is formatted for easy reading

Batch Delete Feature

  1. Select Logs: Use checkboxes on the left side of the table to select logs for deletion
  2. Select All: Use the checkbox in the table header to select all logs on the current page
  3. Batch Delete: Click the "Batch Delete" button to delete selected logs
  4. Delete Count: Button shows the number of currently selected logs

Troubleshooting

Unable to View Logs

Symptoms: Page shows "No Data" or loading failure Solutions:

  1. Check if time-series database is properly configured
  2. Confirm database service is running normally
  3. Verify database connection configuration is correct
  4. Check if log data is being written to the database

For more information about log management features or technical issues, feel free to engage with the community through GitHub Issues.