User Tools

Site Tools


development:applications:mib_manager

This is an old revision of the document!


Mib Manager

Author: Shane Ryan

Introduction

Mib Manager is a tool for uploading and comparing MIB files against a source of truth on the various customer environments. The app is designed to work with Bitbucket. The MIBS are stored in a Bitbucket repository and this bitbucket repo is the source of truth.

This app could be expanded to deal with trap rules, config files if desired


Ansible Playbook

ansible-playbook -i ../env-configuration/<env>/hosts.ini –diff –ask-vault-pass mib-manager.yml –extra-vars “jenkins_build_name='mib-manager-feature-branches/job/master' jenkins_job_build_num=xx actions='upload,deploy,configure,stop,start'”


SSH Configuration

This app authenticates the SSH communication to errigals remote hosts with the errigal PEM file. Your machines public SSH key will need to have an entry in the remote hosts ssh configuration file to allow the app to access the remote hosts via SSH.

Menu is accessed by clicking the hamburger icon on the top left. Menu Options are as seen in screenshot above:

  1. Browse and Compare Files
  2. Upload to MIB Repo
  3. Browse Environments
  4. Upload to Environments
  5. Audit App Usage

Browse and Compare Files

Select MIBs in the Browse MIB Repository panel on the left.
Click See File to view MIB File in a new Tab.
Click Download file to download the file to your machine.
Click Compare to move this MIB to the panel on the right, to set it up for comparison with MIBS on remote hosts.

Select an environment to run a comparison check for the mibs that are present in the Compare MIBS panel and click compare.

Click the red delete icon on the MIB cards on the Compare MIBS panel to remove them from the compare list.

Above is the compare results, a green tick means the files share the same md5 sum. A red cross will appear if the md5 sum is not the same, or if the file doesn't exist on the host.


Upload to MIB Repo

Click “Select local file” to open local file browser and select local file.
Choose a vendor and technology to assign the new MIB to. Insert a version number as the letter v followed by the version number (Check if other versions of this file are in the repo, and number accordingly).
Clicking “Upload to Repo” will upload the file to the Bitbucket Repository.

Repo-DB Sync

This panel will show you a comparison of the number of MIB files recorded in the database and the number of MIB files present in the repository. When these numbers do not match, you will have an option to sync the database to the repository or vice versa. This allows bulk addition of MIB files to the application system via a normal commit.


Browse Environments

Here you can select an environment and see what MIB files from the repository are present on the remote server. You can select environment in the drop down, and run additional requests, and they will appear beside the current results in a new tab.


Upload to Environments

Select MIBs in the left panel, and click add to basket to add them to the MIB Basket for Upload on the right panel. Remove MIBS from the basket by clicking the red icon in the MIB Card.
Select an environment and click Upload to upload the MIB to every host in an environment that is listed under snmp-manager:children in the env-configuration for that env.
Before the upload begins, there is a file check which checks if any files exist with these file names on the server already. As a file name with the same name will be over-written in this upload process, it compares the MD5 of the files being over-written with the MD5 of all files in the repo - if the file being overwritten doesn't exist in the repository, it will give you an error and not allow you to upload. This is a safety measure to avoid losing a version of a MIB that we do not have tracked.

The upload result window will confirm if the upload was successful. The upload process also must add an entry for this new MIB file into the SNMP manager database. This window will confirm if that step was successful also.


Audit App Usage

The Audit App Usage screen shows the app activity, where a user can see which user has uploaded which files to environments and to the repository.

development/applications/mib_manager.1670239257.txt.gz · Last modified: 2022/12/05 11:20 by 10.91.110.100