Repository navigation
v0.2.0
twagentneo v0.2.0 - Windows Service, Linux systemd & Traffic Rates Release
We are excited to announce the release of twagentneo v0.2.0!
This release brings full native service management for Windows and Linux systemd, real-time network traffic throughput rate metrics, enhanced console debugging, and critical stability fixes.
🚀 Key Highlights & New Features (English)
1. Windows Service & Linux systemd Integration
- Native OS Daemon Management: Manage agent lifecycle via the unified
twagentneo service <install|start|restart|status|stop|remove>commands. - Windows Service Control Manager (SCM):
- Install as a Windows service with
-service-auto(or-service-delayed) for automatic boot-up. - Automatic working directory resolution, Windows Event Log registration, service logging fallback, and panic recovery.
- Install as a Windows service with
- Linux systemd Integration:
- Automatically generates
/etc/systemd/system/twagentneo.servicewith automatic restart (Restart=always), resource limits (LimitNOFILE=65536), and graceful shutdown timeout.
- Automatically generates
- Self-Updater Integration:
twagentneo updatesafely pauses running services before replacing executables and restarts them upon completion.
2. Network Traffic Throughput & Packet Rate Telemetry
- Interface Statistics: Collects byte and packet counters per interface (
BytesRecv,BytesSent,PacketsRecv,PacketsSent, errors, drops). - Real-Time Rate Calculation: Automatically computes per-second rates between collection cycles:
- Throughput rates:
BytesInRate/BytesOutRate(rx_mbps/tx_mbps) - Packet rates:
PacketsInRate/PacketsOutRate(rx_pps/tx_pps) - Error and drop rates
- Throughput rates:
3. Debugging & Observability Enhancements
- Console Debug Logging: Added
-debug(or-d) CLI flag to print detailed collection, rule evaluation, and export events directly to console. - Startup Log Visibility: Monitored file paths are explicitly logged on startup for transparent audit verification.
4. Lifecycle & Stability Improvements
- Graceful Shutdown: Resolved early shutdown and hanging issues on Windows during service termination.
- Linux Collectors: Fixed logtail file spam and resource collector edge cases.
- Non-blocking Event Delivery: Buffered internal event bus prevents event drops during agent startup.
🇯🇵 主な新機能と変更点 (Japanese)
1. Windows サービス & Linux systemd 常駐サポート
- OS ネイティブのサービス管理:
twagentneo service <install|start|restart|status|stop|remove>コマンドによる一元管理。 - Windows サービス (SCM):
service install -service-auto(または-service-delayed) により OS 起動時の自動開始に対応。- カレントディレクトリの自動解決、Windows イベントログ連携、パニックリカバリ、ロギングフォールバックを完備。
- Linux systemd 連携:
/etc/systemd/system/twagentneo.serviceを自動生成し、クラッシュ時の自動再起動(Restart=always)、ファイルディスクリプタ上限拡張(LimitNOFILE=65536)、安全な終了タイムアウトを設定。
- セルフアップデーターとのサービス連携:
twagentneo update実行時、稼働中サービスを自動停止・バイナリ安全置換・自動再起動をシームレスに実施。
2. ネットワークトラフィックレート・帯域監視
- インターフェース統計の強化: 各インターフェースの送受信バイト数・パケット数・エラー数・ドロップ数を収集。
- リアルタイム単位時間レート計算: 収集サイクルごとの差分から以下を自動計算して TWSNMP NEO へ配信:
- 転送速度:
BytesInRate/BytesOutRate(rx_mbps/tx_mbps) - パケットレート:
PacketsInRate/PacketsOutRate(rx_pps/tx_pps) - エラーレートおよびパケット破棄レート
- 転送速度:
3. デバッグ・可観測性の強化
- コンソール詳細デバッグ:
-debug(または-d)フラグにより、収集・ルール評価・送信イベントの詳細ログをコンソール出力可能。 - 監視ログパスの明示: 起動時に追跡対象ログファイルのフルパスをログ表示し、監査の透明性を向上。
4. ライフサイクル & 安定性の向上
- 安全なシャットダウン: Windows サービス停止時やシグナル受信時のハングを解消。
- Linux コレクター最適化: Linux における logtail スパムおよびリソースコレクターの処理を最適化。
- 内部イベントバスのバッファリング: 起動直後のメトリクス・FIM イベントの取りこぼしを防止。
📦 Quick Start / クイックスタート
macOS (Homebrew)
brew upgrade twagentneo # or: brew install twsnmp/tap/twagentneoLinux / macOS (One-Liner Script)
curl -fsSL https://raw.githubusercontent.com/twsnmp/twagentneo/main/install/install.sh | shRun Agent / エージェントの起動
# Standard run / 通常起動
twagentneo -config config.yaml
# Run with verbose debug logging / 詳細ログ付き起動
twagentneo -config config.yaml -debugService Management / サービス管理
# Windows (Administrator PowerShell)
.\twagentneo.exe service install -service-auto -config C:\twagentneo\config.yaml
.\twagentneo.exe service start
# Linux (sudo)
sudo /usr/local/bin/twagentneo service install -auto -config /etc/twagentneo/config.yaml
sudo /usr/local/bin/twagentneo service start