- Ruby 96.8%
- Dockerfile 3%
- Shell 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Gatus returns endpoint results oldest-first, so results.first is the oldest retained ping rather than the current state. An endpoint that failed once and then recovered kept being reported as down until the failure aged out of the results window (~200 samples), which at a 60s interval is over three hours of false CRITICALs for a service that is perfectly healthy. Hit this while fixing the AI Conversation Agent check: the watchdog logged 38 consecutive successes after the endpoint moved to /v1/health, but the report still said "AI Conversation Agent is down (HTTP 415)" because the oldest retained ping was still the pre-fix 415. The existing fixture could not catch this: every endpoint in it is uniformly all-pass or all-fail, where first and last agree by accident. The new fixture includes a recovered endpoint with old failures followed by recent successes, and the ordering test pins the oldest-first contract so this cannot silently come back if Gatus changes it. Verified the new tests fail against the old .first code and pass against the fix. |
||
| bin | ||
| exe | ||
| lib/problems | ||
| sig/problems | ||
| test | ||
| .dockerignore | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .standard.yml | ||
| CHANGELOG.md | ||
| config.sample.yml | ||
| Dockerfile | ||
| Gemfile | ||
| Gemfile.lock | ||
| problems-mcp.gemspec | ||
| Rakefile | ||
| README.md | ||
Problems (MCP)
An MCP server to expose a list of problems in my homelab. That way I can have an interactive conversation about all of the problems my homelab is experiencing.
Supported sources of problems:
- Prometheus alerts via AlertManager
- Kubernetes pod status
- Flux CD Kustomization and HelmRelease
- Healthchecks.io jobs
Installation
Container
docker build -t problems-mcp .
From source
bundle install
bundle exec rake install
Usage
Run the server with the appropriate configuration:
# Using default settings (no sources configured)
bundle exec problems-mcp
# With a custom config file
bundle exec problems-mcp --config config.yml
# Custom host and port
bundle exec problems-mcp --host 127.0.0.1 --port 8080
Configuration
Create a YAML config file with your sources:
# config.yml
# Alertmanager source
- type: alertmanager
name: Alertmanager
api_url: "http://alertmanager:9093/"
group_by: true # Group alerts by labels
# Kubernetes source
- type: kubernetes
name: Kubernetes
kubeconfig_path: ~/.kube/config # Optional, defaults to ~/.kube/config
api_server: https://kubernetes.default.svc # Optional
# Flux source
- type: flux
name: Flux
kubeconfig_path: ~/.kube/config
api_server: https://kubernetes.default.svc
# Healthchecks.io source
- type: healthchecks
name: Healthchecks.io
api_key: "your-api-key-here"
api_url: https://healthchecks.io/api/v1/checks # Optional
A sample config is available at config.sample.yml.
Available Tools
The MCP server exposes the following tools:
| Tool | Description |
|---|---|
list_problems |
List all active problems from all configured sources (optional filters: severity, source) |
get_problems_by_source |
Get problems from a specific source (required: source) |
get_critical_problems |
Get all critical severity problems |
refresh_problems |
Force refresh problems from all sources |
Docker
# Build
docker build -t problems-mcp .
# Run with config
docker run -v $(pwd)/config.yml:/app/config.yml -p 3000:3000 problems-mcp --config /app/config.yml
Development
After checking out the repo, run bin/setup to install dependencies.
Then, run rake test to run the tests.
You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install.
To release a new version, update the version number in version.rb, and then run:
bundle exec rake release
This will create a git tag for the version, push git commits and the created tag.
Contributing
Bug reports, pull requests, and feedback are welcome. This server is highly personalized, so please don't be surprised if I reject your contribution.