Migrate from Log Analysis to Log Management in Security Center. This migration uses a parallel-write, validation, and switchover process to ensure zero incremental log data loss during the upgrade.
Why migrate to Log Management?
Log Management addresses the storage, cross-region delivery, and analytics limitations of Log Analysis.
Feature | Log Analysis | Log Management |
Core features | Basic log collection, query, and alerting. | Full-featured: standard SQL (SQL-92) for complex queries and statistical analysis, plus advanced capabilities like intelligent clustering. |
Delivery region | System-defined default region. No customization. | Custom delivery region. |
Multi-account | Not supported. | Supported. |
Storage period | Fixed at 180 days. | Custom TTL: 1 to 3,650 days, or permanent storage. |
Migration plan
Migration process
Write logs to both services in parallel. After you verify that the new service is stable and reliable, stop writing to the old service.
Parallel write: Enable both Log Management and Log Analysis so incremental logs write to both services simultaneously.
Data validation: Compare data in Log Management against Log Analysis to verify that Log Management data is complete and accurate.
Switchover: After confirming data consistency, turn off the Log Analysis delivery switch. All incremental logs then write only to Log Management.
Process historical data: Archive Log Analysis historical data to OSS or let it expire automatically.
Resource cleanup: Unsubscribe from Log Analysis to stop billing and complete the migration.
Key risks and compatibility
Before you begin, assess and implement data backups and any necessary code modifications.
Risk of historical data loss: If you clear data and unsubscribe from Log Analysis before backing up historical data, the data is permanently lost.
SQL query incompatibility: Due to differences in storage structures, Log Analysis (by Topic) and Log Management (by logstore) require separate SQL query statements and are not interchangeable.
Management API incompatibility: Management APIs and exclusive features of Log Analysis and Log Management are incompatible. API fields and responses differ and require separate adaptation. Log Management API | Log Analysis API.
Cost assessment
Costs during the parallel write phase: You incur data write and storage charges for both services.
Costs for processing historical data:
Exporting to OSS incurs OSS storage fees.
Letting data expire naturally requires continued Log Analysis storage fees for up to 180 days.
Procedure
Step 1: Enable and configure Log Management
Log on to the console
Log on to the Security Center console. In the left-side navigation pane, choose . In the upper-left corner, select the region of your assets: Chinese Mainland or Outside Chinese Mainland.
NoteIf you have activated Agentic SOC, go to .
Activate the service
On the Log Management page, select a billing method — Activate Subscription or Activate Pay-as-you-go — and follow the on-screen instructions. Activate or deactivate the Log Management service.
subscription:
Set the Purchase or Not option for Agentic SOC to Yes.
Enter the log storage capacity based on your needs, click Order Now, and complete the payment. To estimate capacity, see Agentic SOC Purchase Guide.
pay-as-you-go: Select a storage region and click Activate and Authorize.
Turn on the delivery switches
On the Log Management page, click Log Settings.
In the Log Storage Management area on the Security Center Logs tab, set the delivery status for each log type.
NoteAgentic SOC automatically turns on all Security Center log delivery switches within 30 minutes by default.
If you have not purchased value-added services such as Application Protection or Malicious File Detection, their delivery switches are disabled by default.
Step 2: Validate data in Log Management
Query logs
On the Log Management page, select a log type under Security Center Logs from the Log Type drop-down list, then click Search & Analyze.
ImportantLogs may take about one minute to become queryable.
Verify the data
Verify at least the following aspects:
Timeliness: The latest log timestamp should be close to the current time.
Completeness: Spot-check logs in both services to ensure all fields are present and no data is missing.
Volume: The log volume over a given period should roughly match the incremental volume in Log Analysis.
Step 3: Stop writing data to Log Analysis
Perform this step only after you complete Step 2 and confirm that Log Management is working correctly.
On the Log Analysis service page, find the log delivery switch and turn it Off.
The log delivery switch is the green toggle in the upper-right corner of the page, located to the left of the Enable All button.
After this switch is turned off, new incremental logs are written only to Log Management.
Step 4: Process historical data
For historical data still in Log Analysis (within its 180-day retention), choose one of the following options:
Option 1: Export historical data to OSS for archiving
Suitable if you need to retain historical data long-term for compliance or future analysis.
Procedure:
On the Log Analysis page, click Advanced Management of Simple Log Service to go to the Simple Log Service (SLS) console.
On the details page of the sas-log logstore, in the left-side navigation pane, click .
Click + to create a data shipping job. For information about how to configure the job, see Create an OSS data shipping job (new version).
After the historical data is saved, on the Log Analysis page, click Clear.
WarningThis action is irreversible. Verify that Log Management is receiving data correctly and that all historical data is backed up.
Note: You can store the data permanently. Use tools such as MaxCompute or Data Lake Analytics to analyze it when needed.
Option 2: Allow historical data to expire naturally
Suitable if you do not need to archive historical data long-term.
Procedure: No action required. Keep Log Analysis enabled after migrating incremental data. The system automatically deletes log data after its 180-day lifecycle.
Note: You continue to incur Log Analysis storage fees until all data expires.
Step 5: Unsubscribe from the Log Analysis service
After you process historical data and clear the storage, downgrade and unsubscribe from Log Analysis to stop billing.
FAQ
After I activate Log Management, why don't I see any logs on the query page?
Check the following:
Check the delivery switches: In Log Settings, confirm that the delivery switches for the required log types are on.
Wait for data latency: Newly written logs may take about one minute to become queryable. Wait and refresh.
Check authorization: Verify that you granted the necessary permissions to related cloud services during activation.
Why are there discrepancies in logs from the old and new services for the same time period?
A minor discrepancy (typically within 1%) is normal due to:
Query time window: The exact start and end times of two queries may differ by milliseconds.
Data latency: The two pipelines have different latencies, causing minor differences at query time boundaries.