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

Add a Graylog package #31

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
10 changes: 10 additions & 0 deletions graylog/package.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions graylog/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
id: graylog
name: Graylog
author: Tenzir
author_icon: https://raw.githubusercontent.com/tenzir/library/main/author.svg
lava marked this conversation as resolved.
Show resolved Hide resolved
package_icon: |
https://raw.githubusercontent.com/tenzir/library/main/graylog/package.svg
description: |
[Graylog](https://graylog.org/) is an open-core log management platform
with a focus on security operations.

This package supports onboarding Graylog data from local files or from the
network.

inputs:
listen-address:
name: Graylog listen address
description: |
The network interface and port on which Graylog data arrives over
the network.
type: string
default: 0.0.0.0:9000

pipelines:
import-graylog:
name: Import Graylog data
description: |
Reads Graylog events from the topic `graylog` and imports the data
into the node.
definition: |
// tql2
subscribe "graylog"
import

onboard-from-network:
name: Read Graylog from Network
description: |
Reads graylog data from the network and publishes them
on the topic `graylog`.

Note that this pipeline does not support incoming TLS connections,
so for production instances of graylog an external reverse proxy
is recommended.
definition: |
// tql2
load_tcp "{{ inputs.listen-address }}" {
read_gelf
}
@name = "graylog"
publish "graylog"

examples:
- name: Display Graylog Ingest
description: |
View all Graylog data that arrived in the last day.
definition: |
// tql2
let $ts = now() - 1d
metrics "operator"
where timestamp > $ts and source
legacy "where pipeline_id == \"graylog/onboard-from-file\" or pipeline_id == \"graylog/onboard-from-network\""
legacy "summarize bytes=sum(output.approx_bytes), duration=sum(duration) by timestamp, pipeline_id resolution 15min"
this = {
timestamp: timestamp,
data: bytes / duration.as_secs(),
}
legacy "summarize data=sum(data) by timestamp"
legacy "sort timestamp"
@name = "Graylog Ingress (1d, bytes/s)"
legacy "chart area"