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
nodeIdfield is included, the event will be matched to the node with that database ID. - If the event does not have
nodeID, the parameters_foreignSourceand_foreignIdcan 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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| onms_kafka_events-1.0.0-4.tar.gz | 10.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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.