Skip to content

Repository files navigation

Dashi_v2

An MVP attempt to create network device discovery and poller written in Python3 and using native or widely supported and known libraries. For the time being, only Cisco IOS(XE) is supported, although it was a personal choise so nothing is stopping you extending this functionality (please refer to Scrapli documentation for supported platforms: https://github.com/carlmontanari/scrapli - big thanks to: @carlmontanari).

Stack

  • Django (Backend)
  • Celery (Task queue)
  • Redis (Message broker)
  • HTMX (Dynamic loading and interactions)
  • ApexCharts (Charts)
  • Bootstrap5 (Styling)
  • BootstrapTable (Tables)
  • FontAwesome (Icons)
  • Cytoscape (Network Topology)

Deployment

It's an assumption that Docker or Docker Desktop is already installed (OrbStack is another great alternative).

Start the application:

docker-compose up

Following containers will be spun up:

  • Web (Dashi_v2 - Main application)
  • Database (PostgreSQL)
  • Celery
  • Celery Beat
  • Redis

Create Django user:

docker exec -it dashi_v2 /opt/venv/bin/python3 /opt/dashi_v2/manage.py createsuperuser
Username: your_username
Email address: your_email
Password: **************
Password (again): **************
Superuser created successfully.

🛠 Setting Up Periodic Tasks in Django Admin (Celery Beat)

Once the application is up and running, follow these steps to configure periodic tasks:

1. Access the Admin Panel


2. Create an Interval Schedule

  1. Scroll down to the "PERIODIC TASKS" section.
  2. Click on "Intervals".
  3. Click the "ADD INTERVAL" button in the top right corner.
  4. Fill in the following fields:
    • Number of Periods: Enter a number (e.g., 5) — this defines how often the task runs.
    • Interval Period: Choose a unit of time (e.g., Seconds, Minutes, Hours, Days, etc.).
  5. Click "SAVE".

3. Create a Periodic Task

  1. Scroll back down to the "PERIODIC TASKS" section.
  2. Click on "Periodic tasks".
  3. Click the "ADD PERIODIC TASK" button in the top right corner.
  4. Fill in the following fields:
    • Name: e.g., Poller
    • Task (registered): Select core.tasks.device_poll from the dropdown.
    • Interval Schedule: Choose the interval you created earlier.
  5. Click "SAVE".

Populating inventory

In order for poller to begin it's work, please make sure you've created credentials and assigned it to specific device, only then will poller work.


About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages