pySigma openobserve backend
Project description
pySigma OpenObserve Backend
This is the OpenObserve backend for pySigma. It provides the package sigma.backends.openobserve with the openobserveBackend class.
It supports the following output formats:
- default: plain SQL for OpenObserve / Apache Datafusion
- alerts: OpenObserve Alerts json
This backend is currently maintained by:
Known issues/limitations
- Be aware that OpenObserve
- has currently (2025) no field name normalization and as such, tables, field names, and pipelines are environment dependent. Included pipeline are based on ingestion with opentelemetry-collector-contrib (default, journald, zeek, kunai).
- flatten json by default.
- Full Text Search to implement (match_all).
- Support cidr filter.
- Validate SQL with
sqlglot.transpile(sql)
Quick Start
Example script (default output) with sysmon pipeline
Add pipelines
poetry add pysigma-pipeline-sysmon
poetry add pysigma-pipeline-windows
Convert a rule
sigma convert -t openobserve -p /path/to/sigma/pipelines/openobserve/kunai.yml /path/to/sigma/rules/linux/process_creation/proc_creation_lnx_doas_execution.yml
from sigma.collection import SigmaCollection
from sigma.backends.openobserve import openobserve
from sigma.pipelines.sysmon import sysmon_pipeline
from sigma.pipelines.windows import windows_logsource_pipeline
from sigma.processing.resolver import ProcessingPipelineResolver
# Create the pipeline resolver
piperesolver = ProcessingPipelineResolver()
# Add pipelines
piperesolver.add_pipeline_class(sysmon_pipeline()) # Syssmon
piperesolver.add_pipeline_class(windows_logsource_pipeline()) # Windows
# Create a combined pipeline
combined_pipeline = piperesolver.resolve(piperesolver.pipelines)
# Instantiate backend using the combined pipeline
openobserve_backend = openobserve.openobserveBackend(combined_pipeline)
rule = SigmaCollection.from_yaml(
r"""
title: Test
status: test
logsource:
category: test_category
product: test_product
detection:
sel:
fieldA: valueA
fieldB: valueB
condition: sel
""")
print(openobserve_backend.convert(rule)[0])
Running
poetry run python3 example.py
Thanks
- SigmaHQ and its contributors.
- wagga for the sqlite backend from which this one is adapted.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pysigma_backend_openobserve-0.1.0.tar.gz.
File metadata
- Download URL: pysigma_backend_openobserve-0.1.0.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dad2954db7cdd774b326f4027991417e4638d25bc0a40d2631b3bf57398ea423
|
|
| MD5 |
044c8dbdbd69db379e855ce3cf4d1866
|
|
| BLAKE2b-256 |
8f5bd1ee32b911350c9271b804ac67a01b71bd4043a1075c28b455405b83b49d
|
Provenance
The following attestation bundles were made for pysigma_backend_openobserve-0.1.0.tar.gz:
Publisher:
python-publish-pypi.yml on juju4/pySigma-backend-openobserve
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysigma_backend_openobserve-0.1.0.tar.gz -
Subject digest:
dad2954db7cdd774b326f4027991417e4638d25bc0a40d2631b3bf57398ea423 - Sigstore transparency entry: 273166900
- Sigstore integration time:
-
Permalink:
juju4/pySigma-backend-openobserve@902604c13305d2d10b45dca88d01f698624c4781 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/juju4
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish-pypi.yml@902604c13305d2d10b45dca88d01f698624c4781 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pysigma_backend_openobserve-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pysigma_backend_openobserve-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c715bf6e5ef3b2b1c8375b5bb6cdd28368f60bf1ee54cf16e16802825c93f987
|
|
| MD5 |
fc9f2e1f533ed82800c060be88a4708c
|
|
| BLAKE2b-256 |
439d5f08d0114404c062c629c4062924fba5468d9a3986dc73c426f1ade545b3
|
Provenance
The following attestation bundles were made for pysigma_backend_openobserve-0.1.0-py3-none-any.whl:
Publisher:
python-publish-pypi.yml on juju4/pySigma-backend-openobserve
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysigma_backend_openobserve-0.1.0-py3-none-any.whl -
Subject digest:
c715bf6e5ef3b2b1c8375b5bb6cdd28368f60bf1ee54cf16e16802825c93f987 - Sigstore transparency entry: 273166903
- Sigstore integration time:
-
Permalink:
juju4/pySigma-backend-openobserve@902604c13305d2d10b45dca88d01f698624c4781 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/juju4
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish-pypi.yml@902604c13305d2d10b45dca88d01f698624c4781 -
Trigger Event:
push
-
Statement type: