This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Cactidbadapter is a utility tool of python for network operators and Cacti users. Network operators and administrators sometimes needs to get registered data from Cacti database. This module can get easily devices and fetched snmp polling value.

Requirements

  • Python2.7, 3.4, PyPy.

Installation

Get from PyPI

$ pip install cactidbadapter

Get from Github

$ git clone https://github.com/mtoshi/cactidbadapter
$ cd cactidbadapter
$ python setup.py install

Using example

Example for get_host().

>>> from cactidbadapter import CactiDBAdapter
>>> cacti = CactiDBAdapter(database='cacti',
...                        user='admin',
...                        password='*****',
...                        port=3306)
>>> cacti.get_host()
[{'hostname': '127.0.0.1', 'id': 1, 'description': 'Localhost'}]

Example for get_host() hostname and description columns.

>>> cacti.get_host(columns=('hostname', 'description',))
[{'hostname': '127.0.0.1', 'description': 'Localhost'}]

Example for get_host() all columns.

>>> cacti.get_host(columns=('*',))
[{'hostname': '127.0.0.1', 'id': 1, 'description': 'Localhost', 'snmp_version': 2, 'snmp_timeout': 500, ... }]

Example for get_host() all columns and limit 1.

>>> cacti.get_host(columns=('*',), limit=1)
[{'hostname': '127.0.0.1', 'id': 1, 'description': 'Localhost', 'snmp_version': 2, 'snmp_timeout': 500, ... }]

Example for show host table columns.

>>> cacti.host_columns()
['availability', 'availability_method', 'avg_time', 'cur_time', 'description', ... ]

Other sample is here.

https://github.com/mtoshi/cactidbadapter/blob/master/samples/sample.py

SNMP system values

Cacti doesn’t have system informations with default. If you need system values (sysDescr, sysNaem, sysUpTime …), then you install “system.xml”.

  1. For Debian/Ubuntu

    sudo cp utils/cacti/system.xml /usr/share/cacti/resource/snmp_queries/
    
  2. Add Data Queries

    Name: SNMP - Get System Information
    Description: SNMP System Information
    XML Path: <path_cacti>/resource/snmp_queries/system.xml
    Data Input Method: Get SNMP Data (Indexed)
    
  3. Add Host Templates

    "Left menu" > "Host Templates" > YOUR_TEMPLATE_NAME > "Associated Data Queries" > Add
    
    "Add Data Query": "SNMP - Get System Information" # Select and Add.
    
Release History

Release History

0.1.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
cactidbadapter-0.1.2.tar.gz (5.5 kB) Copy SHA256 Checksum SHA256 Source May 30, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting