SNMP collector through an asyncio loop
Project description
Collecting data from SNMP Agents using python-asyncio method.
Setup using docker
Up and build docker container:
docker-compose up --build -d
Setup Without docker:
Install requirements:
pip install -r requirements.txt
Configure the desire OID(s) and metrics:
nano snmp_collector/config/cofig.json
Run:
python snmp_collector
Setup through pip
pip install snmp-manager
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,
"gain": 1,
"offset": 0,
"community": "public",
"metrics": [
{
"isEnable": true,
"tag_name": "a-sample",
"oid": "1.3.6.13.4.1.3.1112"
}
],
"meta_data": [{'key': 'value'}]
}
]
Run:
python 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
snmp_manager-1.1.1.tar.gz
(8.9 kB
view hashes)
Built Distribution
Close
Hashes for snmp_manager-1.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fb6406f5f3f48f999c8c2bc7f3f0947ae4f4075f6197ccd3acef2f5f3b49925 |
|
MD5 | 52d0c3f6292147c2e704fa9eeef19b44 |
|
BLAKE2b-256 | 818ffbed70e0d5ac8371a24c9ce12ccbf25c46b970fa228327dacd3c38666592 |