SENTINEL_WATCHER is a high-performance .NET 8 Worker Service designed for privacy-first log monitoring. It bridges the gap between raw stack traces and actionable intelligence by analyzing local errors using Ollama LLMs and notifying you instantly via Telegram.
Sentinel operates on a simple Observe → Analyze → Alert pipeline:
- Observe: Monitors local directories using
FileSystemWatcherwith minimal CPU overhead. - Filter: Identifies new entries marked as
Error,Critical,FatalorException. - Analyze: Sends the raw error context to a local
Ollamainstance. The AI interprets the stack trace and suggests a fix. - Alert: Pushes a notification report to your
Telegram Bot.
- Privacy-First: Your logs never leave your local machine (No OpenAI/Anthropic keys required).
- Lightweight: Built on .NET 8 BackgroundService (Worker Service).
- Customizable: Works with any Ollama-supported model (
llama3,qwen2.5,mistral). - Real-time: Near-zero latency between log write and notification.
- .NET 8.0 SDK
- Ollama (Running locally)
- Telegram Bot Token & Chat ID
- Clone the repo:
git clone https://github.com/youruser/sentinel_watcher.git - Pull your preferred model:
ollama pull qwen2.5:0.5b - Configure
appsettings.json(see below). - Run:
dotnet run
{
"Ollama": {
"Uri": "http://localhost:11434",
"ModelName": "qwen2.5:0.5b"
},
"LoggerWorker": {
"Path": "./logs",
"Extension": "*.log"
},
"TelegramOptions": {
"TelegramToken": "YOUR_TELEGRAM_TOKEN",
"TelegramChatId": "YOUR_CHAT_ID"
}
}MIT LICENSE