spigot

module
v0.0.0-...-424d171 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: Apache-2.0

README

Spigot

A small utility to write synthetic logs to different destinations.

Currently supported log formats are:

  • AWS Firewall
  • AWS vpcflow
  • Common Log Format
  • Cisco ASA
  • Citrix CEF
  • Fortinet Firewall
  • Generic CEF
  • Windows Event XML (winlog)

Currently supported destinations are:

  • Local file
  • AWS S3 bucket
  • Syslog (TCP or UDP)
  • Rally (ndjson to local file)
  • Windows Event Logs (winlog) - Only supported on windows

Command Line Flags

  • -c Path to configuration. Default "./spigot.yml"
  • -r Seed random number generator with current time. Default false.

Config file

A configuration file is required. The configuration file is a list of runner configurations. Runner configurations consist of:

  • generator object. This contains the configuration for the generator. See godoc for each generator for config options.

  • output object. This contains the configuration for the output. See godoc for each output for config options.

  • records. An integer, which is the number of records to write each interval.

  • interval (Optional) A golang duration. Which specifies the time between writing records. If omitted then the runner is executed once.

Example:

---
runners:
  - generator:
      type: "cisco:asa"
      include_timestamp: false
    output:
      type: file
      directory: "/var/tmp"
      pattern: "spigot_asa_*.log"
      delimiter: "\n"
    interval: 5s
    records: 250
  - generator:
      type: "fortinet:firewall"
      include_timestamp: false
    output:
      type: file
      directory: "/var/tmp"
      pattern: "spigot_fortinet_firewall_*.log"
      delimiter: "\n"
    interval: 10s
    records: 2048

Directories

Path Synopsis
cmd
pkg
generator
Package generator provides basic interface to log generators.
Package generator provides basic interface to log generators.
generator/aws/firewall
Package firewall generates AWS Network Firewall log messages.
Package firewall generates AWS Network Firewall log messages.
generator/aws/vpcflow
Package vpcflow generates version 2 AWS vpcflow log messages
Package vpcflow generates version 2 AWS vpcflow log messages
generator/cef
Package cef implements the generator for generic CEF logs.
Package cef implements the generator for generic CEF logs.
generator/cisco/asa
Package asa implements the generator for Cisco ASA logs.
Package asa implements the generator for Cisco ASA logs.
generator/citrix/cef
Package cef implements the generator for Citrix CEF logs.
Package cef implements the generator for Citrix CEF logs.
generator/clf
Package clf generates Common Log Format (clf) log messages.
Package clf generates Common Log Format (clf) log messages.
generator/fortinet/firewall
Package firewall generates Fortinet Firewall log messages
Package firewall generates Fortinet Firewall log messages
generator/winlog
Package winlog generates Windows Event Log XML records.
Package winlog generates Windows Event Log XML records.
include
Package include exists to import generators and outputs so the init function is run.
Package include exists to import generators and outputs so the init function is run.
output
Package output provides basic interface for log output.
Package output provides basic interface for log output.
output/file
Package file implements the output of logs to a file.
Package file implements the output of logs to a file.
output/rally
Package rally outputs logs to ndjson suitable for use by https://github.com/elastic/rally
Package rally outputs logs to ndjson suitable for use by https://github.com/elastic/rally
output/s3
Package s3 implements the output of logs to an AWS s3 bucket
Package s3 implements the output of logs to an AWS s3 bucket
output/simulate
Package simulate outputs logs to json suitable for use as a https://github.com/elastic/elastic-package test pipeline input events file.
Package simulate outputs logs to json suitable for use as a https://github.com/elastic/elastic-package test pipeline input events file.
random
Package random provides functions for generating random objects using math/rand
Package random provides functions for generating random objects using math/rand
runner
Package runner provides the glue to link a generator to an output and to execute.
Package runner provides the glue to link a generator to an output and to execute.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL