Skip to main content

package version python version

onms_kafka_events

This library will allow you to generate event objects in Python to send to a Kafka topic for OpenNMS Horizon/Meridian to process.

Documentation for this project is available at https://opennms-forge.github.io/kafka-consumer-py/

Documentation for configuring the Kafka Consumer feature on your Horizon/Meridian server can be found at https://docs.opennms.com/horizon/latest/operation/deep-dive/events/sources/kafka.html.

Installation

pip install onms-kafka-events

Associating events to nodes

When received, the eventd daemon will attempt to associate the event to a node in the following order:

  • If the nodeId field is included, the event will be matched to the node with that database ID.
  • If the event does not have nodeID, the parameters _foreignSource and _foreignId can be included to associate the event based on the requisition name and ID.
  • Any event that cannot match a node on either of these criteria will not be associated with a node.

Example

from onms_kafka_events import KafkaConnection, Severity

my_producer = KafkaConnection(
    servers=["broker01:9092", "broker02:9092"], topic="opennms-kafka-events"
)

my_event = my_producer.create_event(
    uei="uei.opennms.org/custom/event",
    severity=Severity.WARNING,
    node_id=1234,
    custom="value"
)

result = my_producer.send_event(my_event)

Metadata

Release files for onms-kafka-events 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onms-kafka-events 1.0.0
File Size Uploaded Provenance
onms_kafka_events-1.0.0-4.tar.gz 10.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for onms-kafka-events 1.0.0
File Interpreter ABI Platform
onms_kafka_events-1.0.0-4-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / onms_kafka_events-1.0.0-4.tar.gz

Download URL onms_kafka_events-1.0.0-4.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
730d822baed3863cc79d9921f9ef56faf648cc4ff5eecd8f63f76573613d4d12
BLAKE2b-256 checksum
How to use checksums
2fab73e9156bf49b72d9e88998b490941ca62e00f144cccfe1ca9b86e055285c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / onms_kafka_events-1.0.0-4-py3-none-any.whl

Download URL onms_kafka_events-1.0.0-4-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df3225e8427244cf9ade385dc90d4a64d6181a24b6977ca22f729a50c2533074
BLAKE2b-256 checksum
How to use checksums
8eb444cae18a8949527cfe3e3258feca2ba6a3912000a0eeb5051b0413bd032b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Security for onms-kafka-events 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page