Skip to content

feat: add @lde/sparql-monitor package#37

Merged
ddeboer merged 1 commit into
mainfrom
feat/sparql-monitor
Jan 20, 2026
Merged

feat: add @lde/sparql-monitor package#37
ddeboer merged 1 commit into
mainfrom
feat/sparql-monitor

Conversation

@ddeboer
Copy link
Copy Markdown
Member

@ddeboer ddeboer commented Jan 19, 2026

Summary

Add a new package for monitoring SPARQL endpoints with periodic checks, storing observations in PostgreSQL.

  • MonitorService — orchestrates periodic monitoring with configurable interval
  • PostgresObservationStore — stores observations using Drizzle ORM with automatic schema management via pushSchema
  • SparqlMonitor — executes SPARQL queries (ASK, SELECT, CONSTRUCT) and measures response time
  • Materialized view (latest_observations) for efficient queries of the most recent observation per monitor

Usage

const store = await PostgresObservationStore.create('postgres://...');
const service = new MonitorService({
  store,
  monitors: [{ identifier: 'dbpedia', endpointUrl: new URL('...'), query: 'ASK {...}' }],
  intervalSeconds: 300,
});
service.start();

* Monitor SPARQL endpoints with periodic checks
* Store observations in PostgreSQL using Drizzle ORM
* Use pushSchema from drizzle-kit/api for schema management
* Static factory method PostgresObservationStore.create() for safe initialization
* Materialized view for efficient latest observation queries
@ddeboer ddeboer force-pushed the feat/sparql-monitor branch from 73332c4 to 4658172 Compare January 20, 2026 17:17
@ddeboer ddeboer merged commit 34d9eb0 into main Jan 20, 2026
1 check passed
@ddeboer ddeboer deleted the feat/sparql-monitor branch January 20, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant