Skip to main content

SNMP collector through an asyncio loop

Project description

Setup using docker

Up and build docker container:

docker-compose up --build -d

Without docker:

Install requirements:

pip install -r requirements.txt

Run by downloading or cloning the repository:

python __main__.py

Config your desire OID(s) and metrics:

nano config/cofig.json

Setup through pip

pip install simple-snmp-collector pyserial easydict pysnmp==4.4.9 async-timeout uvloop

Configuration

Create a json config file with the following format:

[
  {
    "isEnable": true,
    "name": "snmp-model-1",
    "address": "192.168.1.120",
    "port": 161,
    "timeout": 1,
    "retries": 3,
    "version": 2,
    "sleep_time": 5,
    "community": "public",
    "metrics": [
      {
        "isEnable": true,
        "tag_name": "a-sample",
        "oid": "1.3.6.13.4.1.3.1112"
      }
    ],
    "meta_data": [{'key': 'value'}]
  }
]

Run

python -m snmp_collector --config=<path-to-your-config-file.json>

[NOTE]:

  • If you are a Windows user and you don’t want to use docker, comment out the uvloop package form requirements.txt

  • The value of -8555 means a problem is occurred during reading data over SNMP or in connection.

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

simple_snmp_collector-1.0.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

simple_snmp_collector-1.0.0-py2.py3-none-any.whl (10.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file simple_snmp_collector-1.0.0.tar.gz.

File metadata

  • Download URL: simple_snmp_collector-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9

File hashes

Hashes for simple_snmp_collector-1.0.0.tar.gz
Algorithm Hash digest
SHA256 215accd50093a23580662959e555f5d03199a43ed734f4e98d2bcaf23ff27462
MD5 a06e9b727f83b28e973b2ada29e1d244
BLAKE2b-256 368c6e55037bbb5b9ffd3f2fc656a915964b06e335542ca62ed340265c88bdf7

See more details on using hashes here.

File details

Details for the file simple_snmp_collector-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: simple_snmp_collector-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9

File hashes

Hashes for simple_snmp_collector-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5af8f5d15978992580abbda875537d0331282f7ecdd4edb32b4db5dcf6981fd6
MD5 31b87c3ceff17161700a0b181c605c30
BLAKE2b-256 7f363ec6ecde7a9d983cd2145bf392ed1a4bc51068958821243f0edcf759b2a0

See more details on using hashes here.

Supported by

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