Skip to content

chichirou/netcounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

netcounter

License: Apache 2.0 Python Release Platform

A multi-vendor network device toolkit that collects port counters, backs up configurations, analyzes system logs, and generates audit-ready reports — all from a single GUI.

スクリーンショット 2026-05-20 175733

English | 日本語


English

Overview

netcounter is a desktop application for network engineers and operators. Connect to multi-vendor network devices via Telnet or SSH, automatically collect port counters, running configurations, and system logs, and generate professional reports in PDF, Excel, or HTML — all in a few clicks. Built-in diff detection alerts you whenever a device configuration changes, with desktop and email notifications.

Originally built for daily port-counter audits on Allied Telesis switches, it has grown into a general-purpose collector and reporter that supports thirteen vendor families.

Key Features

  • Multi-vendor support — 13 vendor parsers implemented (2 production-verified, 11 experimental)
  • Port counter collection — error rates, traffic statistics, link state, with cross-run delta detection
  • Configuration backup — automatic versioning (30 generations per device), unified-diff change detection
  • System log analysis — 6-category classification: CRITICAL / ERROR / WARNING / link down / link up / authentication failure
  • Multi-format reports — PDF (via reportlab), XLSX (via openpyxl), HTML trend analysis
  • Diff viewer — built-in side-by-side comparison of configs and logs, across devices or across time
  • Change notifications — Windows toast notifications and SMTP email alerts when configurations change
  • Scheduled execution — manual, daily, or weekly automated collection
  • Connection — Telnet and SSH both supported, with per-device source-IP selection
  • Robust output cleanup — handles ANSI escapes, paging prompts, backspace control, multiple encodings (UTF-8 / CP932 / EUC-JP / Latin-1)

Supported Vendors

Vendor Status Tested On Notes
Allied Telesis ✅ Production AlliedWare Plus 5.x Verified in field
FortiGate ✅ Production FortiOS 7.x Verified in field
FortiSwitch 🧪 Experimental Parser implemented, not yet field-tested
Cisco IOS 🧪 Experimental Parser implemented, not yet field-tested
Yamaha RTX 🧪 Experimental Parser implemented, not yet field-tested
Juniper 🧪 Experimental Parser implemented, not yet field-tested
Extreme Networks 🧪 Experimental Parser implemented, not yet field-tested
HP / Aruba 🧪 Experimental Parser implemented, not yet field-tested
NEC IX 🧪 Experimental Parser implemented, not yet field-tested
Fujitsu Si-R 🧪 Experimental Parser implemented, not yet field-tested
Palo Alto 🧪 Experimental Parser implemented, not yet field-tested
AlaxalA 🧪 Experimental Parser implemented, not yet field-tested
Panasonic 🧪 Experimental Parser implemented, not yet field-tested

Verification reports very welcome. If you successfully run netcounter against an experimental-status device, please open an issue with the model, firmware version, and a small sample of show output. We will update the table and credit you.

Requirements

  • Python: 3.8 or later
  • OS: Windows (primary target), Linux / macOS (best-effort support)
  • Optional dependencies:
    • openpyxl — Excel (XLSX) report output
    • reportlab — PDF report output
    • psutil — network interface enumeration

The application runs without optional dependencies — features that require them will simply be unavailable.

Installation

git clone https://github.com/chichirou/netcounter.git
cd netcounter
pip install openpyxl reportlab psutil
python net_counter.py

A pre-built Windows executable is also available on the Releases page.

Quick Start

  1. Launch the application: python net_counter.py
  2. Open the Device Manager and add one or more devices (host, vendor, credentials, optional group)
  3. Click Run to collect counters, configurations, and logs
  4. Reports are saved to reports/, configurations to configs/<group>/<device>/, logs to device_logs/
  5. Use the Diff Viewer to compare configurations or logs across devices or across time

Output Layout

netcounter/
├── configs/                    # running-config backups
│   └── <group>/
│       └── <device>/
│           ├── 2026-05-01_120000.txt
│           ├── 2026-05-08_120000.txt
│           └── ...
├── device_logs/
│   ├── log/                    # system logs (show log)
│   ├── info/                   # diagnostic info (show int brief etc.)
│   └── techlog/                # tech-support output
└── reports/
    ├── netcounter_2026-05-19.pdf
    ├── netcounter_2026-05-19.xlsx
    └── netcounter_2026-05-19.html

Contributing

Contributions are warmly welcomed, especially in these areas:

  1. Verification reports for experimental-status vendors (open an issue with model + sample output)
  2. Bug reports and fixes for production vendors
  3. Sample device outputs that we can use for regression testing
  4. Documentation improvements — translations, examples, troubleshooting tips
  5. Internationalization — UI strings are currently in Japanese, English translation in progress

Please feel free to open issues or pull requests at any time.

License

Apache License 2.0 — free for commercial and personal use, modification, and redistribution.

Author

Shinichiro Naito@chichirou

Network engineer working with multi-vendor enterprise and carrier networks. Built netcounter to eliminate the daily Excel-pasting tedium of port-counter audits.


日本語

概要

netcounter は、ネットワークエンジニア・運用担当者向けのデスクトップアプリケーションです。Telnet または SSH でマルチベンダー対応のネットワーク機器に接続し、ポートカウンター・running-config・システムログを自動取得して、PDF / Excel / HTML 形式のレポートを生成します。設定変更を自動検知し、デスクトップ通知とメールで知らせる機能も内蔵しています。

もともとは Allied Telesis スイッチの日次ポートカウンター点検作業を自動化する目的で開発され、現在は13ベンダーに対応する汎用ツールに成長しています。

主な機能

  • マルチベンダー対応 — 13ベンダーのパーサーを実装(2ベンダーが本番検証済、11ベンダーが実験的サポート)
  • ポートカウンター収集 — エラー率・トラフィック統計・リンク状態の取得、前回比 delta 表示
  • 設定ファイル自動バックアップ — 機器単位で30世代保持、unified-diff による変更検知
  • システムログ解析 — 6カテゴリ自動分類(CRITICAL / ERROR / WARNING / リンクダウン / リンクアップ / 認証失敗)
  • 多形式レポート — PDF(reportlab)、XLSX(openpyxl)、HTML トレンド分析
  • 差分ビューア — 設定・ログを機器間 / 時系列でサイドバイサイド表示
  • 変更通知 — 設定変更検知時に Windows トースト通知 + SMTP メール送信
  • スケジュール実行 — 手動 / 1日1回 / 週1回の自動取得
  • 接続方式 — Telnet / SSH 両対応、機器ごとに送信元IPを指定可能
  • 堅牢な出力クリーンアップ — ANSI エスケープ、ページングプロンプト、バックスペース制御、文字コード自動判定(UTF-8 / CP932 / EUC-JP / Latin-1)

対応ベンダー

ベンダー 状況 検証環境 備考
Allied Telesis ✅ 本番 AlliedWare Plus 5.x 現場検証済
FortiGate ✅ 本番 FortiOS 7.x 現場検証済
FortiSwitch 🧪 実験的 パーサー実装済、実機未検証
Cisco IOS 🧪 実験的 パーサー実装済、実機未検証
Yamaha RTX 🧪 実験的 パーサー実装済、実機未検証
Juniper 🧪 実験的 パーサー実装済、実機未検証
Extreme Networks 🧪 実験的 パーサー実装済、実機未検証
HP / Aruba 🧪 実験的 パーサー実装済、実機未検証
NEC IX 🧪 実験的 パーサー実装済、実機未検証
Fujitsu Si-R 🧪 実験的 パーサー実装済、実機未検証
Palo Alto 🧪 実験的 パーサー実装済、実機未検証
AlaxalA 🧪 実験的 パーサー実装済、実機未検証
Panasonic 🧪 実験的 パーサー実装済、実機未検証

実機検証レポートを大歓迎しています。 実験的サポートのベンダーで動作確認できた方は、機種・ファームウェアバージョン・show コマンドのサンプル出力を添えて Issue を立てていただけると、表を更新してクレジットさせていただきます。

必要環境

  • Python: 3.8 以上
  • OS: Windows(主要対象)、Linux / macOS は最善努力
  • 任意の依存ライブラリ:
    • openpyxl — Excel(XLSX)レポート出力
    • reportlab — PDF レポート出力
    • psutil — ネットワークインタフェース列挙

任意ライブラリ無しでも起動可能ですが、対応する出力機能が無効になります。

インストール

git clone https://github.com/chichirou/netcounter.git
cd netcounter
pip install openpyxl reportlab psutil
python net_counter.py

Windows 用の exe 版は Releases ページ から取得できます。

使い方(クイックスタート)

  1. アプリ起動:python net_counter.py
  2. デバイス管理画面で機器を追加(ホスト・ベンダー・認証情報・任意でグループ)
  3. 実行 ボタンでカウンター・設定・ログを一括取得
  4. レポートは reports/、設定は configs/<グループ>/<機器>/、ログは device_logs/ に保存
  5. 差分ビューア で機器間・時系列の比較が可能

コントリビューション

以下の貢献を特に歓迎します:

  1. 実験的サポートベンダーの実機検証レポート(機種・サンプル出力を Issue で)
  2. 本番サポートベンダーのバグ報告・修正
  3. 回帰テスト用のサンプル機器出力の提供
  4. ドキュメント改善 — 翻訳・使用例・トラブルシュート
  5. 多言語化 — UI 文字列の英語化(現状日本語のみ)

Issue / Pull Request はいつでも歓迎します。

ライセンス

Apache License 2.0 ── 商用利用・改変・再配布すべて自由です。

作者

内藤 進一郎@chichirou

マルチベンダー環境のエンタープライズ・キャリアネットワークを扱うネットワークエンジニア。ポートカウンター点検時の Excel コピペ地獄から逃れるために netcounter を作り始めました。

About

Multi-vendor network device counter, configuration, and log collector with automated reporting (PDF / XLSX / HTML)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages