Created on 06-27-2024 07:48 AM Edited on 06-27-2024 07:59 AM By Jean-Philippe_P
Description | This article describes how to export raw event logs using the command line. |
Scope | FortiSIEM. |
Solution |
The tool to be used in order to export the logs will depend on the storage type:
The Raw Event Logs will be exported in CSV format.
If using EventDB, use the 'phExportEvent' tool to export events.
Usage:
phExportEvent --src <SourceDir> --dest <DestinationDir> --starttime <startTime> --endtime <endTime>
The following are valid time limits:
<time> : "YYYY-MM-DD hh:mm:ss[+-]TZ" (notice the quotation marks)
Example:
phExportEvent --src /data/eventdb --dest /home/admin --starttime "2010-10-18 11:00:00-7" --endtime "2010-10-18 12:00:00-7" --org Super --org customer111
(The -7 timezone is Pacific Daylight-savings Time (PDT) or GMT-7).
If using ClickHouse, use the 'phClickHouseCSVExport' tool to export events:
phClickHouseCSVExport --starttime [Start Time] --endtime [End Time] --outfile [Output file] --deviceip [Reporting IP] --devicename [Reporting Device Name] --limit [specify the number of records to return, default - no limit] --debug [Dump SQL statment generated for this report]
A valid time limit is in the following format:
The supported timezone is GMT.
Example:
If using Elasticsearch, use the 'phExportESEvent' tool: Usage:
phExportESEvent <ESUrl> <ESPort> <ESDeploymentType> "<ESUser>" "<ESPassword>" <ESIndexName> <ReportingDevIp> <destDir> <splitThreads> <LogLevel>
Examples:
Native Elasticsearch Deployment Example:
AWS Elasticsearch Service Deployment Example:
Elasticsearch Cloud Deployment Example:
phExportESEvent https://cpaagg33-d11e01.es.us-central1.gcp.cloud.es.io 9243 3 "elastic" "password" fortisiem-event-2021.10.01-1-000001 "" /archive/ 10 INFO
Note: - DO NOT use a large time window. - Events beginning with 'PH_DEV_MON' are FortiSIEM-generated events and thus will not be exported.
Related document: |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.