devops-sentinel 0.1.2__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.
- devops_sentinel-0.1.2/PKG-INFO +201 -0
- devops_sentinel-0.1.2/README.md +161 -0
- devops_sentinel-0.1.2/devops_sentinel.egg-info/PKG-INFO +201 -0
- devops_sentinel-0.1.2/devops_sentinel.egg-info/SOURCES.txt +61 -0
- devops_sentinel-0.1.2/devops_sentinel.egg-info/dependency_links.txt +1 -0
- devops_sentinel-0.1.2/devops_sentinel.egg-info/entry_points.txt +2 -0
- devops_sentinel-0.1.2/devops_sentinel.egg-info/requires.txt +18 -0
- devops_sentinel-0.1.2/devops_sentinel.egg-info/top_level.txt +1 -0
- devops_sentinel-0.1.2/pyproject.toml +75 -0
- devops_sentinel-0.1.2/setup.cfg +4 -0
- devops_sentinel-0.1.2/src/__init__.py +3 -0
- devops_sentinel-0.1.2/src/api/gdpr_endpoints.py +404 -0
- devops_sentinel-0.1.2/src/api/quick_health_check.py +296 -0
- devops_sentinel-0.1.2/src/api/waitlist.py +166 -0
- devops_sentinel-0.1.2/src/auth/auth_helper.py +198 -0
- devops_sentinel-0.1.2/src/auth/auth_service.py +431 -0
- devops_sentinel-0.1.2/src/cli/__init__.py +5 -0
- devops_sentinel-0.1.2/src/cli/auth.py +456 -0
- devops_sentinel-0.1.2/src/cli/db.py +212 -0
- devops_sentinel-0.1.2/src/cli/main.py +436 -0
- devops_sentinel-0.1.2/src/cli/projects.py +109 -0
- devops_sentinel-0.1.2/src/cli/services.py +164 -0
- devops_sentinel-0.1.2/src/core/__init__.py +30 -0
- devops_sentinel-0.1.2/src/core/alert_explainer.py +370 -0
- devops_sentinel-0.1.2/src/core/alert_router.py +300 -0
- devops_sentinel-0.1.2/src/core/anomaly_detector.py +375 -0
- devops_sentinel-0.1.2/src/core/auto_runbook_executor.py +492 -0
- devops_sentinel-0.1.2/src/core/baseline_monitor.py +301 -0
- devops_sentinel-0.1.2/src/core/byok_tier.py +168 -0
- devops_sentinel-0.1.2/src/core/classifier.py +275 -0
- devops_sentinel-0.1.2/src/core/cost_tracker.py +324 -0
- devops_sentinel-0.1.2/src/core/dependency_analyzer.py +388 -0
- devops_sentinel-0.1.2/src/core/deployment_correlator.py +401 -0
- devops_sentinel-0.1.2/src/core/incident_memory.py +436 -0
- devops_sentinel-0.1.2/src/core/on_call_manager.py +407 -0
- devops_sentinel-0.1.2/src/core/postmortem_generator.py +373 -0
- devops_sentinel-0.1.2/src/core/rate_limiter.py +337 -0
- devops_sentinel-0.1.2/src/core/runbook_matcher.py +416 -0
- devops_sentinel-0.1.2/src/core/service_map_generator.py +395 -0
- devops_sentinel-0.1.2/src/core/team_assignment_system.py +368 -0
- devops_sentinel-0.1.2/src/integrations/email_notification_system.py +464 -0
- devops_sentinel-0.1.2/src/integrations/github_oauth.py +168 -0
- devops_sentinel-0.1.2/src/integrations/integrations_hub.py +182 -0
- devops_sentinel-0.1.2/src/integrations/pagerduty_integration.py +314 -0
- devops_sentinel-0.1.2/src/integrations/pagerduty_oauth.py +162 -0
- devops_sentinel-0.1.2/src/integrations/slack.py +458 -0
- devops_sentinel-0.1.2/src/integrations/slack_integration.py +425 -0
- devops_sentinel-0.1.2/src/integrations/slack_oauth.py +295 -0
- devops_sentinel-0.1.2/src/ml/__init__.py +10 -0
- devops_sentinel-0.1.2/src/ml/anomaly_detector.py +336 -0
- devops_sentinel-0.1.2/src/notifications/email_templates.py +508 -0
- devops_sentinel-0.1.2/src/setup/ai_setup.py +187 -0
- devops_sentinel-0.1.2/src/setup/supabase_setup.py +295 -0
- devops_sentinel-0.1.2/src/tools/chaos_engineering_tools.py +448 -0
- devops_sentinel-0.1.2/src/tools/custom_health_check_tool.py +317 -0
- devops_sentinel-0.1.2/src/tools/ssl_certificate_monitor.py +221 -0
- devops_sentinel-0.1.2/tests/test_anomaly_detector.py +249 -0
- devops_sentinel-0.1.2/tests/test_auth_service.py +213 -0
- devops_sentinel-0.1.2/tests/test_cli_auth.py +134 -0
- devops_sentinel-0.1.2/tests/test_incident_memory.py +290 -0
- devops_sentinel-0.1.2/tests/test_quick_health_check.py +248 -0
- devops_sentinel-0.1.2/tests/test_rate_limiter.py +189 -0
- devops_sentinel-0.1.2/tests/test_slack.py +329 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devops-sentinel
|
|
3
|
+
Version: 0.1.2
|
|
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/jagadeepmamidi/devops-sentinel
|
|
8
|
+
Project-URL: Documentation, https://devops-sentinel-i2ygm8zfs-jagadeeps-projects-10f14bee.vercel.app/
|
|
9
|
+
Project-URL: Repository, https://github.com/jagadeepmamidi/devops-sentinel
|
|
10
|
+
Project-URL: Issues, https://github.com/jagadeepmamidi/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
|
+
[](https://pypi.org/project/devops-sentinel/)
|
|
44
|
+
[](https://www.python.org/downloads/)
|
|
45
|
+
[](https://opensource.org/licenses/MIT)
|
|
46
|
+
|
|
47
|
+
**Autonomous SRE Agent System** - Reduce Mean Time to Detection (MTTD) from minutes to under 10 seconds.
|
|
48
|
+
|
|
49
|
+
**[Install from PyPI](https://pypi.org/project/devops-sentinel/)** | [Documentation](https://devops-sentinel-i2ygm8zfs-jagadeeps-projects-10f14bee.vercel.app/) | [GitHub](https://github.com/jagadeepmamidi/devops-sentinel)
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
|
|
53
|
+
- **Continuous Monitoring** - Health checks at configurable intervals
|
|
54
|
+
- **Multi-Agent Analysis** - CrewAI-powered investigation and root cause analysis
|
|
55
|
+
- **AI Postmortems** - Automated incident documentation
|
|
56
|
+
- **Incident Memory** - Learn from past incidents with similarity matching
|
|
57
|
+
- **Real-time Dashboard** - WebSocket-powered live updates
|
|
58
|
+
- **CLI Interface** - Terminal-first developer experience
|
|
59
|
+
- **Privacy-First** - No telemetry, transparent data handling
|
|
60
|
+
|
|
61
|
+
## Architecture
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
65
|
+
│ DevOps Sentinel │
|
|
66
|
+
├─────────────────────────────────────────────────────────────┤
|
|
67
|
+
│ CLI (Typer) │ API (FastAPI) │ Dashboard (WebSocket) │
|
|
68
|
+
├─────────────────────────────────────────────────────────────┤
|
|
69
|
+
│ Monitoring Orchestrator │
|
|
70
|
+
├─────────────────────────────────────────────────────────────┤
|
|
71
|
+
│ Watcher Agent │ Triage Agent │ Investigator │ Strategist │
|
|
72
|
+
├─────────────────────────────────────────────────────────────┤
|
|
73
|
+
│ Health Check │ Slack Alert │ Log Analysis │ DB Health │
|
|
74
|
+
├─────────────────────────────────────────────────────────────┤
|
|
75
|
+
│ Supabase (Persistence) │ OpenRouter (LLM) │ Slack │
|
|
76
|
+
└─────────────────────────────────────────────────────────────┘
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Installation
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Install from PyPI (recommended)
|
|
83
|
+
pip install devops-sentinel
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### For Developers
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Clone the repository
|
|
90
|
+
git clone https://github.com/jagadeepmamidi/devops-sentinel.git
|
|
91
|
+
cd devops-sentinel
|
|
92
|
+
|
|
93
|
+
# Create virtual environment
|
|
94
|
+
python -m venv venv
|
|
95
|
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
|
96
|
+
|
|
97
|
+
# Install in editable mode for development
|
|
98
|
+
pip install -e .
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Quick Start
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Login to DevOps Sentinel
|
|
105
|
+
sentinel login
|
|
106
|
+
|
|
107
|
+
# Check a service health
|
|
108
|
+
sentinel health https://api.example.com
|
|
109
|
+
|
|
110
|
+
# Monitor a service continuously
|
|
111
|
+
sentinel monitor https://api.example.com/health
|
|
112
|
+
|
|
113
|
+
# View your projects
|
|
114
|
+
sentinel projects list
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## CLI Commands
|
|
118
|
+
|
|
119
|
+
| Command | Description |
|
|
120
|
+
|---------|-------------|
|
|
121
|
+
| `sentinel init` | Interactive configuration setup |
|
|
122
|
+
| `sentinel monitor <url>` | Monitor a service URL |
|
|
123
|
+
| `sentinel status` | Show monitored services |
|
|
124
|
+
| `sentinel incidents` | List recent incidents |
|
|
125
|
+
| `sentinel postmortem <id>` | View incident postmortem |
|
|
126
|
+
| `sentinel serve` | Start dashboard server |
|
|
127
|
+
| `sentinel lint <path>` | Run pre-deploy checks |
|
|
128
|
+
|
|
129
|
+
## Configuration
|
|
130
|
+
|
|
131
|
+
Create a `.env` file or run `sentinel init`:
|
|
132
|
+
|
|
133
|
+
```env
|
|
134
|
+
OPENROUTER_API_KEY=your_key_here
|
|
135
|
+
DEFAULT_MODEL=google/gemini-pro
|
|
136
|
+
SUPABASE_URL=https://your-project.supabase.co
|
|
137
|
+
SUPABASE_KEY=your_anon_key
|
|
138
|
+
SLACK_WEBHOOK_URL=https://hooks.slack.com/...
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Docker Deployment
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Build and run
|
|
145
|
+
docker-compose up -d
|
|
146
|
+
|
|
147
|
+
# View logs
|
|
148
|
+
docker-compose logs -f sentinel
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## How It Works
|
|
152
|
+
|
|
153
|
+
1. **Watcher Agent** continuously monitors service health endpoints
|
|
154
|
+
2. On failure, **First Responder** sends a Slack alert
|
|
155
|
+
3. **Investigator** analyzes logs, deployments, and database status
|
|
156
|
+
4. **Strategist** creates a prioritized action plan
|
|
157
|
+
5. AI generates a structured postmortem saved to Supabase
|
|
158
|
+
|
|
159
|
+
## Privacy
|
|
160
|
+
|
|
161
|
+
- All data stays local or in YOUR Supabase instance
|
|
162
|
+
- No telemetry or external data collection
|
|
163
|
+
- Use `--privacy` flag to see exactly what data is processed
|
|
164
|
+
- OpenRouter calls only contain health check context (no PII)
|
|
165
|
+
|
|
166
|
+
## Supabase Schema
|
|
167
|
+
|
|
168
|
+
```sql
|
|
169
|
+
-- Run these in your Supabase SQL editor
|
|
170
|
+
CREATE TABLE services (
|
|
171
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
172
|
+
name TEXT NOT NULL,
|
|
173
|
+
url TEXT NOT NULL,
|
|
174
|
+
check_interval INTEGER DEFAULT 10,
|
|
175
|
+
is_active BOOLEAN DEFAULT true,
|
|
176
|
+
created_at TIMESTAMPTZ DEFAULT now()
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
CREATE TABLE incidents (
|
|
180
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
181
|
+
service_id UUID REFERENCES services(id),
|
|
182
|
+
status TEXT DEFAULT 'detecting',
|
|
183
|
+
detected_at TIMESTAMPTZ DEFAULT now(),
|
|
184
|
+
resolved_at TIMESTAMPTZ,
|
|
185
|
+
mttd_seconds FLOAT,
|
|
186
|
+
postmortem TEXT
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
CREATE TABLE health_checks (
|
|
190
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
191
|
+
service_id UUID REFERENCES services(id),
|
|
192
|
+
status_code INTEGER,
|
|
193
|
+
response_time_ms FLOAT,
|
|
194
|
+
is_healthy BOOLEAN,
|
|
195
|
+
checked_at TIMESTAMPTZ DEFAULT now()
|
|
196
|
+
);
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
MIT License
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# DevOps Sentinel
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/devops-sentinel/)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
**Autonomous SRE Agent System** - Reduce Mean Time to Detection (MTTD) from minutes to under 10 seconds.
|
|
8
|
+
|
|
9
|
+
**[Install from PyPI](https://pypi.org/project/devops-sentinel/)** | [Documentation](https://devops-sentinel-i2ygm8zfs-jagadeeps-projects-10f14bee.vercel.app/) | [GitHub](https://github.com/jagadeepmamidi/devops-sentinel)
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Continuous Monitoring** - Health checks at configurable intervals
|
|
14
|
+
- **Multi-Agent Analysis** - CrewAI-powered investigation and root cause analysis
|
|
15
|
+
- **AI Postmortems** - Automated incident documentation
|
|
16
|
+
- **Incident Memory** - Learn from past incidents with similarity matching
|
|
17
|
+
- **Real-time Dashboard** - WebSocket-powered live updates
|
|
18
|
+
- **CLI Interface** - Terminal-first developer experience
|
|
19
|
+
- **Privacy-First** - No telemetry, transparent data handling
|
|
20
|
+
|
|
21
|
+
## Architecture
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
25
|
+
│ DevOps Sentinel │
|
|
26
|
+
├─────────────────────────────────────────────────────────────┤
|
|
27
|
+
│ CLI (Typer) │ API (FastAPI) │ Dashboard (WebSocket) │
|
|
28
|
+
├─────────────────────────────────────────────────────────────┤
|
|
29
|
+
│ Monitoring Orchestrator │
|
|
30
|
+
├─────────────────────────────────────────────────────────────┤
|
|
31
|
+
│ Watcher Agent │ Triage Agent │ Investigator │ Strategist │
|
|
32
|
+
├─────────────────────────────────────────────────────────────┤
|
|
33
|
+
│ Health Check │ Slack Alert │ Log Analysis │ DB Health │
|
|
34
|
+
├─────────────────────────────────────────────────────────────┤
|
|
35
|
+
│ Supabase (Persistence) │ OpenRouter (LLM) │ Slack │
|
|
36
|
+
└─────────────────────────────────────────────────────────────┘
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Install from PyPI (recommended)
|
|
43
|
+
pip install devops-sentinel
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### For Developers
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Clone the repository
|
|
50
|
+
git clone https://github.com/jagadeepmamidi/devops-sentinel.git
|
|
51
|
+
cd devops-sentinel
|
|
52
|
+
|
|
53
|
+
# Create virtual environment
|
|
54
|
+
python -m venv venv
|
|
55
|
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
|
56
|
+
|
|
57
|
+
# Install in editable mode for development
|
|
58
|
+
pip install -e .
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Quick Start
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Login to DevOps Sentinel
|
|
65
|
+
sentinel login
|
|
66
|
+
|
|
67
|
+
# Check a service health
|
|
68
|
+
sentinel health https://api.example.com
|
|
69
|
+
|
|
70
|
+
# Monitor a service continuously
|
|
71
|
+
sentinel monitor https://api.example.com/health
|
|
72
|
+
|
|
73
|
+
# View your projects
|
|
74
|
+
sentinel projects list
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## CLI Commands
|
|
78
|
+
|
|
79
|
+
| Command | Description |
|
|
80
|
+
|---------|-------------|
|
|
81
|
+
| `sentinel init` | Interactive configuration setup |
|
|
82
|
+
| `sentinel monitor <url>` | Monitor a service URL |
|
|
83
|
+
| `sentinel status` | Show monitored services |
|
|
84
|
+
| `sentinel incidents` | List recent incidents |
|
|
85
|
+
| `sentinel postmortem <id>` | View incident postmortem |
|
|
86
|
+
| `sentinel serve` | Start dashboard server |
|
|
87
|
+
| `sentinel lint <path>` | Run pre-deploy checks |
|
|
88
|
+
|
|
89
|
+
## Configuration
|
|
90
|
+
|
|
91
|
+
Create a `.env` file or run `sentinel init`:
|
|
92
|
+
|
|
93
|
+
```env
|
|
94
|
+
OPENROUTER_API_KEY=your_key_here
|
|
95
|
+
DEFAULT_MODEL=google/gemini-pro
|
|
96
|
+
SUPABASE_URL=https://your-project.supabase.co
|
|
97
|
+
SUPABASE_KEY=your_anon_key
|
|
98
|
+
SLACK_WEBHOOK_URL=https://hooks.slack.com/...
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Docker Deployment
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Build and run
|
|
105
|
+
docker-compose up -d
|
|
106
|
+
|
|
107
|
+
# View logs
|
|
108
|
+
docker-compose logs -f sentinel
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## How It Works
|
|
112
|
+
|
|
113
|
+
1. **Watcher Agent** continuously monitors service health endpoints
|
|
114
|
+
2. On failure, **First Responder** sends a Slack alert
|
|
115
|
+
3. **Investigator** analyzes logs, deployments, and database status
|
|
116
|
+
4. **Strategist** creates a prioritized action plan
|
|
117
|
+
5. AI generates a structured postmortem saved to Supabase
|
|
118
|
+
|
|
119
|
+
## Privacy
|
|
120
|
+
|
|
121
|
+
- All data stays local or in YOUR Supabase instance
|
|
122
|
+
- No telemetry or external data collection
|
|
123
|
+
- Use `--privacy` flag to see exactly what data is processed
|
|
124
|
+
- OpenRouter calls only contain health check context (no PII)
|
|
125
|
+
|
|
126
|
+
## Supabase Schema
|
|
127
|
+
|
|
128
|
+
```sql
|
|
129
|
+
-- Run these in your Supabase SQL editor
|
|
130
|
+
CREATE TABLE services (
|
|
131
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
132
|
+
name TEXT NOT NULL,
|
|
133
|
+
url TEXT NOT NULL,
|
|
134
|
+
check_interval INTEGER DEFAULT 10,
|
|
135
|
+
is_active BOOLEAN DEFAULT true,
|
|
136
|
+
created_at TIMESTAMPTZ DEFAULT now()
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
CREATE TABLE incidents (
|
|
140
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
141
|
+
service_id UUID REFERENCES services(id),
|
|
142
|
+
status TEXT DEFAULT 'detecting',
|
|
143
|
+
detected_at TIMESTAMPTZ DEFAULT now(),
|
|
144
|
+
resolved_at TIMESTAMPTZ,
|
|
145
|
+
mttd_seconds FLOAT,
|
|
146
|
+
postmortem TEXT
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
CREATE TABLE health_checks (
|
|
150
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
151
|
+
service_id UUID REFERENCES services(id),
|
|
152
|
+
status_code INTEGER,
|
|
153
|
+
response_time_ms FLOAT,
|
|
154
|
+
is_healthy BOOLEAN,
|
|
155
|
+
checked_at TIMESTAMPTZ DEFAULT now()
|
|
156
|
+
);
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## License
|
|
160
|
+
|
|
161
|
+
MIT License
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devops-sentinel
|
|
3
|
+
Version: 0.1.2
|
|
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/jagadeepmamidi/devops-sentinel
|
|
8
|
+
Project-URL: Documentation, https://devops-sentinel-i2ygm8zfs-jagadeeps-projects-10f14bee.vercel.app/
|
|
9
|
+
Project-URL: Repository, https://github.com/jagadeepmamidi/devops-sentinel
|
|
10
|
+
Project-URL: Issues, https://github.com/jagadeepmamidi/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
|
+
[](https://pypi.org/project/devops-sentinel/)
|
|
44
|
+
[](https://www.python.org/downloads/)
|
|
45
|
+
[](https://opensource.org/licenses/MIT)
|
|
46
|
+
|
|
47
|
+
**Autonomous SRE Agent System** - Reduce Mean Time to Detection (MTTD) from minutes to under 10 seconds.
|
|
48
|
+
|
|
49
|
+
**[Install from PyPI](https://pypi.org/project/devops-sentinel/)** | [Documentation](https://devops-sentinel-i2ygm8zfs-jagadeeps-projects-10f14bee.vercel.app/) | [GitHub](https://github.com/jagadeepmamidi/devops-sentinel)
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
|
|
53
|
+
- **Continuous Monitoring** - Health checks at configurable intervals
|
|
54
|
+
- **Multi-Agent Analysis** - CrewAI-powered investigation and root cause analysis
|
|
55
|
+
- **AI Postmortems** - Automated incident documentation
|
|
56
|
+
- **Incident Memory** - Learn from past incidents with similarity matching
|
|
57
|
+
- **Real-time Dashboard** - WebSocket-powered live updates
|
|
58
|
+
- **CLI Interface** - Terminal-first developer experience
|
|
59
|
+
- **Privacy-First** - No telemetry, transparent data handling
|
|
60
|
+
|
|
61
|
+
## Architecture
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
65
|
+
│ DevOps Sentinel │
|
|
66
|
+
├─────────────────────────────────────────────────────────────┤
|
|
67
|
+
│ CLI (Typer) │ API (FastAPI) │ Dashboard (WebSocket) │
|
|
68
|
+
├─────────────────────────────────────────────────────────────┤
|
|
69
|
+
│ Monitoring Orchestrator │
|
|
70
|
+
├─────────────────────────────────────────────────────────────┤
|
|
71
|
+
│ Watcher Agent │ Triage Agent │ Investigator │ Strategist │
|
|
72
|
+
├─────────────────────────────────────────────────────────────┤
|
|
73
|
+
│ Health Check │ Slack Alert │ Log Analysis │ DB Health │
|
|
74
|
+
├─────────────────────────────────────────────────────────────┤
|
|
75
|
+
│ Supabase (Persistence) │ OpenRouter (LLM) │ Slack │
|
|
76
|
+
└─────────────────────────────────────────────────────────────┘
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Installation
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Install from PyPI (recommended)
|
|
83
|
+
pip install devops-sentinel
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### For Developers
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Clone the repository
|
|
90
|
+
git clone https://github.com/jagadeepmamidi/devops-sentinel.git
|
|
91
|
+
cd devops-sentinel
|
|
92
|
+
|
|
93
|
+
# Create virtual environment
|
|
94
|
+
python -m venv venv
|
|
95
|
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
|
96
|
+
|
|
97
|
+
# Install in editable mode for development
|
|
98
|
+
pip install -e .
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Quick Start
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Login to DevOps Sentinel
|
|
105
|
+
sentinel login
|
|
106
|
+
|
|
107
|
+
# Check a service health
|
|
108
|
+
sentinel health https://api.example.com
|
|
109
|
+
|
|
110
|
+
# Monitor a service continuously
|
|
111
|
+
sentinel monitor https://api.example.com/health
|
|
112
|
+
|
|
113
|
+
# View your projects
|
|
114
|
+
sentinel projects list
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## CLI Commands
|
|
118
|
+
|
|
119
|
+
| Command | Description |
|
|
120
|
+
|---------|-------------|
|
|
121
|
+
| `sentinel init` | Interactive configuration setup |
|
|
122
|
+
| `sentinel monitor <url>` | Monitor a service URL |
|
|
123
|
+
| `sentinel status` | Show monitored services |
|
|
124
|
+
| `sentinel incidents` | List recent incidents |
|
|
125
|
+
| `sentinel postmortem <id>` | View incident postmortem |
|
|
126
|
+
| `sentinel serve` | Start dashboard server |
|
|
127
|
+
| `sentinel lint <path>` | Run pre-deploy checks |
|
|
128
|
+
|
|
129
|
+
## Configuration
|
|
130
|
+
|
|
131
|
+
Create a `.env` file or run `sentinel init`:
|
|
132
|
+
|
|
133
|
+
```env
|
|
134
|
+
OPENROUTER_API_KEY=your_key_here
|
|
135
|
+
DEFAULT_MODEL=google/gemini-pro
|
|
136
|
+
SUPABASE_URL=https://your-project.supabase.co
|
|
137
|
+
SUPABASE_KEY=your_anon_key
|
|
138
|
+
SLACK_WEBHOOK_URL=https://hooks.slack.com/...
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Docker Deployment
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Build and run
|
|
145
|
+
docker-compose up -d
|
|
146
|
+
|
|
147
|
+
# View logs
|
|
148
|
+
docker-compose logs -f sentinel
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## How It Works
|
|
152
|
+
|
|
153
|
+
1. **Watcher Agent** continuously monitors service health endpoints
|
|
154
|
+
2. On failure, **First Responder** sends a Slack alert
|
|
155
|
+
3. **Investigator** analyzes logs, deployments, and database status
|
|
156
|
+
4. **Strategist** creates a prioritized action plan
|
|
157
|
+
5. AI generates a structured postmortem saved to Supabase
|
|
158
|
+
|
|
159
|
+
## Privacy
|
|
160
|
+
|
|
161
|
+
- All data stays local or in YOUR Supabase instance
|
|
162
|
+
- No telemetry or external data collection
|
|
163
|
+
- Use `--privacy` flag to see exactly what data is processed
|
|
164
|
+
- OpenRouter calls only contain health check context (no PII)
|
|
165
|
+
|
|
166
|
+
## Supabase Schema
|
|
167
|
+
|
|
168
|
+
```sql
|
|
169
|
+
-- Run these in your Supabase SQL editor
|
|
170
|
+
CREATE TABLE services (
|
|
171
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
172
|
+
name TEXT NOT NULL,
|
|
173
|
+
url TEXT NOT NULL,
|
|
174
|
+
check_interval INTEGER DEFAULT 10,
|
|
175
|
+
is_active BOOLEAN DEFAULT true,
|
|
176
|
+
created_at TIMESTAMPTZ DEFAULT now()
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
CREATE TABLE incidents (
|
|
180
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
181
|
+
service_id UUID REFERENCES services(id),
|
|
182
|
+
status TEXT DEFAULT 'detecting',
|
|
183
|
+
detected_at TIMESTAMPTZ DEFAULT now(),
|
|
184
|
+
resolved_at TIMESTAMPTZ,
|
|
185
|
+
mttd_seconds FLOAT,
|
|
186
|
+
postmortem TEXT
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
CREATE TABLE health_checks (
|
|
190
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
191
|
+
service_id UUID REFERENCES services(id),
|
|
192
|
+
status_code INTEGER,
|
|
193
|
+
response_time_ms FLOAT,
|
|
194
|
+
is_healthy BOOLEAN,
|
|
195
|
+
checked_at TIMESTAMPTZ DEFAULT now()
|
|
196
|
+
);
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
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 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
src
|