Export-HarborSiemEvents
Ships a day of the structured activity log to a SIEM: Splunk HEC or any JSON collector over HTTP, or an NDJSON file for an agent-based pipeline (Splunk UF, Sentinel AMA, Filebeat) to pick up.
Syntax
Section titled “Syntax”Export-HarborSiemEvents [[-Date] <string>] [[-HttpUrl] <string>] [[-AuthHeader] <string>] [[-Format] <string>] [[-OutFile] <string>] [[-BatchSize] <int>] [[-ConfigPath] <string>] [[-ConfigProfile] <string>]Description
Section titled “Description”The tamper-evident JSONL activity log (harbor-YYYYMMDD.jsonl) is already SIEM-shaped – this cmdlet is the forwarder. Two formats:
- json: the records exactly as logged (seq/prevHash/hash intact, so the chain stays verifiable downstream), newline-delimited.
- hec: each record wrapped for Splunk HTTP Event Collector ({time epoch, host, source, sourcetype ‘harbor:activity’, event}).
HTTP delivery batches records (-BatchSize, default 100) and is best-effort per batch: one failed batch never aborts the rest; the summary counts sent vs failed. Run it from a scheduler for a daily feed (yesterday: -Date (Get-Date).AddDays(-1).ToString(‘yyyyMMdd’)).
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Export-HarborSiemEvents -OutFile .\harbor-feed.ndjsonExample 2
Section titled “Example 2”Export-HarborSiemEvents -HttpUrl 'https://splunk:8088/services/collector/event' -AuthHeader ('Splunk ' + $token) -Format hecParameters
Section titled “Parameters”-AuthHeader
Section titled “-AuthHeader”Sent as the Authorization header, e.g. ‘Splunk <hec-token>’ or ‘Bearer <token>’.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 2 | No |
-BatchSize
Section titled “-BatchSize”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
Int32 |
No | 5 | No |
Default: 100.
-ConfigPath
Section titled “-ConfigPath”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 6 | No |
-ConfigProfile
Section titled “-ConfigProfile”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 7 | No |
Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 0 | No |
Default: (Get-Date).ToString('yyyyMMdd').
-Format
Section titled “-Format”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 3 | No |
Accepted values: json, hec. Default: json.
-HttpUrl
Section titled “-HttpUrl”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 1 | No |
-OutFile
Section titled “-OutFile”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 4 | No |
This command also accepts the PowerShell common parameters (-Verbose, -ErrorAction, and so on).
See also
Section titled “See also”- All Harbor Onboard cmdlets
- In PowerShell:
Get-Help Export-HarborSiemEvents -Full
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
