Monoscope is a powerful monitoring and observability platform that leverages LLMs to intelligently identify anomalies in your systems. With efficient data storage to S3-compatible buckets and real-time analytics powered by our custom timefusion storage engine, Monoscope provides deep insights into your infrastructure and applications.
- Features
- Getting Started
- Prerequisites
- Installation
- Development Setup
- Testing
- Useful Links
- Contributing
- License
- π€ AI-Powered Anomaly Detection: Leverages LLMs to automatically identify and alert on unusual patterns
- βοΈ S3-Compatible Storage: Store logs, metrics and traces in any S3-compatible object storage
- π High Performance: Written in Haskell and rust for reliability and performance
- π Real-Time Analytics: Monitor your systems with minimal latency
- π Extensible: Easy to integrate with existing monitoring infrastructure
Before installing Monoscope, ensure you have the following dependencies:
- Haskell: Install via GHCup
- PostgreSQL with TimescaleDB: For time-series data storage
- LLVM: Required for compilation
- Google Cloud SDK: For GCP integration (if using GCP)
- Install Haskell via GHCup
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
- Clone the Repository
git clone https://github.com/apitoolkit/apitoolkit-server.git monoscope
cd monoscope
- Install System Dependencies
For macOS:
# Install LLVM
brew install llvm
# Install PostgreSQL with TimescaleDB
brew install postgresql
brew install timescaledb
# Install libpq
brew install libpq
For Linux (Ubuntu/Debian):
# Install LLVM
sudo apt-get install llvm
# Install PostgreSQL and TimescaleDB
# Follow instructions at: https://docs.timescale.com/install/latest/
# Install libpq
sudo apt-get install libpq-dev
- Configure Google Cloud (Optional)
If using Google Cloud integration:
gcloud auth application-default login
- Run Monoscope
stack run
- Create a Docker volume for PostgreSQL data:
docker volume create pgdata
- Run TimescaleDB in Docker:
make timescaledb-docker
- Configure pg_cron extension:
Add the following to your PostgreSQL configuration:
ALTER system SET cron.database_name = 'apitoolkit';
ALTER system SET shared_preload_libraries = 'pg_cron';
Then restart the TimescaleDB Docker container.
Install code formatting and linting tools:
# Code formatter
brew install ormolu
# Linter
brew install hlint
Useful commands:
# Format code
make fmt
# Run linter
make lint
π‘ Tip: For better IDE support, compile Haskell Language Server locally to avoid crashes, especially on macOS. See issue #2391.
To build the service worker:
workbox generateSW workbox-config.js
make test
# OR
stack test --ghc-options=-w
Unit tests don't require a database connection and run much faster. They include doctests and pure function tests.
make test-unit
# OR
stack test apitoolkit-server:unit-tests --ghc-options=-w
make live-test-unit
# OR
stack test apitoolkit-server:unit-tests --ghc-options=-w --file-watch
stack test --test-arguments "--match=SeedingConfig" apitoolkit-server:tests
# OR
stack test --ta "--match=SeedingConfig" apitoolkit-server:tests
- Manual Data Ingestion: Available at
/p/<project-id>/manual_ingest
(development only) - Inspiration: Lightstep, Datadog, Instana
- Useful Reading: Build reload feedback cycle in Haskell
We welcome contributions to Monoscope! Please feel free to:
- Report bugs and request features via GitHub Issues
- Submit pull requests for bug fixes and new features
- Improve documentation and examples
- Share your use cases and feedback
Before contributing, please read our contributing guidelines and ensure your code passes all tests and linting checks.
Monoscope is open source software. Please see the LICENSE file for details.