Skip to main content

SNMP sysDescr parser.

Project description

Sysdescparser is a utility tool for network operators. This module parses SNMP sysDescr(OID: 1.3.6.1.2.1.1.1).

Recent IP equipments are implemented useful API. However connection method is different with each vendor. In case of multi-vendor environment, we have to check each target node’s information such as vendor name and os name. I think checking of SNMP sysDescr is a very efficient as a unified method for pre-filter. This module parses sysDescr value with vendor name, model name, os name and os version as far as possible. However, the sysDescr is free format. It does not guarantee that these information always exists. Unknown value, assigns the UNKNOWN. If you have any need to handle the equipment that this module does not support, then please send the sysDescr value to this package author. Or, please contact using function of the such as github pull request.

https://secure.travis-ci.org/mtoshi/sysdescrparser.svg?branch=master https://coveralls.io/repos/mtoshi/sysdescrparser/badge.svg?branch=master Latest Version

Requirements

  • Python2.7, 3.5, 3.6, 3.7, PyPy.

Instration

  • PyPI or Github.

    $ pip install sysdescrpaser
    
    or
    
    $ git clone https://github.com/mtoshi/sysdescrparser
    $ cd sysdescrparser
    $ sudo python setup.py install

Using example

  • Example for Juniper Junos sysDescr

    >>> from sysdescrparser import sysdescrparser
    >>> sysdescr = sysdescrparser('Juniper Networks, Inc. ex2200-48t-4g internet router, kernel JUNOS 10.2R1.8 #0: 2010-05-27 20:13:49 UTC')
    >>> sysdescr.vendor
    'JUNIPER'
    >>> sysdescr.model
    'ex2200-48t-4g'
    >>> sysdescr.os
    'JUNOS'
    >>> sysdescr.version
    '10.2R1.8'
  • Example for Cisco CiscoIOS sysDescr

    >>> sysdescr = sysdescrparser('Cisco IOS Software, c7600s72033_rp Software (c7600s72033_rp-ADVIPSERVICESK9-M), Version 12.2(33)SRC5, RELEASE SOFTWARE (fc2)')
    >>> sysdescr.vendor
    'CISCO'
    >>> sysdescr.model
    'c7600s72033_rp-ADVIPSERVICESK9-M'
    >>> sysdescr.os
    'IOS'
    >>> sysdescr.version
    '12.2(33)SRC5'
  • Example for Brocade VDX sysDescr

    >>> sysdescr = sysdescrparser('Brocade VDX Switch.')
    >>> sysdescr.vendor
    'BROCADE'
    >>> sysdescr.model
    'VDX'
    >>> sysdescr.os
    'NOS'
    >>> sysdescr.version
    'UNKNOWN'

Parsing logic and Support Vendor and OS

  • About parsing logic and support of vendor and os.

    Of course you are able to see this python code and also see how it works easily from sample data. https://github.com/mtoshi/sysdescrparser/blob/master/samples/sample_data.json It will be able to understand almost. (Sometimes, using hard code. And also using UNKNOWN values.) This sample data is also used directly by code test.

  • About uncovered vendor and os.

    If you have any need to handle the equipment that this module does not support, then please send the sysDescr value to this package author. Or, please contact using function of the such as github pull request.

  • If you already enabled SNMP daemon, then you can get sysDescr value with below.

    % snmpwalk -Os -v 2c -c your_community_string localhost 1.3.6.1.2.1.1.1
    sysDescr.0 = STRING: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    
    % snmpget -Os -v 2c -c your_community_string localhost 1.3.6.1.2.1.1.1.0
    sysDescr.0 = STRING: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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

snmpsysdescrparser-0.1.19.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snmpsysdescrparser-0.1.19-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file snmpsysdescrparser-0.1.19.tar.gz.

File metadata

  • Download URL: snmpsysdescrparser-0.1.19.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

File hashes

Hashes for snmpsysdescrparser-0.1.19.tar.gz
Algorithm Hash digest
SHA256 8f1f3f86f02b70903e8d858230bab4ae288335d3296a9147334735786945066f
MD5 07ad40fc96d5b8c2c97f894dae6712c2
BLAKE2b-256 5a82dbae6c5cae94a25a1d2ea48d4783c2b9b716ac408569fbf4a8d41167ca14

See more details on using hashes here.

File details

Details for the file snmpsysdescrparser-0.1.19-py3-none-any.whl.

File metadata

  • Download URL: snmpsysdescrparser-0.1.19-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3

File hashes

Hashes for snmpsysdescrparser-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 247eab1c82184044cf64367423c10a1177e8f4918cac0277184a3c1c376afa03
MD5 d182d7fab258866a693b2da42b875fa2
BLAKE2b-256 1c4d63d8e3e4ebe9d9587744b0b36a1007c0aeeeea94a1c952afcc033bd9b01c

See more details on using hashes here.

Supported by

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