metricsGPT
Talk to your metrics.
Installation
Ensure you have Python 3.12+ and Node v20+ locally .
By default this tool uses llama3 and nomic-embed-text.
ollama pull llama3
ollama pull nomic-embed-text
Have some prometheus up and running. You can use make run-prom to get one running in docker that scrapes itself.
You can choose to grab the CLI from https://pypi.org/project/metricsgpt/
pip3 install metricsgpt
metricsGPT --server --config=config.yaml
If building locally you can use Poetry,
poetry install
poetry run metricsGPT --server --config=config.yaml
and visit localhost:8081!
## Configuration
Edit config.yaml to suit your own models/Prometheus/Thanos setups.
# Prometheus Configuration
prometheus_url: "http://localhost:9090"
# prometheus_auth:
# # Basic authentication
# basic_auth:
# username: "your_username"
# password: "your_password"
# # Or Bearer token
# bearer_token: "your_token"
# # Or custom headers
# custom_headers:
# Authorization: "Custom your_auth_header"
# X-Custom-Header: "custom_value"
# # TLS/SSL configuration
# tls:
# cert_file: "/path/to/cert.pem"
# key_file: "/path/to/key.pem"
# skip_verify: false # Set to true to skip
prom_external_url: null # Optional external URL for links in the UI
query_lookback_hours: 1.0
# Storage Configuration
vectordb_path: "./data.db"
series_cache_file: "./series_cache.json"
# Server Configuration
refresh_interval: 900 # VectorDB Refresh interval in seconds
server_host: "0.0.0.0"
server_port: 8081
# LLM Configuration
llm:
provider: "ollama"
model: "llama3.1"
embedding:
provider: "ollama" # or "openai"
model: "nomic-embed-text"
dimension: 768 # optional, defaults to this dimension
# For Azure OpenAI embeddings:
#embedding:
# provider: "azure"
# model: "text-embedding-ada-002"
# deployment_name: "your-embedding-deployment"
# api_key: "your-api-key"
# endpoint: "your-azure-endpoint"
# api_version: "2023-05-15"
# dimension: "dimensions of model"
# For Watson embeddings:
#embedding:
# provider: "watsonx"
# api_key: "your-api-key"
# project_id: "your-project-id"
# model_id: "google/flan-ul2" # optional, defaults to this model
# dimension: "dimensions of model"
# For OpenAI embeddings:
#embedding:
# provider: "openai"
# model: "text-embedding-ada-002"
# api_key: "your-api-key"
# dimension: "dimensions of model"
# Example configurations for different providers:
# For OpenAI:
#llm:
# provider: "openai"
# model: "gpt-4"
# api_key: "your-api-key"
# For Ollama:
#llm:
# provider: "ollama"
# model: "metricsGPT"
# timeout: 120.0
# For Azure:
#llm:
# provider: "azure"
# model: "gpt-4"
# deployment_name: "your-deployment"
# api_key: "your-api-key"
# endpoint: "your-azure-endpoint"
# For Gemini:
#llm:
# provider: "gemini"
# model: "gemini-pro"
# api_key: "your-api-key"
# For WatsonX:
#llm:
# provider: "watsonx"
# api_key: "your-api-key"
# project_id: "your-project-id"
# model_id: "your-model-id"
TODOs:
- Much more efficient vectorDB ops
- Use other Prom HTTP APIs for more context
- Range queries
- Visualize
- Embed query results for better analysis
- Process alerts
Metadata
Release files for metricsgpt 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| metricsgpt-0.3.0.tar.gz | 1.4 MB | Without provenance | Details for metricsgpt-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| metricsgpt-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for metricsgpt-0.3.0-py3-none-any.whl |
Total release size: 2.8 MB
Release files / metricsgpt-0.3.0.tar.gz
| Download URL | metricsgpt-0.3.0.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a57ec3067911d9c45b58fd9d4a97c1f15f4d383b78c50d38df924e719e4202a
|
|
BLAKE2b-256 checksum How to use checksums |
a5a701ed99325d5f00250c21dff00d8330e09a1351552933709a07b6aaa7d77c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.0 CPython/3.13.1 Darwin/23.6.0
|
Release files / metricsgpt-0.3.0-py3-none-any.whl
| Download URL | metricsgpt-0.3.0-py3-none-any.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28e2f48839d99a429ae8c1ef5b87c29dabc7ebef917c5a11ade724edb3666bf6
|
|
BLAKE2b-256 checksum How to use checksums |
f7a28addb49f365ea4e1188ecbae142701e039a890502abcb7468621111bcfcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.0 CPython/3.13.1 Darwin/23.6.0
|
Security for metricsgpt 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.