Commit cdaf42e
Dev (vsilent#90) (vsilent#91)
* Testing (vsilent#9)
* upload artifacts
* upload artifacts
* syntax fix
* try another approach
* list files
* Update README.md
* Add editorconfig. Append gitignore fot emacs
* editorconfig
* Update README.md
* Update actix requirement from 0.10 to 0.11 (vsilent#18)
Updates the requirements on [actix](https://github.com/actix/actix) to permit the latest version.
- [Release notes](https://github.com/actix/actix/releases)
- [Commits](actix/actix@actix-v0.11.0-beta.3...v0.11.1)
* Update actix-cors requirement from 0.3.0 to 0.5.4 (vsilent#19)
Updates the requirements on [actix-cors](https://github.com/actix/actix-extras) to permit the latest version.
- [Release notes](https://github.com/actix/actix-extras/releases)
- [Commits](actix/actix-extras@cors-v0.3.0...cors-v0.5.4)
* Update bcrypt requirement from 0.8.2 to 0.9.0 (vsilent#17)
Updates the requirements on [bcrypt](https://github.com/Keats/rust-bcrypt) to permit the latest version.
- [Release notes](https://github.com/Keats/rust-bcrypt/releases)
- [Commits](Keats/rust-bcrypt@v0.8.2...v0.9.0)
* Update env_logger requirement from 0.7.1 to 0.8.3 (vsilent#16)
Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/master/CHANGELOG.md)
- [Commits](rust-cli/env_logger@v0.7.1...v0.8.3)
* Update bigdecimal requirement from 0.0.14 to 0.2.0 (vsilent#15)
Updates the requirements on [bigdecimal](https://github.com/akubera/bigdecimal-rs) to permit the latest version.
- [Release notes](https://github.com/akubera/bigdecimal-rs/releases)
- [Commits](akubera/bigdecimal-rs@v0.0.14...v0.2.0)
* Update actix-service requirement from 1.0.6 to 2.0.0 (vsilent#23)
Updates the requirements on [actix-service](https://github.com/actix/actix-net) to permit the latest version.
- [Release notes](https://github.com/actix/actix-net/releases)
- [Commits](actix/actix-net@service-v1.0.6...rt-v2.0.0)
* Bump codacy/codacy-analysis-cli-action from 2.0.1 to 3.0.1 (vsilent#24)
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 2.0.1 to 3.0.1.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](codacy/codacy-analysis-cli-action@2.0.1...84fbefe)
* Bump codacy/codacy-analysis-cli-action from 3.0.1 to 3.0.2 (vsilent#25)
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](codacy/codacy-analysis-cli-action@3.0.1...3.0.2)
* Bump actions/cache from 2.1.4 to 2.1.5 (vsilent#26)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.4 to 2.1.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](actions/cache@v2.1.4...v2.1.5)
* Bump codacy/codacy-analysis-cli-action from 3.0.2 to 3.0.3 (vsilent#28)
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](codacy/codacy-analysis-cli-action@3.0.2...3.0.3)
* Update actix requirement from 0.11 to 0.12 (vsilent#31)
Updates the requirements on [actix](https://github.com/actix/actix) to permit the latest version.
- [Release notes](https://github.com/actix/actix/releases)
- [Commits](actix/actix@v0.11.0...v0.12.0)
---
updated-dependencies:
- dependency-name: actix
dependency-type: direct:production
...
* Bump actions/cache from 2.1.5 to 2.1.6 (vsilent#29)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](actions/cache@v2.1.5...v2.1.6)
* Update bcrypt requirement from 0.9.0 to 0.10.0 (vsilent#32)
Updates the requirements on [bcrypt](https://github.com/Keats/rust-bcrypt) to permit the latest version.
- [Release notes](https://github.com/Keats/rust-bcrypt/releases)
- [Commits](Keats/rust-bcrypt@v0.9.0...v0.10.0)
---
updated-dependencies:
- dependency-name: bcrypt
dependency-type: direct:production
...
* Bump codacy/codacy-analysis-cli-action from 3.0.3 to 4.0.0 (vsilent#35)
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 3.0.3 to 4.0.0.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](codacy/codacy-analysis-cli-action@3.0.3...4.0.0)
---
updated-dependencies:
- dependency-name: codacy/codacy-analysis-cli-action
dependency-type: direct:production
update-type: version-update:semver-major
...
* Update env_logger requirement from 0.8.3 to 0.9.0 (vsilent#34)
Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md)
- [Commits](rust-cli/env_logger@v0.8.3...v0.9.0)
---
updated-dependencies:
- dependency-name: env_logger
dependency-type: direct:production
...
* Update bigdecimal requirement from 0.2.0 to 0.3.0 (vsilent#37)
Updates the requirements on [bigdecimal](https://github.com/akubera/bigdecimal-rs) to permit the latest version.
- [Release notes](https://github.com/akubera/bigdecimal-rs/releases)
- [Commits](akubera/bigdecimal-rs@v0.2.0...v0.3.0)
---
updated-dependencies:
- dependency-name: bigdecimal
dependency-type: direct:production
...
* Update actix-tls requirement from 2.0.0 to 3.0.0 (vsilent#39)
Updates the requirements on [actix-tls](https://github.com/actix/actix-net) to permit the latest version.
- [Release notes](https://github.com/actix/actix-net/releases)
- [Commits](actix/actix-net@rt-v2.0.0...tls-v3.0.0)
---
updated-dependencies:
- dependency-name: actix-tls
dependency-type: direct:production
...
* Remove unused imports, list docker containers added
* actix-web upgrade
* shell commands
* shell commands
* rustscan, openssl binaries added
* rustscan, openssl binaries added
* phase 1 files
* Broken, integrating bollard for container security check
* Update README with new logo and project details
Added a new logo image and updated the project description.
* Revise README with new images and title case
Updated image and title formatting in README.
* diesel replaced with r2d2 and rusqlite
* ebpf files
* refactoring, ebpf / containers
* feat(cli): add clap subcommands (serve/sniff) + sniff config
- Add clap 4 for CLI argument parsing
- Refactor main.rs: dispatch to serve (default) or sniff subcommand
- Create src/cli.rs with Cli/Command enums
- Create src/sniff/config.rs with SniffConfig (env + CLI args)
- Add new deps: clap, async-trait, reqwest, zstd
- Update .env.sample with sniff + AI provider config vars
- 12 unit tests (7 CLI parsing + 5 config loading)
* feat(sniff): log source discovery + database persistence
- Create src/sniff/discovery.rs: LogSource, LogSourceType, discovery
functions for system logs, Docker containers, and custom paths
- Create src/database/repositories/log_sources.rs: CRUD for log_sources
and log_summaries tables (follows existing alerts repository pattern)
- Add log_sources and log_summaries tables to init_database()
- Export docker module from lib.rs for reuse by sniff discovery
- 14 unit tests (8 discovery + 6 repository)
* feat(sniff): log reader trait + File/Docker/Journald implementations
- Create src/sniff/reader.rs with LogReader async trait and LogEntry struct
- FileLogReader: byte offset tracking, incremental reads, log rotation detection
- DockerLogReader: bollard-based container log streaming with timestamp filtering
- JournaldReader: journalctl subprocess (Linux-gated with #[cfg(target_os = "linux")])
- Add futures-util dependency for Docker log stream consumption
- 10 unit tests covering read, incremental, truncation, empty lines, metadata
* feat(sniff): AI log analysis with OpenAI and pattern backends
- Create src/sniff/analyzer.rs with LogAnalyzer trait
- OpenAiAnalyzer: single client for OpenAI/Ollama/vLLM/any compatible API
sends batched logs to /chat/completions, parses structured JSON response
- PatternAnalyzer: fallback local analyzer using regex-free pattern matching
detects error spikes, counts errors/warnings without external AI
- LogSummary and LogAnomaly types with serialization support
- JSON response parsing with graceful handling of partial LLM output
- 16 unit tests (prompt building, JSON parsing, pattern analysis, serialization)
* feat(sniff): consume mode — zstd compression, dedup, log purge
- Create src/sniff/consumer.rs with LogConsumer
- FNV hashing deduplication with configurable capacity (100k entries)
- zstd compression (level 3) with timestamped archive files
- File purge via truncation (preserves fd for syslog daemons)
- Docker log purge via /var/lib/docker/containers/ JSON log truncation
- Full consume pipeline: deduplicate → compress → purge → report stats
- ConsumeResult tracks entries_archived, duplicates_skipped, bytes_freed
- 13 unit tests (hashing, dedup, compression, purge, full pipeline)
* feat(sniff): reporter + orchestrator loop
- Reporter: converts LogSummary/LogAnomaly into Alerts using existing
AlertManager infrastructure (route_by_severity, NotificationChannel)
- SniffOrchestrator: full discover → read → analyze → report → consume
pipeline with continuous and one-shot modes
- Wire up run_sniff() in main.rs to use SniffOrchestrator
- Add events, rules, alerting, models modules to binary crate
- 7 new tests (reporter: 5, orchestrator: 3)
* feat(sniff): REST API for log sources and summaries
- GET /api/logs/sources — list discovered log sources
- POST /api/logs/sources — manually add a custom log source
- GET /api/logs/sources/{path} — get a single source
- DELETE /api/logs/sources/{path} — remove a source
- GET /api/logs/summaries — list AI summaries (optional source_id filter)
- Register routes in configure_all_routes
- 7 tests covering all endpoints
* docs: update CHANGELOG and README for sniff feature
- CHANGELOG: document all sniff additions (discovery, readers, AI
analysis, consumer, reporter, orchestrator, REST API, deps)
- README: add log sniffing to key features, architecture diagram,
project structure, CLI usage examples, REST API examples,
and completed tasks list
* chore: remove task files from repo and gitignore
* feat: add curl-based binary installation
- install.sh: POSIX shell installer — detects Linux x86_64/aarch64,
downloads from GitHub Releases, verifies SHA256, installs to
/usr/local/bin
- release.yml: GitHub Actions workflow — builds Linux binaries on tag
push using cross, creates release with tarballs + checksums
- README: add curl install one-liner to Quick Start
Usage:
curl -fsSL https://raw.githubusercontent.com/vsilent/stackdog/dev/install.sh | sudo bash
* docs: fix ML module status — stub infrastructure, not in progress
* feat(cli): add --ai-model and --ai-api-url flags to sniff command
- Add --ai-model flag to specify AI model (e.g. qwen2.5-coder:latest)
- Add --ai-api-url flag to specify API endpoint URL
- Recognize "ollama" as AI provider alias (maps to OpenAI-compatible client)
- CLI args override env vars for model and API URL
- Log AI model and API URL at startup for transparency
* feat(sniff): add debug logging and robust LLM JSON extraction
- Add debug/trace logging across entire sniff pipeline:
discovery, reader, analyzer, orchestrator, reporter
- Respect user RUST_LOG env var (no longer hardcoded to info)
- Improve LLM response JSON extraction to handle:
markdown code fences, preamble text, trailing text
- Include raw LLM response in trace logs for debugging parse failures
- Show first 200 chars of failed JSON in error messages
- Add 5 tests for extract_json edge cases
Usage: RUST_LOG=debug stackdog sniff --once ...
* feat(alerting): implement real Slack webhook notifications
- Add --slack-webhook CLI flag to sniff command
- Read STACKDOG_SLACK_WEBHOOK_URL env var (CLI overrides env)
- Implement actual HTTP POST to Slack incoming webhook API
- Build proper JSON payloads with serde_json (color-coded by severity)
- Add reqwest blocking feature for synchronous notification delivery
- Wire NotificationConfig through SniffConfig → Orchestrator → Reporter
- Add STACKDOG_WEBHOOK_URL env var support
- Update .env.sample with notification channel examples
- Add 3 tests for Slack webhook config (CLI, env, override priority)
Usage:
stackdog sniff --once --slack-webhook https://hooks.slack.com/services/T/B/xxx
# or via env:
export STACKDOG_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/T/B/xxx
* Update docker.yml
---------
Co-authored-by: vsilent <jabberroid@gmail.com>
Co-authored-by: Evgeny Duzhakov <diaevd@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent f750dce commit cdaf42e
41 files changed
Lines changed: 5775 additions & 106 deletions
File tree
- .github
- workflows
- .qwen
- docs
- src
- alerting
- api
- collectors/ebpf
- database
- repositories
- docker
- sniff
- tests/structure
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | | - | |
| 139 | + | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 36 | + | |
0 commit comments