Introduction to Isok
Prev     Next

Isok is a PostgreSQL extension for monitoring anything that can be reported with an SQL query. Unlike simply running a query, which reports the existence of questionable data patterns, Isok produces reports alerting you of changes to questionable data patterns, so that only new problems need be reviewed. To use Isok you write SQL queries that produce reports which alert you of questionable data patterns. Then, on a row by row basis, you can defer the appearance of individual alerts on future reports.

Isok's expected usage targets data integrity maintenance and data cleanup. One expected use-case is addressing those corner cases where business logic is "fuzzy" and database content is monitored for unusual but not prohibited activity. There is also a potential use-case for monitoring for errors in data, although it may be best to use constraints and triggers for this purpose because these prevent erroneous data from getting into the database in the first place.

Isok is useful when periodically probing for unusual but allowed activity, such as the addition of a new country code. Or the purchase of more than 1,000 shoes by one person. Approved excessive shoe purchases can be individually flagged so they do not appear in future reports. To avoid being overwhelmed by numerous legitimate alerts and to allow time to resolve issues, specific rows in the reports can be deferred so they do not reappear before a designated date.

In this way, Isok makes practical the monitoring and management of unusual, but sometimes allowed, data patterns.

Unlike triggers and constraints, Isok does nothing until executed. This is done by SELECTing FROM a function, which runs some or all of the saved queries to check the state of the database and report the results. Report content is archived and can be queried.

Reported issues are classified as either errors or warnings. Errors are always reported when Isok is run. After execution, the warnings reported by the user-supplied queries may be manually sorted by the Isok user into one of the following categories: unclassified (the default), labeled resolved, or deferred until a later date. When Isok is run, unclassified warnings are reported, resolved warnings are not reported, and deferred warnings are not reported until the current date reaches the deferral date.

PostgreSQL supports a high degree of introspection. Isok can therefore monitor PostgreSQL itself, both the database engine's operational metrics and database schema design. In the former case system performance or usage might be monitored. In the latter, monitoring might look for things like violations of column naming conventions. However, while there may be legitimate uses of Isok for these sorts of purposes, other tools may be a better fit.

Regardless of how Isok is used, we believe some monitoring and some error checking is better than no monitoring and no error checking. Isok makes monitoring and error checking easy. If introducing triggers into your processing or running a complete performance monitoring solution is just not feasible, Isok provides a simple way to move the ball at least a little bit closer to the goal.


Prev     Next
Isok -- A query centered monitoring tool for PostgreSQL  Home  Installation

Page generated: 2025-06-03T23:39:06-05:00.