devops-sentinel 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. devops_sentinel-0.1.0/PKG-INFO +185 -0
  2. devops_sentinel-0.1.0/README.md +145 -0
  3. devops_sentinel-0.1.0/devops_sentinel.egg-info/PKG-INFO +185 -0
  4. devops_sentinel-0.1.0/devops_sentinel.egg-info/SOURCES.txt +61 -0
  5. devops_sentinel-0.1.0/devops_sentinel.egg-info/dependency_links.txt +1 -0
  6. devops_sentinel-0.1.0/devops_sentinel.egg-info/entry_points.txt +2 -0
  7. devops_sentinel-0.1.0/devops_sentinel.egg-info/requires.txt +18 -0
  8. devops_sentinel-0.1.0/devops_sentinel.egg-info/top_level.txt +1 -0
  9. devops_sentinel-0.1.0/pyproject.toml +75 -0
  10. devops_sentinel-0.1.0/setup.cfg +4 -0
  11. devops_sentinel-0.1.0/src/__init__.py +3 -0
  12. devops_sentinel-0.1.0/src/api/gdpr_endpoints.py +404 -0
  13. devops_sentinel-0.1.0/src/api/quick_health_check.py +296 -0
  14. devops_sentinel-0.1.0/src/api/waitlist.py +166 -0
  15. devops_sentinel-0.1.0/src/auth/auth_helper.py +198 -0
  16. devops_sentinel-0.1.0/src/auth/auth_service.py +431 -0
  17. devops_sentinel-0.1.0/src/cli/__init__.py +5 -0
  18. devops_sentinel-0.1.0/src/cli/auth.py +456 -0
  19. devops_sentinel-0.1.0/src/cli/db.py +212 -0
  20. devops_sentinel-0.1.0/src/cli/main.py +436 -0
  21. devops_sentinel-0.1.0/src/cli/projects.py +109 -0
  22. devops_sentinel-0.1.0/src/cli/services.py +164 -0
  23. devops_sentinel-0.1.0/src/core/__init__.py +30 -0
  24. devops_sentinel-0.1.0/src/core/alert_explainer.py +370 -0
  25. devops_sentinel-0.1.0/src/core/alert_router.py +300 -0
  26. devops_sentinel-0.1.0/src/core/anomaly_detector.py +375 -0
  27. devops_sentinel-0.1.0/src/core/auto_runbook_executor.py +492 -0
  28. devops_sentinel-0.1.0/src/core/baseline_monitor.py +301 -0
  29. devops_sentinel-0.1.0/src/core/byok_tier.py +168 -0
  30. devops_sentinel-0.1.0/src/core/classifier.py +275 -0
  31. devops_sentinel-0.1.0/src/core/cost_tracker.py +324 -0
  32. devops_sentinel-0.1.0/src/core/dependency_analyzer.py +388 -0
  33. devops_sentinel-0.1.0/src/core/deployment_correlator.py +401 -0
  34. devops_sentinel-0.1.0/src/core/incident_memory.py +436 -0
  35. devops_sentinel-0.1.0/src/core/on_call_manager.py +407 -0
  36. devops_sentinel-0.1.0/src/core/postmortem_generator.py +373 -0
  37. devops_sentinel-0.1.0/src/core/rate_limiter.py +337 -0
  38. devops_sentinel-0.1.0/src/core/runbook_matcher.py +416 -0
  39. devops_sentinel-0.1.0/src/core/service_map_generator.py +395 -0
  40. devops_sentinel-0.1.0/src/core/team_assignment_system.py +368 -0
  41. devops_sentinel-0.1.0/src/integrations/email_notification_system.py +464 -0
  42. devops_sentinel-0.1.0/src/integrations/github_oauth.py +168 -0
  43. devops_sentinel-0.1.0/src/integrations/integrations_hub.py +182 -0
  44. devops_sentinel-0.1.0/src/integrations/pagerduty_integration.py +314 -0
  45. devops_sentinel-0.1.0/src/integrations/pagerduty_oauth.py +162 -0
  46. devops_sentinel-0.1.0/src/integrations/slack.py +458 -0
  47. devops_sentinel-0.1.0/src/integrations/slack_integration.py +425 -0
  48. devops_sentinel-0.1.0/src/integrations/slack_oauth.py +295 -0
  49. devops_sentinel-0.1.0/src/ml/__init__.py +10 -0
  50. devops_sentinel-0.1.0/src/ml/anomaly_detector.py +336 -0
  51. devops_sentinel-0.1.0/src/notifications/email_templates.py +508 -0
  52. devops_sentinel-0.1.0/src/setup/ai_setup.py +187 -0
  53. devops_sentinel-0.1.0/src/setup/supabase_setup.py +295 -0
  54. devops_sentinel-0.1.0/src/tools/chaos_engineering_tools.py +448 -0
  55. devops_sentinel-0.1.0/src/tools/custom_health_check_tool.py +317 -0
  56. devops_sentinel-0.1.0/src/tools/ssl_certificate_monitor.py +221 -0
  57. devops_sentinel-0.1.0/tests/test_anomaly_detector.py +249 -0
  58. devops_sentinel-0.1.0/tests/test_auth_service.py +213 -0
  59. devops_sentinel-0.1.0/tests/test_cli_auth.py +134 -0
  60. devops_sentinel-0.1.0/tests/test_incident_memory.py +290 -0
  61. devops_sentinel-0.1.0/tests/test_quick_health_check.py +248 -0
  62. devops_sentinel-0.1.0/tests/test_rate_limiter.py +189 -0
  63. devops_sentinel-0.1.0/tests/test_slack.py +329 -0
@@ -0,0 +1,185 @@
1
+ Metadata-Version: 2.4
2
+ Name: devops-sentinel
3
+ Version: 0.1.0
4
+ Summary: Autonomous SRE agents that watch your services, detect anomalies, and generate blameless postmortems
5
+ Author-email: "jagadeep.mamidi" <jagadeep.mamidi@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/devops-sentinel/devops-sentinel
8
+ Project-URL: Documentation, https://devops-sentinel.dev/docs
9
+ Project-URL: Repository, https://github.com/devops-sentinel/devops-sentinel
10
+ Project-URL: Issues, https://github.com/devops-sentinel/devops-sentinel/issues
11
+ Keywords: devops,sre,monitoring,incident-management,ai,postmortem
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: System Administrators
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: System :: Monitoring
22
+ Classifier: Topic :: System :: Systems Administration
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ Requires-Dist: click>=8.0
26
+ Requires-Dist: rich>=13.0
27
+ Requires-Dist: httpx>=0.25
28
+ Requires-Dist: aiohttp>=3.9
29
+ Requires-Dist: python-dotenv>=1.0
30
+ Requires-Dist: supabase>=2.0
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=7.0; extra == "dev"
33
+ Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
34
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
35
+ Provides-Extra: ai
36
+ Requires-Dist: openai>=1.0; extra == "ai"
37
+ Requires-Dist: anthropic>=0.18; extra == "ai"
38
+ Provides-Extra: all
39
+ Requires-Dist: devops-sentinel[ai,dev]; extra == "all"
40
+
41
+ # DevOps Sentinel
42
+
43
+ **Autonomous SRE Agent System** - Reduce Mean Time to Detection (MTTD) from minutes to under 10 seconds.
44
+
45
+ ## Features
46
+
47
+ - **Continuous Monitoring** - Health checks at configurable intervals
48
+ - **Multi-Agent Analysis** - CrewAI-powered investigation and root cause analysis
49
+ - **AI Postmortems** - Automated incident documentation
50
+ - **Real-time Dashboard** - WebSocket-powered live updates
51
+ - **CLI Interface** - Similar to Gemini CLI
52
+ - **Pre-Deploy Linting** - Code quality checks before production
53
+ - **Privacy-First** - No telemetry, transparent data handling
54
+
55
+ ## Architecture
56
+
57
+ ```
58
+ ┌─────────────────────────────────────────────────────────────┐
59
+ │ DevOps Sentinel │
60
+ ├─────────────────────────────────────────────────────────────┤
61
+ │ CLI (Typer) │ API (FastAPI) │ Dashboard (WebSocket) │
62
+ ├─────────────────────────────────────────────────────────────┤
63
+ │ Monitoring Orchestrator │
64
+ ├─────────────────────────────────────────────────────────────┤
65
+ │ Watcher Agent │ Triage Agent │ Investigator │ Strategist │
66
+ ├─────────────────────────────────────────────────────────────┤
67
+ │ Health Check │ Slack Alert │ Log Analysis │ DB Health │
68
+ ├─────────────────────────────────────────────────────────────┤
69
+ │ Supabase (Persistence) │ OpenRouter (LLM) │ Slack │
70
+ └─────────────────────────────────────────────────────────────┘
71
+ ```
72
+
73
+ ## Installation
74
+
75
+ ```bash
76
+ # Clone the repository
77
+ git clone https://github.com/yourusername/devops-sentinel.git
78
+ cd devops-sentinel
79
+
80
+ # Create virtual environment
81
+ python -m venv venv
82
+ source venv/bin/activate # Windows: venv\Scripts\activate
83
+
84
+ # Install dependencies
85
+ pip install -e .
86
+ ```
87
+
88
+ ## Quick Start
89
+
90
+ ```bash
91
+ # Initialize configuration
92
+ sentinel init
93
+
94
+ # Monitor a service
95
+ sentinel monitor https://api.example.com/health
96
+
97
+ # Start dashboard
98
+ sentinel serve
99
+ ```
100
+
101
+ ## CLI Commands
102
+
103
+ | Command | Description |
104
+ |---------|-------------|
105
+ | `sentinel init` | Interactive configuration setup |
106
+ | `sentinel monitor <url>` | Monitor a service URL |
107
+ | `sentinel status` | Show monitored services |
108
+ | `sentinel incidents` | List recent incidents |
109
+ | `sentinel postmortem <id>` | View incident postmortem |
110
+ | `sentinel serve` | Start dashboard server |
111
+ | `sentinel lint <path>` | Run pre-deploy checks |
112
+
113
+ ## Configuration
114
+
115
+ Create a `.env` file or run `sentinel init`:
116
+
117
+ ```env
118
+ OPENROUTER_API_KEY=your_key_here
119
+ DEFAULT_MODEL=google/gemini-pro
120
+ SUPABASE_URL=https://your-project.supabase.co
121
+ SUPABASE_KEY=your_anon_key
122
+ SLACK_WEBHOOK_URL=https://hooks.slack.com/...
123
+ ```
124
+
125
+ ## Docker Deployment
126
+
127
+ ```bash
128
+ # Build and run
129
+ docker-compose up -d
130
+
131
+ # View logs
132
+ docker-compose logs -f sentinel
133
+ ```
134
+
135
+ ## How It Works
136
+
137
+ 1. **Watcher Agent** continuously monitors service health endpoints
138
+ 2. On failure, **First Responder** sends a Slack alert
139
+ 3. **Investigator** analyzes logs, deployments, and database status
140
+ 4. **Strategist** creates a prioritized action plan
141
+ 5. AI generates a structured postmortem saved to Supabase
142
+
143
+ ## Privacy
144
+
145
+ - All data stays local or in YOUR Supabase instance
146
+ - No telemetry or external data collection
147
+ - Use `--privacy` flag to see exactly what data is processed
148
+ - OpenRouter calls only contain health check context (no PII)
149
+
150
+ ## Supabase Schema
151
+
152
+ ```sql
153
+ -- Run these in your Supabase SQL editor
154
+ CREATE TABLE services (
155
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
156
+ name TEXT NOT NULL,
157
+ url TEXT NOT NULL,
158
+ check_interval INTEGER DEFAULT 10,
159
+ is_active BOOLEAN DEFAULT true,
160
+ created_at TIMESTAMPTZ DEFAULT now()
161
+ );
162
+
163
+ CREATE TABLE incidents (
164
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
165
+ service_id UUID REFERENCES services(id),
166
+ status TEXT DEFAULT 'detecting',
167
+ detected_at TIMESTAMPTZ DEFAULT now(),
168
+ resolved_at TIMESTAMPTZ,
169
+ mttd_seconds FLOAT,
170
+ postmortem TEXT
171
+ );
172
+
173
+ CREATE TABLE health_checks (
174
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
175
+ service_id UUID REFERENCES services(id),
176
+ status_code INTEGER,
177
+ response_time_ms FLOAT,
178
+ is_healthy BOOLEAN,
179
+ checked_at TIMESTAMPTZ DEFAULT now()
180
+ );
181
+ ```
182
+
183
+ ## License
184
+
185
+ MIT License
@@ -0,0 +1,145 @@
1
+ # DevOps Sentinel
2
+
3
+ **Autonomous SRE Agent System** - Reduce Mean Time to Detection (MTTD) from minutes to under 10 seconds.
4
+
5
+ ## Features
6
+
7
+ - **Continuous Monitoring** - Health checks at configurable intervals
8
+ - **Multi-Agent Analysis** - CrewAI-powered investigation and root cause analysis
9
+ - **AI Postmortems** - Automated incident documentation
10
+ - **Real-time Dashboard** - WebSocket-powered live updates
11
+ - **CLI Interface** - Similar to Gemini CLI
12
+ - **Pre-Deploy Linting** - Code quality checks before production
13
+ - **Privacy-First** - No telemetry, transparent data handling
14
+
15
+ ## Architecture
16
+
17
+ ```
18
+ ┌─────────────────────────────────────────────────────────────┐
19
+ │ DevOps Sentinel │
20
+ ├─────────────────────────────────────────────────────────────┤
21
+ │ CLI (Typer) │ API (FastAPI) │ Dashboard (WebSocket) │
22
+ ├─────────────────────────────────────────────────────────────┤
23
+ │ Monitoring Orchestrator │
24
+ ├─────────────────────────────────────────────────────────────┤
25
+ │ Watcher Agent │ Triage Agent │ Investigator │ Strategist │
26
+ ├─────────────────────────────────────────────────────────────┤
27
+ │ Health Check │ Slack Alert │ Log Analysis │ DB Health │
28
+ ├─────────────────────────────────────────────────────────────┤
29
+ │ Supabase (Persistence) │ OpenRouter (LLM) │ Slack │
30
+ └─────────────────────────────────────────────────────────────┘
31
+ ```
32
+
33
+ ## Installation
34
+
35
+ ```bash
36
+ # Clone the repository
37
+ git clone https://github.com/yourusername/devops-sentinel.git
38
+ cd devops-sentinel
39
+
40
+ # Create virtual environment
41
+ python -m venv venv
42
+ source venv/bin/activate # Windows: venv\Scripts\activate
43
+
44
+ # Install dependencies
45
+ pip install -e .
46
+ ```
47
+
48
+ ## Quick Start
49
+
50
+ ```bash
51
+ # Initialize configuration
52
+ sentinel init
53
+
54
+ # Monitor a service
55
+ sentinel monitor https://api.example.com/health
56
+
57
+ # Start dashboard
58
+ sentinel serve
59
+ ```
60
+
61
+ ## CLI Commands
62
+
63
+ | Command | Description |
64
+ |---------|-------------|
65
+ | `sentinel init` | Interactive configuration setup |
66
+ | `sentinel monitor <url>` | Monitor a service URL |
67
+ | `sentinel status` | Show monitored services |
68
+ | `sentinel incidents` | List recent incidents |
69
+ | `sentinel postmortem <id>` | View incident postmortem |
70
+ | `sentinel serve` | Start dashboard server |
71
+ | `sentinel lint <path>` | Run pre-deploy checks |
72
+
73
+ ## Configuration
74
+
75
+ Create a `.env` file or run `sentinel init`:
76
+
77
+ ```env
78
+ OPENROUTER_API_KEY=your_key_here
79
+ DEFAULT_MODEL=google/gemini-pro
80
+ SUPABASE_URL=https://your-project.supabase.co
81
+ SUPABASE_KEY=your_anon_key
82
+ SLACK_WEBHOOK_URL=https://hooks.slack.com/...
83
+ ```
84
+
85
+ ## Docker Deployment
86
+
87
+ ```bash
88
+ # Build and run
89
+ docker-compose up -d
90
+
91
+ # View logs
92
+ docker-compose logs -f sentinel
93
+ ```
94
+
95
+ ## How It Works
96
+
97
+ 1. **Watcher Agent** continuously monitors service health endpoints
98
+ 2. On failure, **First Responder** sends a Slack alert
99
+ 3. **Investigator** analyzes logs, deployments, and database status
100
+ 4. **Strategist** creates a prioritized action plan
101
+ 5. AI generates a structured postmortem saved to Supabase
102
+
103
+ ## Privacy
104
+
105
+ - All data stays local or in YOUR Supabase instance
106
+ - No telemetry or external data collection
107
+ - Use `--privacy` flag to see exactly what data is processed
108
+ - OpenRouter calls only contain health check context (no PII)
109
+
110
+ ## Supabase Schema
111
+
112
+ ```sql
113
+ -- Run these in your Supabase SQL editor
114
+ CREATE TABLE services (
115
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
116
+ name TEXT NOT NULL,
117
+ url TEXT NOT NULL,
118
+ check_interval INTEGER DEFAULT 10,
119
+ is_active BOOLEAN DEFAULT true,
120
+ created_at TIMESTAMPTZ DEFAULT now()
121
+ );
122
+
123
+ CREATE TABLE incidents (
124
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
125
+ service_id UUID REFERENCES services(id),
126
+ status TEXT DEFAULT 'detecting',
127
+ detected_at TIMESTAMPTZ DEFAULT now(),
128
+ resolved_at TIMESTAMPTZ,
129
+ mttd_seconds FLOAT,
130
+ postmortem TEXT
131
+ );
132
+
133
+ CREATE TABLE health_checks (
134
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
135
+ service_id UUID REFERENCES services(id),
136
+ status_code INTEGER,
137
+ response_time_ms FLOAT,
138
+ is_healthy BOOLEAN,
139
+ checked_at TIMESTAMPTZ DEFAULT now()
140
+ );
141
+ ```
142
+
143
+ ## License
144
+
145
+ MIT License
@@ -0,0 +1,185 @@
1
+ Metadata-Version: 2.4
2
+ Name: devops-sentinel
3
+ Version: 0.1.0
4
+ Summary: Autonomous SRE agents that watch your services, detect anomalies, and generate blameless postmortems
5
+ Author-email: "jagadeep.mamidi" <jagadeep.mamidi@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/devops-sentinel/devops-sentinel
8
+ Project-URL: Documentation, https://devops-sentinel.dev/docs
9
+ Project-URL: Repository, https://github.com/devops-sentinel/devops-sentinel
10
+ Project-URL: Issues, https://github.com/devops-sentinel/devops-sentinel/issues
11
+ Keywords: devops,sre,monitoring,incident-management,ai,postmortem
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: System Administrators
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: System :: Monitoring
22
+ Classifier: Topic :: System :: Systems Administration
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ Requires-Dist: click>=8.0
26
+ Requires-Dist: rich>=13.0
27
+ Requires-Dist: httpx>=0.25
28
+ Requires-Dist: aiohttp>=3.9
29
+ Requires-Dist: python-dotenv>=1.0
30
+ Requires-Dist: supabase>=2.0
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=7.0; extra == "dev"
33
+ Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
34
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
35
+ Provides-Extra: ai
36
+ Requires-Dist: openai>=1.0; extra == "ai"
37
+ Requires-Dist: anthropic>=0.18; extra == "ai"
38
+ Provides-Extra: all
39
+ Requires-Dist: devops-sentinel[ai,dev]; extra == "all"
40
+
41
+ # DevOps Sentinel
42
+
43
+ **Autonomous SRE Agent System** - Reduce Mean Time to Detection (MTTD) from minutes to under 10 seconds.
44
+
45
+ ## Features
46
+
47
+ - **Continuous Monitoring** - Health checks at configurable intervals
48
+ - **Multi-Agent Analysis** - CrewAI-powered investigation and root cause analysis
49
+ - **AI Postmortems** - Automated incident documentation
50
+ - **Real-time Dashboard** - WebSocket-powered live updates
51
+ - **CLI Interface** - Similar to Gemini CLI
52
+ - **Pre-Deploy Linting** - Code quality checks before production
53
+ - **Privacy-First** - No telemetry, transparent data handling
54
+
55
+ ## Architecture
56
+
57
+ ```
58
+ ┌─────────────────────────────────────────────────────────────┐
59
+ │ DevOps Sentinel │
60
+ ├─────────────────────────────────────────────────────────────┤
61
+ │ CLI (Typer) │ API (FastAPI) │ Dashboard (WebSocket) │
62
+ ├─────────────────────────────────────────────────────────────┤
63
+ │ Monitoring Orchestrator │
64
+ ├─────────────────────────────────────────────────────────────┤
65
+ │ Watcher Agent │ Triage Agent │ Investigator │ Strategist │
66
+ ├─────────────────────────────────────────────────────────────┤
67
+ │ Health Check │ Slack Alert │ Log Analysis │ DB Health │
68
+ ├─────────────────────────────────────────────────────────────┤
69
+ │ Supabase (Persistence) │ OpenRouter (LLM) │ Slack │
70
+ └─────────────────────────────────────────────────────────────┘
71
+ ```
72
+
73
+ ## Installation
74
+
75
+ ```bash
76
+ # Clone the repository
77
+ git clone https://github.com/yourusername/devops-sentinel.git
78
+ cd devops-sentinel
79
+
80
+ # Create virtual environment
81
+ python -m venv venv
82
+ source venv/bin/activate # Windows: venv\Scripts\activate
83
+
84
+ # Install dependencies
85
+ pip install -e .
86
+ ```
87
+
88
+ ## Quick Start
89
+
90
+ ```bash
91
+ # Initialize configuration
92
+ sentinel init
93
+
94
+ # Monitor a service
95
+ sentinel monitor https://api.example.com/health
96
+
97
+ # Start dashboard
98
+ sentinel serve
99
+ ```
100
+
101
+ ## CLI Commands
102
+
103
+ | Command | Description |
104
+ |---------|-------------|
105
+ | `sentinel init` | Interactive configuration setup |
106
+ | `sentinel monitor <url>` | Monitor a service URL |
107
+ | `sentinel status` | Show monitored services |
108
+ | `sentinel incidents` | List recent incidents |
109
+ | `sentinel postmortem <id>` | View incident postmortem |
110
+ | `sentinel serve` | Start dashboard server |
111
+ | `sentinel lint <path>` | Run pre-deploy checks |
112
+
113
+ ## Configuration
114
+
115
+ Create a `.env` file or run `sentinel init`:
116
+
117
+ ```env
118
+ OPENROUTER_API_KEY=your_key_here
119
+ DEFAULT_MODEL=google/gemini-pro
120
+ SUPABASE_URL=https://your-project.supabase.co
121
+ SUPABASE_KEY=your_anon_key
122
+ SLACK_WEBHOOK_URL=https://hooks.slack.com/...
123
+ ```
124
+
125
+ ## Docker Deployment
126
+
127
+ ```bash
128
+ # Build and run
129
+ docker-compose up -d
130
+
131
+ # View logs
132
+ docker-compose logs -f sentinel
133
+ ```
134
+
135
+ ## How It Works
136
+
137
+ 1. **Watcher Agent** continuously monitors service health endpoints
138
+ 2. On failure, **First Responder** sends a Slack alert
139
+ 3. **Investigator** analyzes logs, deployments, and database status
140
+ 4. **Strategist** creates a prioritized action plan
141
+ 5. AI generates a structured postmortem saved to Supabase
142
+
143
+ ## Privacy
144
+
145
+ - All data stays local or in YOUR Supabase instance
146
+ - No telemetry or external data collection
147
+ - Use `--privacy` flag to see exactly what data is processed
148
+ - OpenRouter calls only contain health check context (no PII)
149
+
150
+ ## Supabase Schema
151
+
152
+ ```sql
153
+ -- Run these in your Supabase SQL editor
154
+ CREATE TABLE services (
155
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
156
+ name TEXT NOT NULL,
157
+ url TEXT NOT NULL,
158
+ check_interval INTEGER DEFAULT 10,
159
+ is_active BOOLEAN DEFAULT true,
160
+ created_at TIMESTAMPTZ DEFAULT now()
161
+ );
162
+
163
+ CREATE TABLE incidents (
164
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
165
+ service_id UUID REFERENCES services(id),
166
+ status TEXT DEFAULT 'detecting',
167
+ detected_at TIMESTAMPTZ DEFAULT now(),
168
+ resolved_at TIMESTAMPTZ,
169
+ mttd_seconds FLOAT,
170
+ postmortem TEXT
171
+ );
172
+
173
+ CREATE TABLE health_checks (
174
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
175
+ service_id UUID REFERENCES services(id),
176
+ status_code INTEGER,
177
+ response_time_ms FLOAT,
178
+ is_healthy BOOLEAN,
179
+ checked_at TIMESTAMPTZ DEFAULT now()
180
+ );
181
+ ```
182
+
183
+ ## License
184
+
185
+ MIT License
@@ -0,0 +1,61 @@
1
+ README.md
2
+ pyproject.toml
3
+ devops_sentinel.egg-info/PKG-INFO
4
+ devops_sentinel.egg-info/SOURCES.txt
5
+ devops_sentinel.egg-info/dependency_links.txt
6
+ devops_sentinel.egg-info/entry_points.txt
7
+ devops_sentinel.egg-info/requires.txt
8
+ devops_sentinel.egg-info/top_level.txt
9
+ src/__init__.py
10
+ src/api/gdpr_endpoints.py
11
+ src/api/quick_health_check.py
12
+ src/api/waitlist.py
13
+ src/auth/auth_helper.py
14
+ src/auth/auth_service.py
15
+ src/cli/__init__.py
16
+ src/cli/auth.py
17
+ src/cli/db.py
18
+ src/cli/main.py
19
+ src/cli/projects.py
20
+ src/cli/services.py
21
+ src/core/__init__.py
22
+ src/core/alert_explainer.py
23
+ src/core/alert_router.py
24
+ src/core/anomaly_detector.py
25
+ src/core/auto_runbook_executor.py
26
+ src/core/baseline_monitor.py
27
+ src/core/byok_tier.py
28
+ src/core/classifier.py
29
+ src/core/cost_tracker.py
30
+ src/core/dependency_analyzer.py
31
+ src/core/deployment_correlator.py
32
+ src/core/incident_memory.py
33
+ src/core/on_call_manager.py
34
+ src/core/postmortem_generator.py
35
+ src/core/rate_limiter.py
36
+ src/core/runbook_matcher.py
37
+ src/core/service_map_generator.py
38
+ src/core/team_assignment_system.py
39
+ src/integrations/email_notification_system.py
40
+ src/integrations/github_oauth.py
41
+ src/integrations/integrations_hub.py
42
+ src/integrations/pagerduty_integration.py
43
+ src/integrations/pagerduty_oauth.py
44
+ src/integrations/slack.py
45
+ src/integrations/slack_integration.py
46
+ src/integrations/slack_oauth.py
47
+ src/ml/__init__.py
48
+ src/ml/anomaly_detector.py
49
+ src/notifications/email_templates.py
50
+ src/setup/ai_setup.py
51
+ src/setup/supabase_setup.py
52
+ src/tools/chaos_engineering_tools.py
53
+ src/tools/custom_health_check_tool.py
54
+ src/tools/ssl_certificate_monitor.py
55
+ tests/test_anomaly_detector.py
56
+ tests/test_auth_service.py
57
+ tests/test_cli_auth.py
58
+ tests/test_incident_memory.py
59
+ tests/test_quick_health_check.py
60
+ tests/test_rate_limiter.py
61
+ tests/test_slack.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ sentinel = src.cli.main:cli
@@ -0,0 +1,18 @@
1
+ click>=8.0
2
+ rich>=13.0
3
+ httpx>=0.25
4
+ aiohttp>=3.9
5
+ python-dotenv>=1.0
6
+ supabase>=2.0
7
+
8
+ [ai]
9
+ openai>=1.0
10
+ anthropic>=0.18
11
+
12
+ [all]
13
+ devops-sentinel[ai,dev]
14
+
15
+ [dev]
16
+ pytest>=7.0
17
+ pytest-asyncio>=0.21
18
+ pytest-cov>=4.0
@@ -0,0 +1,75 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "devops-sentinel"
7
+ version = "0.1.0"
8
+ description = "Autonomous SRE agents that watch your services, detect anomalies, and generate blameless postmortems"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ authors = [
12
+ {name = "jagadeep.mamidi", email = "jagadeep.mamidi@gmail.com"}
13
+ ]
14
+ keywords = ["devops", "sre", "monitoring", "incident-management", "ai", "postmortem"]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Environment :: Console",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: System Administrators",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: System :: Monitoring",
26
+ "Topic :: System :: Systems Administration",
27
+ ]
28
+ requires-python = ">=3.10"
29
+
30
+ dependencies = [
31
+ "click>=8.0",
32
+ "rich>=13.0",
33
+ "httpx>=0.25",
34
+ "aiohttp>=3.9",
35
+ "python-dotenv>=1.0",
36
+ "supabase>=2.0",
37
+ ]
38
+
39
+ [project.optional-dependencies]
40
+ dev = [
41
+ "pytest>=7.0",
42
+ "pytest-asyncio>=0.21",
43
+ "pytest-cov>=4.0",
44
+ ]
45
+ ai = [
46
+ "openai>=1.0",
47
+ "anthropic>=0.18",
48
+ ]
49
+ all = [
50
+ "devops-sentinel[dev,ai]",
51
+ ]
52
+
53
+ [project.scripts]
54
+ sentinel = "src.cli.main:cli"
55
+
56
+ [project.urls]
57
+ Homepage = "https://github.com/devops-sentinel/devops-sentinel"
58
+ Documentation = "https://devops-sentinel.dev/docs"
59
+ Repository = "https://github.com/devops-sentinel/devops-sentinel"
60
+ Issues = "https://github.com/devops-sentinel/devops-sentinel/issues"
61
+
62
+ [tool.setuptools]
63
+ packages = ["src", "src.cli", "src.core", "src.api", "src.auth", "src.integrations", "src.ml", "src.notifications", "src.setup", "src.tools"]
64
+
65
+ [tool.setuptools.package-data]
66
+ "*" = ["*.json", "*.yaml", "*.yml"]
67
+
68
+ [tool.pytest.ini_options]
69
+ testpaths = ["tests"]
70
+ asyncio_mode = "auto"
71
+ addopts = "-v --tb=short"
72
+
73
+ [tool.ruff]
74
+ line-length = 100
75
+ target-version = "py310"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """DevOps Sentinel - Autonomous SRE Agents"""
2
+
3
+ __version__ = "0.1.0"