Screens: Dashboards

Preset gallery

The preset gallery is the window where you pick tiles NeoSQL has prepared for watching a database and add them to a dashboard. Metrics such as sessions and locks, slow queries, storage and uptime come with SQL written for each DBMS. A preset you pick is copied into your own tile, so afterwards you can change it freely in Tile settings.

Where you can use itWebDesktopWithout signing inSigned inLocal projectsAccount projects

What's on the screen

No.NameDescription
1Connection fieldThe connection the presets query. If the dashboard already uses a connection, that one is selected first. Only presets for this connection's DBMS are shown.
2Schema fieldThe database and schema the presets query. The tiles you add keep this target.
3n of m ready labelHow many of the shown presets can run on this connection now.
4Re-check availability buttonChecks availability again. Click it after granting a permission or installing an extension in the database.
5CategoriesCards are grouped in the order of the Sessions, Performance, Storage, Health and Schema quality categories. Categories with no preset for this DBMS are not shown.
6Set cardA card with the set label. Several tiles share the result of one query ('Sets' below).
7Preset cardName, type, default size, default interval and description. An interval shown as manual means it does not run automatically. Heavy queries carry a heavy label.
8Add n selected buttonAdds the selected cards as tiles. Next to it is the Selected presets are copied into your own tiles — app updates will not overwrite your edits. note.
  • When the connection's DBMS has no presets at all, the No presets for … yet. notice appears instead of cards.

Adding tiles from presets

  1. Click the Presets button on the dashboard toolbar. On an empty dashboard you can also click the Start from presets button in the center.
  2. Choose the Connection field and the schema field. The availability check runs for that target.
  3. Click the cards to add. Selected cards get a check mark; click again to deselect. Unavailable cards cannot be clicked.
  4. Click the Add n selected button. The tiles take free slots on the dashboard and run once.
  • Preset tiles come with automatic runs on, at the interval the preset sets. Only presets whose interval is manual come with it off. Heavy presets never come with an interval shorter than 10 minutes, and default to 6 hours.
  • Changing the connection or schema clears every selected card.

Availability check

Session lists and performance statistics can be read only with the right database permissions, extensions and server settings. Metadata does not reveal these, so when the gallery opens and when you change the connection or schema, it actually sends a light one-row query for each preset.

  • The checks are sent one at a time, so opening the gallery does not shake the connection pool.
  • A preset confirmed to work is not asked again while the app is running. Ones that failed are asked again the next time the gallery opens. The Re-check availability button asks them all again.

Typical reasons shown on unavailable cards:

DBMSWhat is needed
PostgreSQLThe pg_stat_statements extension for slow and most-called queries, the pg_monitor role for replication lag, the CREATE privilege or the pg_read_all_stats role for tablespace size
MySQL, MariaDBperformance_schema for slow and most-called queries and blocked sessions (MariaDB has it off by default), the PROCESS privilege for long-running transactions, read access to mysql.user for password expiry (MySQL), and the MySQL 8+ performance_schema replication tables for replication lag
OracleRead access to dynamic performance views such as v$session, v$sql and v$sysstat; DBA views (SELECT_CATALOG_ROLE) for storage
SQL ServerVIEW SERVER STATE for sessions and performance, VIEW DATABASE STATE for storage
SQLiteSQLite 3.16 or later with pragma functions for database size

Presets for each DBMS

CategoryWhat it watchesDBMS
SessionsActive sessions, Live sessionsMariaDB, MySQL, PostgreSQL, Oracle, SQL Server, H2
SessionsBlocked sessionsMariaDB, MySQL, PostgreSQL, Oracle, SQL Server
SessionsConnection usageMariaDB, MySQL, PostgreSQL, Oracle
PerformanceSlowest queries (top 5), Most called queries (top 5), Long-running transactionsMariaDB, MySQL, PostgreSQL, Oracle, SQL Server
PerformanceBuffer / cache hit ratioMariaDB, MySQL, PostgreSQL, Oracle
StorageDatabase sizeMariaDB, MySQL, PostgreSQL, Oracle, SQL Server, SQLite
StorageLargest tables (top 10)MariaDB, MySQL, PostgreSQL, Oracle, SQL Server
StorageIndex / data ratioMariaDB, MySQL, PostgreSQL, Oracle
StorageTablespace usagePostgreSQL, Oracle, SQL Server
HealthDatabase uptimeMariaDB, MySQL, PostgreSQL, Oracle, SQL Server
HealthPassword expiryMySQL, PostgreSQL, Oracle, SQL Server
HealthReplication lagMySQL, PostgreSQL
HealthDead tuple ratioPostgreSQL
Schema qualityTables without a primary key (manual)MariaDB, MySQL, PostgreSQL, Oracle, SQL Server, H2
Schema qualityUnused indexesMySQL, PostgreSQL, SQL Server
  • The two sets (Session set and Storage set) exist for MariaDB, MySQL, PostgreSQL, Oracle and SQL Server.
  • The same DBMS may use different SQL depending on its version. When NeoSQL does not know the connection's version, it uses SQL that works on the oldest version.
  • DBMSs not in the table have no presets. Make your own tiles.

Sets

A set is a group of tiles that share the result of one query. Added separately, the same query goes out once per tile on every cycle; added as a set, it goes out once. The n queries as separate tiles → 1 as a set label on the card shows the difference.

SetTiles it adds
Session setActive sessions, Blocked sessions, Live sessions. Every 30 seconds
Storage setLargest tables (Top 10), Data / index split (stacked), Size share, Index size vs data size, Total schema size, Tables, Index / data ratio. Every 6 hours
  • Tiles that cannot be made on this DBMS are shown on the card with the not on this DBMS label and are left out. For example, the Session set card on MariaDB and MySQL has no Blocked sessions tile.
  • The position and size of set tiles can be changed tile by tile in edit mode. What they share is the query and the interval.
  • To open the settings window of a set tile, you detach it from the set first. See Tile settings.

The dashboard offered when you create a connection

When you save a new connection, the Create a dashboard for this connection window appears. Clicking the Create button creates and opens a dashboard with every preset for that DBMS, named after the connection with a status suffix.

  • This dashboard skips the availability check, so a just-created connection does not send a burst of queries to a production database. Tiles without permission show an error when opened; delete them.
  • Presets are added individually, not as sets.
  • For a connection whose DBMS has no presets, you are not asked.

Things to keep in mind

  • On PostgreSQL, the slow queries and most-called queries cards are checked by actually reading the pg_stat_statements view. If the extension is missing or not loaded through shared_preload_libraries, the cards show as blocked. Set up the extension and run the availability check again.
  • Presets are copied in. Updating the app does not change the SQL of tiles you have already added. To use new preset SQL, delete the tile and add it again.
  • Just opening the gallery sends check queries to that connection. Keep this in mind for production databases.
  • Performance and storage presets read system views. Rather than granting broad privileges, set up a separate read-only monitoring account (Safeguards for production databases).
  • Heavy presets (the heavy label) can take a long time on a large schema. Do not shorten their interval.