Skip to main content

pySigma openobserve backend

Project description

pySigma OpenObserve Backend

Tests Coverage Badge Status PyPI Downloads OpenSSF Scorecard

This is the OpenObserve backend for pySigma. It provides the package sigma.backends.openobserve with the openobserveBackend class.

It supports the following output formats:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysigma_backend_openobserve-0.1.0.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysigma_backend_openobserve-0.1.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file pysigma_backend_openobserve-0.1.0.tar.gz.

File metadata

File hashes

Hashes for pysigma_backend_openobserve-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dad2954db7cdd774b326f4027991417e4638d25bc0a40d2631b3bf57398ea423
MD5 044c8dbdbd69db379e855ce3cf4d1866
BLAKE2b-256 8f5bd1ee32b911350c9271b804ac67a01b71bd4043a1075c28b455405b83b49d

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pysigma_backend_openobserve-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pysigma_backend_openobserve-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c715bf6e5ef3b2b1c8375b5bb6cdd28368f60bf1ee54cf16e16802825c93f987
MD5 fc9f2e1f533ed82800c060be88a4708c
BLAKE2b-256 439d5f08d0114404c062c629c4062924fba5468d9a3986dc73c426f1ade545b3

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page