TCP to Canopsis connector
This package provides a connector which listen for events on a TCP port.
Usage
Run the script on a designated port (8000 in this example) and with the URL of the AMQP server :
$ tcp2canopsis -p 8000 -a "amqp://guest:guest@localhost:5672/" -t token
Then use telnet to publish events :
$ telnet localhost 8000
Trying ::1...
Connected to localhost.
Escape character is '^]'.
token
{"connector": "test", "connector_name": "testname", "event_type": "check", "source_type": "resource", "component": "testcmp", "resource": "testrsrc", "state": 0, "output": "test output"}
{"connector": "test", "connector_name": "testname", "event_type": "check", "source_type": "resource", "component": "testcmp", "resource": "testrsrc", "state": 1, "output": "test output 2"}
{"connector": "test", "connector_name": "testname", "event_type": "check", "source_type": "resource", "component": "testcmp", "resource": "testrsrc", "state": 0, "output": "test output 3"}
Connection closed by foreign host.
Or in a JSON file :
{"tcp2canopsis": {
"port": 8000,
"amqp": "amqp://guest:guest@localhost:5672/",
"token": "token"
}}
And load the file using :
$ tcp2canopsis -c path/to/config.json
Installation
Just type :
$ pip install tcp2canopsis
Or, to install it in a locally :
$ ./makefile
This will create a virtual Python environment in the current folder, and install the dependencies listed by requirements.txt. Finally, it will perform a python setup.py install.
After executing this script, the connector will be available in the current folder (which is now a virtual Python environment).
Metadata
Release files for tcp2canopsis 0.3
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 | Actions |
|---|---|---|---|---|
| tcp2canopsis-0.3.tar.gz | 3.4 kB | Without provenance | Details for tcp2canopsis-0.3.tar.gz |
Release files / tcp2canopsis-0.3.tar.gz
| Download URL | tcp2canopsis-0.3.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60683c3d333146a026d16f175fe0b2fb93b98c34502a7041f3b8c93807612072
|
|
BLAKE2b-256 checksum How to use checksums |
cfd54bd89b558f3136b394ab8c9bc0d457c6119d3329f5cb54fa955df5ede004
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for tcp2canopsis 0.3
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.