Skip to content

justinhachemeister/Emitterly

Repository files navigation

Emitterly Logo

Package quality NPM Version Build Status Coverage Status Licensing Commit Activity Last Commit Repo size Downloads per week Node version Top language of repo Help us and star this project

Getting Started

Start by installing Emitterly globally
npm install emitterly --global
Emitterly works with YAML files to load your prefered settings, start by creating a settings file
events:
  # This is a event name
  # It has a file that it watches and grok patterns that
  # Will match the last line that has been observed
  newlineevent:
    # The file to watch
    file: './test.txt'

    # There can be multiple filters
    filters:
      # this filter called filter1 will match: [12:08:44] 192.168.2.1 (INFO) - User logged in
      filter1: '\[%{TIME:time}\] %{IP:ip} \(%{WORD:type}\) - %{GREEDYDATA:message}'

    # There can be multiple actions
    actions:
      # A webhook action only needs a url to post to, it will post in JSON format
      webhook: 'https://webhook.site/04ed7a87-f9e5-472d-8f66-fc50f83b0a67'

    # The condition for the actions to be triggered in this event, you can use variables from the event class itself
    # For example: '"%match.ip%" == "192.168.2.1"'
    condition: '1 === 1'

    # The payload to send with the actions
    payload:
      data: '%match.ip% %event% %condition% customstring'
Start Emitterly to listen
emitterly --config "/path/to/your/settings.yml"

That's it your all done! Emitterly will listen for file changes and trigger your actions

Filters

Emitterly uses grok filters to extract key value pairs from a line event

About

⚡ Create triggers from file streams

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published