Static snapshot triggers are one of the easiest triggers to use in the system and require very little configuration, except for the snapshot itself.


The snapshot trigger works by comparing a snapshot of your data set agaisnt the current execution of the monitor.  For example, a monitor containing a simple SQL statement such as "SELECT * FROM sys.tables" will returns all tables in a database for Microsoft SQL Server.  Clicking the "Take Snapshot" button on the monitor view or selecting the "Take Snapshot on Save" checkbox on the monitor edit page will record a snapshot of the data returned from the query into the database.  If the monitor were then scheduled to run every day it would attempt to compare the current results of the query to the saved snaphot data that was previously taken, in this case an alert will be sent out anytime a new table is created in the database.


NOTE: internally the comparison is performed using a hash of the row-columnar data, the order of items in the result set does not matter.  The comparison will also report if the row counts are different between the snapshot and current execution.




Options:

  • Min Row Differences
    • Minimum number of rows allowed to return from the query
  • Max Row Differences
    • Maximum number of rows allowed to return from the query
  • Send Notification Once
    • Monitor will only trigger and send a notification one time.  It will send a notification again unless it returns to a passing state and then triggers again.  This reduces the number of notifications that are sent by QuickReportz if for example a monitor is scheduled to run frequently and notifications are not wanted to be sent on every failure.
  • Use Rolling Snapshots
    • A new snapshot will be taken automatically when the monitor triggers.  This will cause the monitor to automatically return itself to a passing state after a trigger.  This is useful when you want to monitor data in to the database and report on changes, but not necessarily consider it as "something went wrong", just report on the change and consider that the new norm.
  • Take Snapshot on Save
    • Select this option to have QuickReportz take a current snapshot at the same time the monitor is saved, by clicking the "Save" button at the bottom of the page.  NOTE: snapshots can also be taking on the monitor view page by clicking "Take Snapshot"
  • Snapshot
    • This is represents the active snapshot assigned to the monitor.  You can view the raw data in the snapshot by clicking on the date.



Command Text

Static Snapshot Variance triggers only require SQL command text and do not need any column definitions (all columns are monitored automatically).


For example, the following query will return all rows from the books table.


SELECT BookId, Name, Price FROM examples.Books


If a snapshot is taken, and any column value in the query above has a change in value since the time of the snapshot, the monitor will trigger and a notification will be sent.


Column Definitions

To only monitor specified columns see Static Snapshot Column Variance Tirgger