Skip to content

Export-HarborSiemEvents

Harbor OnboardNo sign-in neededGenerated from the codeDescribes Onboard 0.59.0

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.

Terminal window
Export-HarborSiemEvents [[-Date] <string>] [[-HttpUrl] <string>] [[-AuthHeader] <string>] [[-Format] <string>] [[-OutFile] <string>] [[-BatchSize] <int>] [[-ConfigPath] <string>] [[-ConfigProfile] <string>]

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’)).

Terminal window
Export-HarborSiemEvents -OutFile .\harbor-feed.ndjson
Terminal window
Export-HarborSiemEvents -HttpUrl 'https://splunk:8088/services/collector/event' -AuthHeader ('Splunk ' + $token) -Format hec

Sent as the Authorization header, e.g. ‘Splunk <hec-token>’ or ‘Bearer <token>’.

Type Required Position Pipeline input
String No 2 No

Not described in the module help.

Type Required Position Pipeline input
Int32 No 5 No

Default: 100.

Not described in the module help.

Type Required Position Pipeline input
String No 6 No

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').

Not described in the module help.

Type Required Position Pipeline input
String No 3 No

Accepted values: json, hec. Default: json.

Not described in the module help.

Type Required Position Pipeline input
String No 1 No

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).

Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.