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

Added cisco asa #35

Merged
merged 1 commit into from
Aug 17, 2020
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
30 changes: 30 additions & 0 deletions plugins/cisco_asa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Plugin Info
version: 0.0.1
title: Cisco ASA
description: Log parser for Cisco ASA
parameters:
listen_address:
label: Listen Address
description: A syslog address of the form `<ip>:<port>`
type: string
default: ":5140"

# Set Defaults
{{$listen_address := default ":5140" .listen_address}}

# Pipeline Template
pipeline:
- id: cisco_input
type: tcp_input
listen_address: {{ $listen_address }}
labels:
log_type: cisco_asa
output: cisco_parser

- id: cisco_parser
type: regex_parser
regex: '^(?P<timestamp>[\d\w\s:\-]+?)(?: asa )?: %(?P<message_id>[\w\d-]+):\s(?P<message>.*)'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat trick with the non-capturing group

timestamp:
parse_from: timestamp
layout: '%b %d %Y %H:%M:%S'
output: {{.output}}