Skip to content

This is a university project for monitoring SNMP data and visualizing it using Prometheus and Grafana.

License

Notifications You must be signed in to change notification settings

emacs45/vpn-snmp-monitoring

Repository files navigation

VPN SNMP Monitoring

This project monitors SNMP data and stores it in an SQLite database. The collected data is served via a Flask app and can be visualized using Prometheus and Grafana.

CI CD

Setup Guide

Prerequisites

  • Docker
  • Docker Compose
  • GitHub Personal Access Token (PAT) with the necessary permissions (write:packages, read:packages, repo)

Project Structure

vpn-snmp-monitoring/
├── .github/
│   ├── workflows/
│   │   ├── ci.yml
│   │   └── cd.yml
├── scripts/
│   ├── snmp_query.py
├── webapp/
│   ├── Dockerfile
│   └── ...
├── docker-compose.yml
└── README.md

Configuration

GitHub Secrets

Add the following secrets to your GitHub repository:

GHCR_PAT : Your Personal Access Token for the GitHub Container Registry.

Docker Compose

Ensure your docker-compose.yml is properly configured to include services for your Flask app, Prometheus, Node Exporter, and Grafana.

GitHub Actions Workflows

I have set up two GitHub Actions workflows:

CI Workflow (.github/workflows/ci.yml)
  • Checks out the code.
  • Sets up Python.
  • Installs dependencies.
  • Runs linting and tests using flake8 and pytest.
CD Workflow (.github/workflows/cd.yml)
  • Checks out the code.
  • Sets up Docker Buildx.
  • Logs in to GitHub Container Registry.
  • Builds and pushes the Docker image to the registry.
  • Deploys the services using Docker Compose.

Running the Application

  1. Clone the Repository:
git clone https://github.com/emacs45/vpn-snmp-monitoring.git
cd vpn-snmp-monitoring
  1. Set Up Docker Compose:

Ensure that your docker-compose.yml is configured correctly.

Run the Application:

docker-compose up -d
  1. Available services:

  2. Additional Information

For further details, refer to the individual files in the repository.

Contributing

We welcome contributions to this project! If you are interested in contributing, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.

For further details, refer to the individual files in the repository.

About

This is a university project for monitoring SNMP data and visualizing it using Prometheus and Grafana.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published