Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vcenter_parser): Add route for vCenter json parsing #414

Merged
merged 5 commits into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion plugins/vmware_vcenter.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Plugin Info
version: 0.0.9
version: 1.0.0
title: VMware vCenter
description: Log parser for VMware vCenter
min_stanza_version: 0.13.16
Expand Down Expand Up @@ -84,6 +84,8 @@ pipeline:
- id: prefix_router
type: router
routes:
- expr: '$record matches "^{*"'
output: gcve_json_parser
- expr: '$record matches "^\\d* "'
output: pre_parser
default: vcenter_parser
Expand All @@ -106,3 +108,47 @@ pipeline:
type: syslog_parser
protocol: rfc5424
output: {{ .output }}

- id: gcve_json_parser
type: json_parser
parse_from: $record
severity:
parse_from: '$record["@fields.severity"]'
timestamp:
layout: "2006-01-02T15:04:05.000000-07:00"
layout_type: gotime
parse_from: '$record["@timestamp"]'
output: gcve_restructure

- id: gcve_restructure
type: restructure
ops:
- move:
from: '$record["@version"]'
to: "$record.version"
- move:
from: '$record["@fields.host"]'
to: '$record.host'
- move:
from: '$record["@fields.facility"]'
to: '$record.facility'
- move:
from: '$record["@fields.procid"]'
to: '$record.procid'
- move:
from: '$record["@fields.privatecloud_id"]'
to: '$record.privatecloud_id'
- move:
from: '$record["@fields.privatecloud_name"]'
to: '$record.privatecloud_name'
- move:
from: '$record["@fields.alias"]'
to: '$record.alias'
- move:
from: '$record["@fields.company_name"]'
to: '$record.company_name'
- move:
from: '$record["@fields.region_id"]'
to: '$record.region_id'
output: {{.output}}

kuiperda marked this conversation as resolved.
Show resolved Hide resolved
kuiperda marked this conversation as resolved.
Show resolved Hide resolved