Skip to content

nezith/infoset

 
 

Repository files navigation

infoset

infoset is Python 3 inventory system that reports and tabulates the status of network connected devices. The information reported includes:

  1. Open Systems Interconnection model (OSI model) data such as:
  2. Layer 1 information (Network port names, speed, state, neighbors)
  3. Layer 2 information (VLANs, 802.1q trunk links)
  4. Layer 3 information (ARP information)
  5. System status

Table of Conents

[TOC]

Features

infoset has the following features:

  1. Open source.
  2. Written in python, a modern language.
  3. Easy configuration.
  4. Threaded polling of devices for data. Fast.
  5. Support for Cisco and Juniper gear. More expected to added with time.
  6. Support for SNMPv2 and/or SNMPv3 for all configured network devices.
  7. infoset has a number of fault tolerant features aimed at making it resilient in unstable computing environemnts.
  8. Agents collecting data can tolerate the loss of communication with the central server by caching data locally until the server returns online.
  9. The infoset server can tolerate the loss of communication with its database by caching the data locally until the database returns online.
  10. The infoset configuration is entirely stored in files. This allows it to collect data in the absense of a database, such as during maintenance or an outage.
  11. Backups are simple. Just dave the entire contents of the infoset directory tree including hidden files, and save a copy of the database for your performance data.

We are always looking for more contributors!

Inspiration

The project took inspiration from switchmap whose creator, Pete Siemsen, has been providing guidance.

Oversight

infoset is a student collaboration between:

  1. The University of the West Indies Computing Society. (Kingston, Jamaica)
  2. The University of Techology, IEEE Student Branch. (Kingston, Jamaica)
  3. The Palisadoes Foundation http://www.palisadoes.org

And many others.

Dependencies

The only dependencies that must be manually installed for this project are pip, python3.

Ubuntu / Debian / Mint

The commands are:

# sudo apt-get install python3 python3-pip python3-dev python3-yaml
# pip3 install --user sqlalchemy

Fedora

The commands are:

# sudo dnf install python3 python3-pip python3-dev python3-yaml
# pip3 install --user sqlalchemy

Installation

Installation is simple. The first thing to do is verify that your system is running python 3.5 or higher. If not, you will need to upgrade. Use this command to check:

$ python3 --version

Next create the MySQL or MariaDB database.

$ mysql -u root -p
password:
mysql> create database infoset;
mysql> grant all privileges on infoset.* to infoset@"localhost" identified by 'PASSWORD';
mysql> flush privileges;
mysql> exit;

Now clone the repository and copy the sample configuration file to its final location.

$ git clone https://github.com/UWICompSociety/infoset
$ cd infoset
$ export PYTHONPATH=`pwd`
$ cp examples/etc/* etc/

Edit the database credential information in the server section of the etc/config.yaml file. Update the configured database password.

$ vim etc/config.yaml

Create the directories that infoset will use for its working files.

$ sudo mkdir -p /opt/infoset
$ sudo chown -R $USER /opt/infoset
$ mkdir -p /opt/infoset/log
$ mkdir -p /opt/infoset/cache/data
$ mkdir -p /opt/infoset/cache/ingest
$ mkdir -p /opt/infoset/cache/agents

Run the install scripts.

$ pip3 install --user sqlalchemy
$ python3 setup.py install
$ source ~/.bashrc
$ sudo make
$ source venv/bin/activate
$ sudo make install

Configuration and Usage

There are a number of required steps to configure infoset.

  1. Place a valid configuration file in the etc/ directory
  2. Run the bin/agentsd.py --start script to start data collection
  3. Run the ./server.py script to view the web pages

These will be convered in detail next:

Configuration Samples

The examples/ directory includes a number of sample files. These will now be explained.

infoset Configuration Samples

The examples/etc directory includes a sample file that can be edited. The README.md file there explains the parameters.

You must place your configuration file in the etc/ directory as your permanent configuration file location.

Logrotate Configuration

The examples/linux/logrotate/infoset file is a working logrotate configuration to rotate the log files that infoset generates. These can be extensive and adding the file to your system is highly recommended.

sudo cp examples/linux/logrotate/infoset /etc/logrotate.d

Apache Configuration Samples (optional)

The examples/linux/apache directory includes sample files to create a:

  1. Dedicated infoset site (sites-available.example.org.conf) running on port 80
  2. URI of an existing site (conf-available.example.conf) running on port 80

Starting Data Collection

NOTE! You must have a valid configuration file placed in the etc directory before activating data collection.

The bin/agentsd.py script starts all the configured data collection agents automatically. It will only attempt to start and monitor the agents that are enabled in the configuration file.

The script can be started like this:

$ bin/agentsd.py --start

NOTE! Make sure this script runs at boot by placing the agentsd.py command in your /etc/rc.local file.

Viewing Data Web Pages

Infoset also includes a web interface. To start the server run python3 server.py then navigate to http://localhost:5000

Next Steps

There are many dragons to slay and kingdoms to conquer!

Contribute

Here are a few things to know.

  1. Contributions are always welcome. Contact our team for more.
  2. View our contributor guidelines here: https://github.com/UWICompSociety/infoset/blob/master/CONTRIBUTING.md
  3. View our guidelines for committing code here: https://github.com/UWICompSociety/infoset/blob/master/COMMITTERS.md

Mailing list

Our current mailing list is: https://groups.google.com/forum/#!forum/gdg-jamaica

New Features

Visit our GitHub issues for a full list of features and bug fixes. https://github.com/UWICompSociety/infoset/issues

Design Overview

Visit our wiki's infoset document for the rationale of the design. http://wiki.palisadoes.org/index.php/Infoset

Sample Output

Visit http://calico.palisadoes.org/infoset to view infoset's latest stable web output.

About

Automating Network Device Inventory in Python 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 91.0%
  • HTML 6.3%
  • JavaScript 1.8%
  • Other 0.9%