Skip to content

Pattern for Citrix ADC #277

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions patterns/citrixadc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CITRIXADC_LOG %{SYSLOG5424PRI:citrixadc_syslog5424pri} %{DATE:citrixadc_date}:%{TIME:citrixadc_time} %{NOTSPACE:citrixadc_hostname} %{NOTSPACE:citrixadc_packetengine} : %{WORD} %{WORD:citrixadc_module} %{WORD:citrixadc_eventtype} %{WORD:citrixadc_eventid} \d : %{GREEDYDATA:citrixadc_message}
20 changes: 20 additions & 0 deletions spec/patterns/citrixadc_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# encoding: utf-8
require "spec_helper"
require "logstash/patterns/core"

describe "CIRIXADC" do

let(:citrixadc_pattern) { "CITRIXADC_LOG" }

context "Parsing Citrix ADC log line from raw syslog line" do

let(:value) { '"<134> 08/02/2020:14:53:24 vpx 0-PPE-0 : default CLI CMD_EXECUTED 1488010 0 : User nsroot - Remote_ip 192.168.0.1 - Command \"save ns config\" - Status \"Success\"\n"' }
subject { grok_match(citrixadc_pattern, value) }

it { should include("citrixadc_hostname" => "vpx") }
it { should include("citrixadc_module" => "CLI") }
it { should include("citrixadc_eventtype" => "CMD_EXECUTED") }

end

end