# migration_log

migration_id: create migration_log table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `migration_log` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `migration_id` TEXT NOT NULL
  , `sql` TEXT NOT NULL
  , `success` INTEGER NOT NULL
  , `error` TEXT NOT NULL
  , `timestamp` DATETIME NOT NULL
  );


migration_id: create user table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `user` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `login` TEXT NOT NULL
  , `email` TEXT NOT NULL
  , `name` TEXT NULL
  , `password` TEXT NULL
  , `salt` TEXT NULL
  , `rands` TEXT NULL
  , `company` TEXT NULL
  , `account_id` INTEGER NOT NULL
  , `is_admin` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create user table v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `user` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `login` TEXT NOT NULL
  , `email` TEXT NOT NULL
  , `name` TEXT NULL
  , `password` TEXT NULL
  , `salt` TEXT NULL
  , `rands` TEXT NULL
  , `company` TEXT NULL
  , `org_id` INTEGER NOT NULL
  , `is_admin` INTEGER NOT NULL
  , `email_verified` INTEGER NULL
  , `theme` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: copy data_source v1 to v2
timestamp: 2025-10-29 20:29:00
sql:
  INSERT INTO `user` (`updated`
  , `id`
  , `login`
  , `email`
  , `name`
  , `password`
  , `rands`
  , `company`
  , `org_id`
  , `version`
  , `salt`
  , `is_admin`
  , `created`) SELECT `updated`
  , `id`
  , `login`
  , `email`
  , `name`
  , `password`
  , `rands`
  , `company`
  , `account_id`
  , `version`
  , `salt`
  , `is_admin`
  , `created` FROM `user_v1`


migration_id: Update is_service_account column to nullable
timestamp: 2025-10-29 20:29:00
sql:
  ALTER TABLE user ADD COLUMN tmp_service_account BOOLEAN DEFAULT 0;
  UPDATE user SET tmp_service_account = is_service_account;
  ALTER TABLE user DROP COLUMN is_service_account;
  ALTER TABLE user RENAME COLUMN tmp_service_account TO is_service_account;


migration_id: Add index on user.is_service_account and user.last_seen_at
timestamp: 2025-10-29 20:29:00
sql:
  CREATE INDEX `IDX_user_is_service_account_last_seen_at` ON `user` (`is_service_account`,`last_seen_at`);


migration_id: create temp user table v1-7
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `temp_user` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `email` TEXT NOT NULL
  , `name` TEXT NULL
  , `role` TEXT NULL
  , `code` TEXT NOT NULL
  , `status` TEXT NOT NULL
  , `invited_by_user_id` INTEGER NULL
  , `email_sent` INTEGER NOT NULL
  , `email_sent_on` DATETIME NULL
  , `remote_addr` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create temp_user v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `temp_user` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `email` TEXT NOT NULL
  , `name` TEXT NULL
  , `role` TEXT NULL
  , `code` TEXT NOT NULL
  , `status` TEXT NOT NULL
  , `invited_by_user_id` INTEGER NULL
  , `email_sent` INTEGER NOT NULL
  , `email_sent_on` DATETIME NULL
  , `remote_addr` TEXT NULL
  , `created` INTEGER NOT NULL DEFAULT 0
  , `updated` INTEGER NOT NULL DEFAULT 0
  );


migration_id: copy temp_user v1 to v2
timestamp: 2025-10-29 20:29:00
sql:
  INSERT INTO `temp_user` (`remote_addr`
  , `id`
  , `version`
  , `email`
  , `name`
  , `role`
  , `code`
  , `status`
  , `email_sent_on`
  , `org_id`
  , `invited_by_user_id`
  , `email_sent`) SELECT `remote_addr`
  , `id`
  , `version`
  , `email`
  , `name`
  , `role`
  , `code`
  , `status`
  , `email_sent_on`
  , `org_id`
  , `invited_by_user_id`
  , `email_sent` FROM `temp_user_tmp_qwerty`


migration_id: create star table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `star` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `user_id` INTEGER NOT NULL
  , `dashboard_id` INTEGER NOT NULL
  );


migration_id: add index in star table on dashboard_uid, org_id and user_id columns
timestamp: 2025-10-29 20:29:00
sql:
  CREATE UNIQUE INDEX `UQE_star_user_id_dashboard_uid_org_id` ON `star` (`user_id`,`dashboard_uid`,`org_id`);


migration_id: create org table v1
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `org` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `name` TEXT NOT NULL
  , `address1` TEXT NULL
  , `address2` TEXT NULL
  , `city` TEXT NULL
  , `state` TEXT NULL
  , `zip_code` TEXT NULL
  , `country` TEXT NULL
  , `billing_email` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create org_user table v1
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `org_user` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `role` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create dashboard table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `dashboard` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `slug` TEXT NOT NULL
  , `title` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `account_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create dashboard_tag table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_tag` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `dashboard_id` INTEGER NOT NULL
  , `term` TEXT NOT NULL
  );


migration_id: add unique index dashboard_tag.dasboard_id_term
timestamp: 2025-10-29 20:29:00
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_tag_dashboard_id_term` ON `dashboard_tag` (`dashboard_id`,`term`);


migration_id: create dashboard v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `dashboard` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `slug` TEXT NOT NULL
  , `title` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: copy dashboard v1 to v2
timestamp: 2025-10-29 20:29:00
sql:
  INSERT INTO `dashboard` (`id`
  , `version`
  , `slug`
  , `title`
  , `data`
  , `org_id`
  , `created`
  , `updated`) SELECT `id`
  , `version`
  , `slug`
  , `title`
  , `data`
  , `account_id`
  , `created`
  , `updated` FROM `dashboard_v1`


migration_id: Add unique index for dashboard_org_id_title_folder_id
timestamp: 2025-10-29 20:29:00
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_org_id_folder_id_title` ON `dashboard` (`org_id`,`folder_id`,`title`);


migration_id: create dashboard_provisioning
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_provisioning` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `dashboard_id` INTEGER NULL
  , `name` TEXT NOT NULL
  , `external_id` TEXT NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create dashboard_provisioning v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_provisioning` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `dashboard_id` INTEGER NULL
  , `name` TEXT NOT NULL
  , `external_id` TEXT NOT NULL
  , `updated` INTEGER NOT NULL DEFAULT 0
  );


migration_id: create index IDX_dashboard_provisioning_dashboard_id - v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE INDEX `IDX_dashboard_provisioning_dashboard_id` ON `dashboard_provisioning` (`dashboard_id`);


migration_id: create index IDX_dashboard_provisioning_dashboard_id_name - v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE INDEX `IDX_dashboard_provisioning_dashboard_id_name` ON `dashboard_provisioning` (`dashboard_id`,`name`);


migration_id: copy dashboard_provisioning v1 to v2
timestamp: 2025-10-29 20:29:00
sql:
  INSERT INTO `dashboard_provisioning` (`id`
  , `dashboard_id`
  , `name`
  , `external_id`) SELECT `id`
  , `dashboard_id`
  , `name`
  , `external_id` FROM `dashboard_provisioning_tmp_qwerty`


migration_id: create data_source table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `data_source` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `account_id` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `type` TEXT NOT NULL
  , `name` TEXT NOT NULL
  , `access` TEXT NOT NULL
  , `url` TEXT NOT NULL
  , `password` TEXT NULL
  , `user` TEXT NULL
  , `database` TEXT NULL
  , `basic_auth` INTEGER NOT NULL
  , `basic_auth_user` TEXT NULL
  , `basic_auth_password` TEXT NULL
  , `is_default` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create data_source table v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `data_source` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `type` TEXT NOT NULL
  , `name` TEXT NOT NULL
  , `access` TEXT NOT NULL
  , `url` TEXT NOT NULL
  , `password` TEXT NULL
  , `user` TEXT NULL
  , `database` TEXT NULL
  , `basic_auth` INTEGER NOT NULL
  , `basic_auth_user` TEXT NULL
  , `basic_auth_password` TEXT NULL
  , `is_default` INTEGER NOT NULL
  , `json_data` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create api_key table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `api_key` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `account_id` INTEGER NOT NULL
  , `name` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `role` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create api_key table v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `api_key` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `name` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `role` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: copy api_key v1 to v2
timestamp: 2025-10-29 20:29:00
sql:
  INSERT INTO `api_key` (`role`
  , `created`
  , `updated`
  , `id`
  , `org_id`
  , `name`
  , `key`) SELECT `role`
  , `created`
  , `updated`
  , `id`
  , `account_id`
  , `name`
  , `key` FROM `api_key_v1`


migration_id: create dashboard_snapshot table v4
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_snapshot` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `name` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `dashboard` TEXT NOT NULL
  , `expires` DATETIME NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create dashboard_snapshot table v5 #2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_snapshot` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `name` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `delete_key` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `external` INTEGER NOT NULL
  , `external_url` TEXT NOT NULL
  , `dashboard` TEXT NOT NULL
  , `expires` DATETIME NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create quota table v1
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `quota` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NULL
  , `user_id` INTEGER NULL
  , `target` TEXT NOT NULL
  , `limit` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create plugin_setting table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `plugin_setting` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NULL
  , `plugin_id` TEXT NOT NULL
  , `enabled` INTEGER NOT NULL
  , `pinned` INTEGER NOT NULL
  , `json_data` TEXT NULL
  , `secure_json_data` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create index UQE_plugin_setting_org_id_plugin_id - v1
timestamp: 2025-10-29 20:29:00
sql:
  CREATE UNIQUE INDEX `UQE_plugin_setting_org_id_plugin_id` ON `plugin_setting` (`org_id`,`plugin_id`);


migration_id: make org_id NOT NULL and DEFAULT VALUE 1
timestamp: 2025-10-29 20:29:00
sql:
  			CREATE TABLE "plugin_setting_new" (
  			"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  			"org_id" INTEGER NOT NULL DEFAULT 1,
  			"plugin_id" TEXT NOT NULL,
  			"enabled" INTEGER NOT NULL,
  			"pinned" INTEGER NOT NULL,
  			"json_data" TEXT NULL,
  			"secure_json_data" TEXT NULL,
  			"created" DATETIME NOT NULL,
  			"updated" DATETIME NOT NULL,
  			"plugin_version" TEXT NULL);
  			INSERT INTO "plugin_setting_new" SELECT
  				"id",
  				COALESCE("org_id", 1),
  				"plugin_id",
  				"enabled",
  				"pinned",
  				"json_data",
  				"secure_json_data",
  				"created",
  				"updated",
  				"plugin_version"
  			FROM "plugin_setting";
  			DROP TABLE "plugin_setting";
  			ALTER TABLE "plugin_setting_new" RENAME TO "plugin_setting";
  			CREATE UNIQUE INDEX "UQE_plugin_setting_org_id_plugin_id" ON "plugin_setting" ("org_id","plugin_id");
  		


migration_id: create session table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `session` (
  `key` TEXT PRIMARY KEY NOT NULL
  , `data` BLOB NOT NULL
  , `expiry` INTEGER NOT NULL
  );


migration_id: create playlist table v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `playlist` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `name` TEXT NOT NULL
  , `interval` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  );


migration_id: create playlist item table v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `playlist_item` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `playlist_id` INTEGER NOT NULL
  , `type` TEXT NOT NULL
  , `value` TEXT NOT NULL
  , `title` TEXT NOT NULL
  , `order` INTEGER NOT NULL
  );


migration_id: create preferences table v3
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `preferences` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `home_dashboard_id` INTEGER NOT NULL
  , `timezone` TEXT NOT NULL
  , `theme` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create alert table v1
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `alert` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `version` INTEGER NOT NULL
  , `dashboard_id` INTEGER NOT NULL
  , `panel_id` INTEGER NOT NULL
  , `org_id` INTEGER NOT NULL
  , `name` TEXT NOT NULL
  , `message` TEXT NOT NULL
  , `state` TEXT NOT NULL
  , `settings` TEXT NOT NULL
  , `frequency` INTEGER NOT NULL
  , `handler` INTEGER NOT NULL
  , `severity` TEXT NOT NULL
  , `silenced` INTEGER NOT NULL
  , `execution_error` TEXT NOT NULL
  , `eval_data` TEXT NULL
  , `eval_date` DATETIME NULL
  , `new_state_date` DATETIME NOT NULL
  , `state_changes` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: Create alert_rule_tag table v1
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `alert_rule_tag` (
  `alert_id` INTEGER NOT NULL
  , `tag_id` INTEGER NOT NULL
  );


migration_id: Create alert_rule_tag table v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `alert_rule_tag` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `alert_id` INTEGER NOT NULL
  , `tag_id` INTEGER NOT NULL
  );


sql: CREATE UNIQUE INDEX `UQE_alert_rule_tag_alert_id_tag_id` ON `alert_rule_tag` (`alert_id`,`tag_id`);
timestamp: 2025-10-29 20:29:00
migration_id:
  create index UQE_alert_rule_tag_alert_id_tag_id - Add unique index alert_rule_tag.alert_id_tag_id V2


migration_id: copy alert_rule_tag v1 to v2
timestamp: 2025-10-29 20:29:00
sql:
  INSERT INTO `alert_rule_tag` (`tag_id`
  , `alert_id`) SELECT `tag_id`
  , `alert_id` FROM `alert_rule_tag_v1`


migration_id: create alert_notification table v1
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `alert_notification` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `name` TEXT NOT NULL
  , `type` TEXT NOT NULL
  , `settings` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create notification_journal table v1
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `alert_notification_journal` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `alert_id` INTEGER NOT NULL
  , `notifier_id` INTEGER NOT NULL
  , `sent_at` INTEGER NOT NULL
  , `success` INTEGER NOT NULL
  );


migration_id: add index notification_journal org_id & alert_id & notifier_id
timestamp: 2025-10-29 20:29:00
sql:
  CREATE INDEX `IDX_alert_notification_journal_org_id_alert_id_notifier_id` ON `alert_notification_journal` (`org_id`,`alert_id`,`notifier_id`);


migration_id: create alert_notification_state table v1
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `alert_notification_state` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `alert_id` INTEGER NOT NULL
  , `notifier_id` INTEGER NOT NULL
  , `state` TEXT NOT NULL
  , `version` INTEGER NOT NULL
  , `updated_at` INTEGER NOT NULL
  , `alert_rule_state_updated_version` INTEGER NOT NULL
  );


migration_id: add index alert_notification_state org_id & alert_id & notifier_id
timestamp: 2025-10-29 20:29:00
sql:
  CREATE UNIQUE INDEX `UQE_alert_notification_state_org_id_alert_id_notifier_id` ON `alert_notification_state` (`org_id`,`alert_id`,`notifier_id`);


migration_id: create annotation table v5
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `annotation` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `alert_id` INTEGER NULL
  , `user_id` INTEGER NULL
  , `dashboard_id` INTEGER NULL
  , `panel_id` INTEGER NULL
  , `category_id` INTEGER NULL
  , `type` TEXT NOT NULL
  , `title` TEXT NOT NULL
  , `text` TEXT NOT NULL
  , `metric` TEXT NULL
  , `prev_state` TEXT NOT NULL
  , `new_state` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `epoch` INTEGER NOT NULL
  );


migration_id: add index annotation 3 v3
timestamp: 2025-10-29 20:29:00
sql:
  CREATE INDEX `IDX_annotation_org_id_dashboard_id_panel_id_epoch` ON `annotation` (`org_id`,`dashboard_id`,`panel_id`,`epoch`);


migration_id: Create annotation_tag table v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `annotation_tag` (
  `annotation_id` INTEGER NOT NULL
  , `tag_id` INTEGER NOT NULL
  );


migration_id: Add unique index annotation_tag.annotation_id_tag_id
timestamp: 2025-10-29 20:29:00
sql:
  CREATE UNIQUE INDEX `UQE_annotation_tag_annotation_id_tag_id` ON `annotation_tag` (`annotation_id`,`tag_id`);


migration_id: Create annotation_tag table v3
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `annotation_tag` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `annotation_id` INTEGER NOT NULL
  , `tag_id` INTEGER NOT NULL
  );


timestamp: 2025-10-29 20:29:00
migration_id:
  create index UQE_annotation_tag_annotation_id_tag_id - Add unique index annotation_tag.annotation_id_tag_id V3

sql:
  CREATE UNIQUE INDEX `UQE_annotation_tag_annotation_id_tag_id` ON `annotation_tag` (`annotation_id`,`tag_id`);


migration_id: copy annotation_tag v2 to v3
timestamp: 2025-10-29 20:29:00
sql:
  INSERT INTO `annotation_tag` (`annotation_id`
  , `tag_id`) SELECT `annotation_id`
  , `tag_id` FROM `annotation_tag_v2`


migration_id: Add index for epoch_end
timestamp: 2025-10-29 20:29:00
sql:
  CREATE INDEX `IDX_annotation_org_id_epoch_epoch_end` ON `annotation` (`org_id`,`epoch`,`epoch_end`);


migration_id: Add index for org_id_dashboard_id_epoch_end_epoch on annotation table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE INDEX `IDX_annotation_org_id_dashboard_id_epoch_end_epoch` ON `annotation` (`org_id`,`dashboard_id`,`epoch_end`,`epoch`);


migration_id: Add index for org_id_epoch_end_epoch on annotation table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE INDEX `IDX_annotation_org_id_epoch_end_epoch` ON `annotation` (`org_id`,`epoch_end`,`epoch`);


migration_id: create test_data table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `test_data` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `metric1` TEXT NULL
  , `metric2` TEXT NULL
  , `value_big_int` INTEGER NULL
  , `value_double` REAL NULL
  , `value_float` REAL NULL
  , `value_int` INTEGER NULL
  , `time_epoch` INTEGER NOT NULL
  , `time_date_time` DATETIME NOT NULL
  , `time_time_stamp` DATETIME NOT NULL
  );


migration_id: create dashboard_version table v1
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_version` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `dashboard_id` INTEGER NOT NULL
  , `parent_version` INTEGER NOT NULL
  , `restored_from` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `created_by` INTEGER NOT NULL
  , `message` TEXT NOT NULL
  , `data` TEXT NOT NULL
  );


migration_id: add unique index dashboard_version.dashboard_id and dashboard_version.version
timestamp: 2025-10-29 20:29:00
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_version_dashboard_id_version` ON `dashboard_version` (`dashboard_id`,`version`);


migration_id: save existing dashboard data in dashboard_version table v1
timestamp: 2025-10-29 20:29:00
sql:
  INSERT INTO dashboard_version
  (
  	dashboard_id,
  	version,
  	parent_version,
  	restored_from,
  	created,
  	created_by,
  	message,
  	data
  )
  SELECT
  	dashboard.id,
  	dashboard.version,
  	dashboard.version,
  	dashboard.version,
  	dashboard.updated,
  	COALESCE(dashboard.updated_by, -1),
  	'',
  	dashboard.data
  FROM dashboard;


migration_id: create team table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `team` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `name` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create team member table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `team_member` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `team_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: add unique index team_member_org_id_team_id_user_id
timestamp: 2025-10-29 20:29:00
sql:
  CREATE UNIQUE INDEX `UQE_team_member_org_id_team_id_user_id` ON `team_member` (`org_id`,`team_id`,`user_id`);


migration_id: create dashboard acl table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_acl` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `dashboard_id` INTEGER NOT NULL
  , `user_id` INTEGER NULL
  , `team_id` INTEGER NULL
  , `permission` INTEGER NOT NULL DEFAULT 4
  , `role` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: add unique index dashboard_acl_dashboard_id_user_id
timestamp: 2025-10-29 20:29:00
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_acl_dashboard_id_user_id` ON `dashboard_acl` (`dashboard_id`,`user_id`);


migration_id: add unique index dashboard_acl_dashboard_id_team_id
timestamp: 2025-10-29 20:29:00
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_acl_dashboard_id_team_id` ON `dashboard_acl` (`dashboard_id`,`team_id`);


migration_id: save default acl rules in dashboard_acl table
timestamp: 2025-10-29 20:29:00
sql:
  INSERT INTO dashboard_acl
  	(
  		org_id,
  		dashboard_id,
  		permission,
  		role,
  		created,
  		updated
  	)
  	VALUES
  		(-1,-1, 1,'Viewer','2017-06-20','2017-06-20'),
  		(-1,-1, 2,'Editor','2017-06-20','2017-06-20')
  	


migration_id: delete acl rules for deleted dashboards and folders
timestamp: 2025-10-29 20:29:00
sql:
  DELETE FROM dashboard_acl WHERE dashboard_id NOT IN (SELECT id FROM dashboard) AND dashboard_id != -1


migration_id: create tag table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `tag` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `key` TEXT NOT NULL
  , `value` TEXT NOT NULL
  );


migration_id: create login attempt table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `login_attempt` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `username` TEXT NOT NULL
  , `ip_address` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  );


migration_id: create login_attempt v2
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `login_attempt` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `username` TEXT NOT NULL
  , `ip_address` TEXT NOT NULL
  , `created` INTEGER NOT NULL DEFAULT 0
  );


migration_id: copy login_attempt v1 to v2
timestamp: 2025-10-29 20:29:00
sql:
  INSERT INTO `login_attempt` (`username`
  , `ip_address`
  , `id`) SELECT `username`
  , `ip_address`
  , `id` FROM `login_attempt_tmp_qwerty`


migration_id: create user auth table
timestamp: 2025-10-29 20:29:00
sql:
  CREATE TABLE IF NOT EXISTS `user_auth` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `user_id` INTEGER NOT NULL
  , `auth_module` TEXT NOT NULL
  , `auth_id` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  );


migration_id: create server_lock table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `server_lock` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `operation_uid` TEXT NOT NULL
  , `version` INTEGER NOT NULL
  , `last_execution` INTEGER NOT NULL
  );


migration_id: create user auth token table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `user_auth_token` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `user_id` INTEGER NOT NULL
  , `auth_token` TEXT NOT NULL
  , `prev_auth_token` TEXT NOT NULL
  , `user_agent` TEXT NOT NULL
  , `client_ip` TEXT NOT NULL
  , `auth_token_seen` INTEGER NOT NULL
  , `seen_at` INTEGER NULL
  , `rotated_at` INTEGER NOT NULL
  , `created_at` INTEGER NOT NULL
  , `updated_at` INTEGER NOT NULL
  );


migration_id: create cache_data table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `cache_data` (
  `cache_key` TEXT PRIMARY KEY NOT NULL
  , `data` BLOB NOT NULL
  , `expires` INTEGER NOT NULL
  , `created_at` INTEGER NOT NULL
  );


migration_id: create short_url table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `short_url` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `uid` TEXT NOT NULL
  , `path` TEXT NOT NULL
  , `created_by` INTEGER NOT NULL
  , `created_at` INTEGER NOT NULL
  , `last_seen_at` INTEGER NULL
  );


migration_id: recreate alert_definition table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `alert_definition` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `title` TEXT NOT NULL
  , `condition` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `updated` DATETIME NOT NULL
  , `interval_seconds` INTEGER NOT NULL DEFAULT 60
  , `version` INTEGER NOT NULL DEFAULT 0
  , `uid` TEXT NOT NULL DEFAULT 0
  );


migration_id: recreate alert_definition_version table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `alert_definition_version` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `alert_definition_id` INTEGER NOT NULL
  , `alert_definition_uid` TEXT NOT NULL DEFAULT 0
  , `parent_version` INTEGER NOT NULL
  , `restored_from` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `title` TEXT NOT NULL
  , `condition` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `interval_seconds` INTEGER NOT NULL
  );


migration_id: add index in alert_definition_version table on alert_definition_id and version columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_alert_definition_version_alert_definition_id_version` ON `alert_definition_version` (`alert_definition_id`,`version`);


migration_id: add index in alert_definition_version table on alert_definition_uid and version columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_alert_definition_version_alert_definition_uid_version` ON `alert_definition_version` (`alert_definition_uid`,`version`);


migration_id: create alert_instance table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `alert_instance` (
  `def_org_id` INTEGER NOT NULL
  , `def_uid` TEXT NOT NULL DEFAULT 0
  , `labels` TEXT NOT NULL
  , `labels_hash` TEXT NOT NULL
  , `current_state` TEXT NOT NULL
  , `current_state_since` INTEGER NOT NULL
  , `last_eval_time` INTEGER NOT NULL
  , PRIMARY KEY ( `def_org_id`,`def_uid`,`labels_hash` ));


migration_id: add index in alert_instance table on def_org_id, def_uid and current_state columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE INDEX `IDX_alert_instance_def_org_id_def_uid_current_state` ON `alert_instance` (`def_org_id`,`def_uid`,`current_state`);


migration_id: add index in alert_instance table on def_org_id, current_state columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE INDEX `IDX_alert_instance_def_org_id_current_state` ON `alert_instance` (`def_org_id`,`current_state`);


migration_id: add index rule_org_id, rule_uid, current_state on alert_instance
timestamp: 2025-10-29 20:29:01
sql:
  CREATE INDEX `IDX_alert_instance_rule_org_id_rule_uid_current_state` ON `alert_instance` (`rule_org_id`,`rule_uid`,`current_state`);


migration_id: add index rule_org_id, current_state on alert_instance
timestamp: 2025-10-29 20:29:01
sql:
  CREATE INDEX `IDX_alert_instance_rule_org_id_current_state` ON `alert_instance` (`rule_org_id`,`current_state`);


migration_id: create alert_rule table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `alert_rule` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `title` TEXT NOT NULL
  , `condition` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `updated` DATETIME NOT NULL
  , `interval_seconds` INTEGER NOT NULL DEFAULT 60
  , `version` INTEGER NOT NULL DEFAULT 0
  , `uid` TEXT NOT NULL DEFAULT 0
  , `namespace_uid` TEXT NOT NULL
  , `rule_group` TEXT NOT NULL
  , `no_data_state` TEXT NOT NULL DEFAULT 'NoData'
  , `exec_err_state` TEXT NOT NULL DEFAULT 'Alerting'
  );


migration_id: add index in alert_rule on org_id, namespace_uid, group_uid columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE INDEX `IDX_alert_rule_org_id_namespace_uid_rule_group` ON `alert_rule` (`org_id`,`namespace_uid`,`rule_group`);


migration_id: add index in alert_rule on org_id, namespase_uid and title columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_alert_rule_org_id_namespace_uid_title` ON `alert_rule` (`org_id`,`namespace_uid`,`title`);


migration_id: add index in alert_rule on org_id, dashboard_uid and panel_id columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE INDEX `IDX_alert_rule_org_id_dashboard_uid_panel_id` ON `alert_rule` (`org_id`,`dashboard_uid`,`panel_id`);


migration_id: create alert_rule_version table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `alert_rule_version` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `rule_org_id` INTEGER NOT NULL
  , `rule_uid` TEXT NOT NULL DEFAULT 0
  , `rule_namespace_uid` TEXT NOT NULL
  , `rule_group` TEXT NOT NULL
  , `parent_version` INTEGER NOT NULL
  , `restored_from` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `title` TEXT NOT NULL
  , `condition` TEXT NOT NULL
  , `data` TEXT NOT NULL
  , `interval_seconds` INTEGER NOT NULL
  , `no_data_state` TEXT NOT NULL DEFAULT 'NoData'
  , `exec_err_state` TEXT NOT NULL DEFAULT 'Alerting'
  );


migration_id: add index in alert_rule_version table on rule_org_id, rule_uid and version columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_alert_rule_version_rule_org_id_rule_uid_version` ON `alert_rule_version` (`rule_org_id`,`rule_uid`,`version`);


migration_id: add index in alert_rule_version table on rule_org_id, rule_namespace_uid and rule_group columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE INDEX `IDX_alert_rule_version_rule_org_id_rule_namespace_uid_rule_group` ON `alert_rule_version` (`rule_org_id`,`rule_namespace_uid`,`rule_group`);


migration_id: create_alert_configuration_table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `alert_configuration` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `alertmanager_configuration` TEXT NOT NULL
  , `configuration_version` TEXT NOT NULL
  , `created_at` INTEGER NOT NULL
  );


migration_id: add configuration_hash column to alert_configuration
timestamp: 2025-10-29 20:29:01
sql:
  alter table `alert_configuration` ADD COLUMN `configuration_hash` TEXT NOT NULL DEFAULT 'not-yet-calculated' 


migration_id: create_ngalert_configuration_table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `ngalert_configuration` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `alertmanagers` TEXT NULL
  , `created_at` INTEGER NOT NULL
  , `updated_at` INTEGER NOT NULL
  );


migration_id: create provenance_type table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `provenance_type` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `record_key` TEXT NOT NULL
  , `record_type` TEXT NOT NULL
  , `provenance` TEXT NOT NULL
  );


migration_id: add index to uniquify (record_key, record_type, org_id) columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_provenance_type_record_type_record_key_org_id` ON `provenance_type` (`record_type`,`record_key`,`org_id`);


migration_id: create alert_image table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `alert_image` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `token` TEXT NOT NULL
  , `path` TEXT NOT NULL
  , `url` TEXT NOT NULL
  , `created_at` DATETIME NOT NULL
  , `expires_at` DATETIME NOT NULL
  );


migration_id: create_alert_configuration_history_table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `alert_configuration_history` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL DEFAULT 0
  , `alertmanager_configuration` TEXT NOT NULL
  , `configuration_hash` TEXT NOT NULL DEFAULT 'not-yet-calculated'
  , `configuration_version` TEXT NOT NULL
  , `created_at` INTEGER NOT NULL
  , `default` INTEGER NOT NULL DEFAULT 0
  );


migration_id: create library_element table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `library_element` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `folder_id` INTEGER NOT NULL
  , `uid` TEXT NOT NULL
  , `name` TEXT NOT NULL
  , `kind` INTEGER NOT NULL
  , `type` TEXT NOT NULL
  , `description` TEXT NOT NULL
  , `model` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `created_by` INTEGER NOT NULL
  , `updated` DATETIME NOT NULL
  , `updated_by` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  );


migration_id: add index library_element org_id-folder_id-name-kind
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_library_element_org_id_folder_id_name_kind` ON `library_element` (`org_id`,`folder_id`,`name`,`kind`);


migration_id: create library_element_connection table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `library_element_connection` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `element_id` INTEGER NOT NULL
  , `kind` INTEGER NOT NULL
  , `connection_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `created_by` INTEGER NOT NULL
  );


migration_id: add index library_element_connection element_id-kind-connection_id
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_library_element_connection_element_id_kind_connection_id` ON `library_element_connection` (`element_id`,`kind`,`connection_id`);


migration_id: populate library_element folder_uid
timestamp: 2025-10-29 20:29:01
sql:
  UPDATE library_element
  	SET folder_uid = dashboard.uid
  	FROM dashboard
  	WHERE library_element.folder_id = dashboard.id AND library_element.org_id = dashboard.org_id


migration_id: add index library_element org_id-folder_uid-name-kind
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_library_element_org_id_folder_uid_name_kind` ON `library_element` (`org_id`,`folder_uid`,`name`,`kind`);


migration_id: create data_keys table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `data_keys` (
  `name` TEXT PRIMARY KEY NOT NULL
  , `active` INTEGER NOT NULL
  , `scope` TEXT NOT NULL
  , `provider` TEXT NOT NULL
  , `encrypted_data` BLOB NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create secrets table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `secrets` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `namespace` TEXT NOT NULL
  , `type` TEXT NOT NULL
  , `value` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create kv_store table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `kv_store` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `namespace` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `value` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create permission table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `permission` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `role_id` INTEGER NOT NULL
  , `action` TEXT NOT NULL
  , `scope` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: add unique index role_id_action_scope
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_permission_role_id_action_scope` ON `permission` (`role_id`,`action`,`scope`);


migration_id: create role table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `role` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `name` TEXT NOT NULL
  , `description` TEXT NULL
  , `version` INTEGER NOT NULL
  , `org_id` INTEGER NOT NULL
  , `uid` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create team role table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `team_role` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `team_id` INTEGER NOT NULL
  , `role_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  );


migration_id: add unique index team_role_org_id_team_id_role_id
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_team_role_org_id_team_id_role_id` ON `team_role` (`org_id`,`team_id`,`role_id`);


migration_id: create user role table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `user_role` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `role_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  );


migration_id: add unique index user_role_org_id_user_id_role_id
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_user_role_org_id_user_id_role_id` ON `user_role` (`org_id`,`user_id`,`role_id`);


migration_id: create builtin role table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `builtin_role` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `role` TEXT NOT NULL
  , `role_id` INTEGER NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: add unique index builtin_role_org_id_role_id_role
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_builtin_role_org_id_role_id_role` ON `builtin_role` (`org_id`,`role_id`,`role`);


migration_id: create seed assignment table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `seed_assignment` (
  `builtin_role` TEXT NOT NULL
  , `role_name` TEXT NOT NULL
  );


migration_id: add unique index builtin_role_role_name
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_seed_assignment_builtin_role_role_name` ON `seed_assignment` (`builtin_role`,`role_name`);


migration_id: add permission action scope role_id index
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_permission_action_scope_role_id` ON `permission` (`action`,`scope`,`role_id`);


migration_id: add user_role org ID, user ID, role ID, group mapping UID index
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_user_role_org_id_user_id_role_id_group_mapping_uid` ON `user_role` (`org_id`,`user_id`,`role_id`,`group_mapping_uid`);


migration_id: create query_history table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `query_history` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `uid` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `datasource_uid` TEXT NOT NULL
  , `created_by` INTEGER NOT NULL
  , `created_at` INTEGER NOT NULL
  , `comment` TEXT NOT NULL
  , `queries` TEXT NOT NULL
  );


migration_id: add index query_history.org_id-created_by-datasource_uid
timestamp: 2025-10-29 20:29:01
sql:
  CREATE INDEX `IDX_query_history_org_id_created_by_datasource_uid` ON `query_history` (`org_id`,`created_by`,`datasource_uid`);


migration_id: create query_history_details table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `query_history_details` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `query_history_item_uid` TEXT NOT NULL
  , `datasource_uid` TEXT NOT NULL
  );


migration_id: create query_history_star table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `query_history_star` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `query_uid` TEXT NOT NULL
  , `user_id` INTEGER NOT NULL
  );


migration_id: add index query_history.user_id-query_uid
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_query_history_star_user_id_query_uid` ON `query_history_star` (`user_id`,`query_uid`);


migration_id: create correlation table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `correlation` (
  `uid` TEXT NOT NULL
  , `source_uid` TEXT NOT NULL
  , `target_uid` TEXT NULL
  , `label` TEXT NOT NULL
  , `description` TEXT NOT NULL
  , PRIMARY KEY ( `uid`,`source_uid` ));


migration_id: create correlation v2
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `correlation` (
  `uid` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL DEFAULT 0
  , `source_uid` TEXT NOT NULL
  , `target_uid` TEXT NULL
  , `label` TEXT NOT NULL
  , `description` TEXT NOT NULL
  , `config` TEXT NULL
  , PRIMARY KEY ( `uid`,`org_id`,`source_uid` ));


migration_id: copy correlation v1 to v2
timestamp: 2025-10-29 20:29:01
sql:
  INSERT INTO `correlation` (`config`
  , `uid`
  , `source_uid`
  , `target_uid`
  , `label`
  , `description`) SELECT `config`
  , `uid`
  , `source_uid`
  , `target_uid`
  , `label`
  , `description` FROM `correlation_tmp_qwerty`


migration_id: create entity_events table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `entity_event` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `entity_id` TEXT NOT NULL
  , `event_type` TEXT NOT NULL
  , `created` INTEGER NOT NULL
  );


migration_id: create dashboard public config v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_public_config` (
  `uid` TEXT PRIMARY KEY NOT NULL
  , `dashboard_uid` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `time_settings` TEXT NOT NULL
  , `refresh_rate` INTEGER NOT NULL DEFAULT 30
  , `template_variables` TEXT NULL
  );


migration_id: create index IDX_dashboard_public_config_org_id_dashboard_uid - v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE INDEX `IDX_dashboard_public_config_org_id_dashboard_uid` ON `dashboard_public_config` (`org_id`,`dashboard_uid`);


migration_id: Recreate dashboard public config v2
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `dashboard_public_config` (
  `uid` TEXT PRIMARY KEY NOT NULL
  , `dashboard_uid` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `time_settings` TEXT NULL
  , `template_variables` TEXT NULL
  , `access_token` TEXT NOT NULL
  , `created_by` INTEGER NOT NULL
  , `updated_by` INTEGER NULL
  , `created_at` DATETIME NOT NULL
  , `updated_at` DATETIME NULL
  , `is_enabled` INTEGER NOT NULL DEFAULT 0
  );


migration_id: create index UQE_dashboard_public_config_access_token - v2
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_public_config_access_token` ON `dashboard_public_config` (`access_token`);


migration_id: create file table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `file` (
  `path` TEXT NOT NULL
  , `path_hash` TEXT NOT NULL
  , `parent_folder_path_hash` TEXT NOT NULL
  , `contents` BLOB NOT NULL
  , `etag` TEXT NOT NULL
  , `cache_control` TEXT NOT NULL
  , `content_disposition` TEXT NOT NULL
  , `updated` DATETIME NOT NULL
  , `created` DATETIME NOT NULL
  , `size` INTEGER NOT NULL
  , `mime_type` TEXT NOT NULL
  );


migration_id: create file_meta table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `file_meta` (
  `path_hash` TEXT NOT NULL
  , `key` TEXT NOT NULL
  , `value` TEXT NOT NULL
  );


migration_id: update seed_assignment role_name column to nullable
timestamp: 2025-10-29 20:29:01
sql:
  ALTER TABLE seed_assignment ADD COLUMN tmp_role_name VARCHAR(190) DEFAULT NULL;
  UPDATE seed_assignment SET tmp_role_name = role_name;
  ALTER TABLE seed_assignment DROP COLUMN role_name;
  ALTER TABLE seed_assignment RENAME COLUMN tmp_role_name TO role_name;


migration_id: add unique index builtin_role_action_scope
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_seed_assignment_builtin_role_action_scope` ON `seed_assignment` (`builtin_role`,`action`,`scope`);


migration_id: create folder table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `folder` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `uid` TEXT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `title` TEXT NOT NULL
  , `description` TEXT NULL
  , `parent_uid` TEXT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: Add unique index for title, parent_uid, and org_id
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_folder_title_parent_uid_org_id` ON `folder` (`title`,`parent_uid`,`org_id`);


migration_id: Sync dashboard and folder table
timestamp: 2025-10-29 20:29:01
sql:
  			INSERT INTO folder (uid, org_id, title, created, updated)
  			SELECT uid, org_id, title, created, updated FROM dashboard WHERE is_folder = 1
  			ON CONFLICT DO UPDATE SET title=excluded.title, updated=excluded.updated
  		


migration_id: Remove ghost folders from the folder table
timestamp: 2025-10-29 20:29:01
sql:
  			DELETE FROM folder WHERE NOT EXISTS
  				(SELECT 1 FROM dashboard WHERE dashboard.uid = folder.uid AND dashboard.org_id = folder.org_id AND dashboard.is_folder = true)
  	


migration_id: Add unique index UQE_folder_org_id_parent_uid_title
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_folder_org_id_parent_uid_title` ON `folder` (`org_id`,`parent_uid`,`title`);


migration_id: create anon_device table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `anon_device` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `client_ip` TEXT NOT NULL
  , `created_at` DATETIME NOT NULL
  , `device_id` TEXT NOT NULL
  , `updated_at` DATETIME NOT NULL
  , `user_agent` TEXT NOT NULL
  );


migration_id: create signing_key table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `signing_key` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `key_id` TEXT NOT NULL
  , `private_key` TEXT NOT NULL
  , `added_at` DATETIME NOT NULL
  , `expires_at` DATETIME NULL
  , `alg` TEXT NOT NULL
  );


migration_id: Add unique index for dashboard_org_id_folder_uid_title_is_folder
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_dashboard_org_id_folder_uid_title_is_folder` ON `dashboard` (`org_id`,`folder_uid`,`title`,`is_folder`);


migration_id: create sso_setting table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `sso_setting` (
  `id` TEXT PRIMARY KEY NOT NULL
  , `provider` TEXT NOT NULL
  , `settings` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  , `is_deleted` INTEGER NOT NULL DEFAULT 0
  );


migration_id: create cloud_migration table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `cloud_migration` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `auth_token` TEXT NULL
  , `stack` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create cloud_migration_run table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `cloud_migration_run` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `cloud_migration_uid` TEXT NULL
  , `result` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  , `finished` DATETIME NULL
  );


migration_id: create cloud_migration_session v2
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `cloud_migration_session` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `uid` TEXT NULL
  , `auth_token` TEXT NULL
  , `slug` TEXT NOT NULL
  , `stack_id` INTEGER NOT NULL
  , `region_slug` TEXT NOT NULL
  , `cluster_slug` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: copy cloud_migration_session v1 to v2
timestamp: 2025-10-29 20:29:01
sql:
  INSERT INTO `cloud_migration_session` (`id`
  , `auth_token`
  , `stack_id`
  , `region_slug`
  , `cluster_slug`
  , `created`
  , `updated`
  , `uid`
  , `slug`) SELECT `id`
  , `auth_token`
  , `stack_id`
  , `region_slug`
  , `cluster_slug`
  , `created`
  , `updated`
  , `uid`
  , `stack` FROM `cloud_migration_session_tmp_qwerty`


migration_id: create cloud_migration_snapshot v2
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `cloud_migration_snapshot` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `uid` TEXT NULL
  , `session_uid` TEXT NULL
  , `result` TEXT NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  , `finished` DATETIME NULL
  );


migration_id: copy cloud_migration_snapshot v1 to v2
timestamp: 2025-10-29 20:29:01
sql:
  INSERT INTO `cloud_migration_snapshot` (`result`
  , `created`
  , `updated`
  , `finished`
  , `id`
  , `uid`
  , `session_uid`) SELECT `result`
  , `created`
  , `updated`
  , `finished`
  , `id`
  , `uid`
  , `cloud_migration_uid` FROM `cloud_migration_snapshot_tmp_qwerty`


migration_id: create cloud_migration_resource table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `cloud_migration_resource` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `uid` TEXT NOT NULL
  , `resource_type` TEXT NOT NULL
  , `resource_uid` TEXT NOT NULL
  , `status` TEXT NOT NULL
  , `error_string` TEXT NULL
  , `snapshot_uid` TEXT NOT NULL
  );


migration_id: create cloud_migration_snapshot_partition table v1
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `cloud_migration_snapshot_partition` (
  `snapshot_uid` TEXT NOT NULL
  , `partition_number` INTEGER NOT NULL
  , `resource_type` TEXT NOT NULL
  , `data` BLOB NOT NULL
  );


migration_id: add cloud_migration_snapshot_partition srp_unique index
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_cloud_migration_snapshot_partition_srp_unique` ON `cloud_migration_snapshot_partition` (`snapshot_uid`,`resource_type`,`partition_number`);


migration_id: create user_external_session table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `user_external_session` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `user_auth_id` INTEGER NOT NULL
  , `user_id` INTEGER NOT NULL
  , `auth_module` TEXT NOT NULL
  , `access_token` TEXT NULL
  , `id_token` TEXT NULL
  , `refresh_token` TEXT NULL
  , `session_id` TEXT NULL
  , `session_id_hash` TEXT NULL
  , `name_id` TEXT NULL
  , `name_id_hash` TEXT NULL
  , `expires_at` DATETIME NULL
  , `created_at` DATETIME NOT NULL
  );


migration_id: add alert_rule_state table
timestamp: 2025-10-29 20:29:01
sql:
  CREATE TABLE IF NOT EXISTS `alert_rule_state` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `org_id` INTEGER NOT NULL
  , `rule_uid` TEXT NOT NULL
  , `data` BLOB NOT NULL
  , `updated_at` DATETIME NOT NULL
  );


migration_id: add index to alert_rule_state on org_id and rule_uid columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_alert_rule_state_org_id_rule_uid` ON `alert_rule_state` (`org_id`,`rule_uid`);


migration_id: add index in alert_rule_version table on rule_org_id, rule_uid, rule_guid and version columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_alert_rule_version_rule_org_id_rule_uid_rule_guid_version` ON `alert_rule_version` (`rule_org_id`,`rule_uid`,`rule_guid`,`version`);


migration_id: add index in alert_rule_version table on rule_guid and version columns
timestamp: 2025-10-29 20:29:01
sql:
  CREATE UNIQUE INDEX `UQE_alert_rule_version_rule_guid_version` ON `alert_rule_version` (`rule_guid`,`version`);


# user

login: admin
email: admin@cutemeli.de
name: cutemeli
salt: LbpLpaQO7d
rands: xLsnb2IVmP
created: 2025-10-29 20:29:02
updated: 2025-12-06 15:28:15
last_seen_at: 2025-12-23 08:48:34
uid: ff2jmxa9wxs00a
password:
  b00c2427078f84264a3ec465b003ad4288100520461735ac01ec95d0e6ea3e40b4880e5d8333ff91998d37bc6abf0fc8e5ec


# dashboard

slug: prometheus-2-0-overview
title: Prometheus 2.0 Overview
created: 2025-10-29 20:43:32
updated: 2025-10-29 20:43:32
uid: 0ffe4a3d-6005-4095-bfe0-11bd4f80e34e
api_version: v0alpha1
data:
  {"annotations":{"list":[{"datasource":"bf2jnz67bydj4c","enable":true,"expr":"sum(changes(prometheus_config_last_reload_success_timestamp_seconds{instance=~\"$instance\"}[10m])) by (instance)","hide":false,"iconColor":"rgb(0, 96, 19)","limit":100,"name":"reloads","showIn":0,"step":"5m","type":"alert"},{"datasource":"bf2jnz67bydj4c","enable":true,"expr":"count(sum(up{instance=\"$instance\"}) by (instance) \u003c 1)","hide":false,"iconColor":"rgba(255, 96, 96, 1)","limit":100,"name":"down","showIn":0,"step":"5m","type":"alert"}]},"description":"Get started faster with Grafana Cloud then easily build these dashboards. https://grafana.com/products/cloud/\nOverview of metrics from Prometheus 2.0.  \nUseful for using prometheus to monitor your prometheus.\nRevisions welcome!","editable":true,"gnetId":3662,"graphTooltip":0,"hideControls":false,"links":[],"refresh":"30s","rows":[{"collapse":false,"height":250,"panels":[{"cacheTimeout":null,"colorBackground":false,"colorValue":true,"colors":["rgba(245, 54, 54, 0.9)","rgba(237, 129, 40, 0.89)","rgba(50, 172, 45, 0.97)"],"datasource":"bf2jnz67bydj4c","decimals":3,"description":"Percentage of uptime during the most recent $interval period.  Change the period with the 'interval' dropdown above.","format":"none","gauge":{"maxValue":100,"minValue":0,"show":false,"thresholdLabels":false,"thresholdMarkers":false},"id":2,"interval":null,"links":[],"mappingType":1,"mappingTypes":[{"name":"value to text","value":1},{"name":"range to text","value":2}],"maxDataPoints":100,"nullPointMode":"connected","nullText":null,"postfix":"%","postfixFontSize":"100%","prefix":"","prefixFontSize":"50%","rangeMaps":[{"from":"null","text":"N/A","to":"null"}],"span":3,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":true,"lineColor":"rgb(31, 120, 193)","show":false},"tableColumn":"","targets":[{"expr":"avg(avg_over_time(up{instance=~\"$instance\",job=~\"$job\"}[$interval]) * 100)","format":"time_series","intervalFactor":2,"legendFormat":"","refId":"A","step":40}],"thresholds":"90, 99","title":"Uptime [$interval]","type":"singlestat","valueFontSize":"100%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"current"},{"columns":[],"datasource":"bf2jnz67bydj4c","description":"Servers which are DOWN RIGHT NOW! \nFIX THEM!!","fontSize":"100%","hideTimeOverride":true,"id":25,"links":[],"pageSize":null,"scroll":true,"showHeader":true,"sort":{"col":0,"desc":true},"span":3,"styles":[{"alias":"Time","dateFormat":"YYYY-MM-DD HH:mm:ss","pattern":"Time","type":"hidden"},{"alias":"","colorMode":null,"colors":["rgba(245, 54, 54, 0.9)","rgba(237, 129, 40, 0.89)","rgba(50, 172, 45, 0.97)"],"dateFormat":"YYYY-MM-DD HH:mm:ss","decimals":2,"pattern":"/__name__|job|Value/","thresholds":[],"type":"hidden","unit":"short"},{"alias":"   ","colorMode":"cell","colors":["rgba(255, 0, 0, 0.9)","rgba(237, 129, 40, 0.89)","rgba(255, 0, 0, 0.97)"],"dateFormat":"YYYY-MM-DD HH:mm:ss","decimals":2,"link":false,"pattern":"instance","thresholds":["","",""],"type":"string","unit":"short"}],"targets":[{"expr":"up{instance=~\"$instance\",job=~\"$job\"} \u003c 1","format":"table","intervalFactor":2,"refId":"A","step":2}],"timeFrom":"1s","title":"Currently Down","transform":"table","type":"table"},{"cacheTimeout":null,"colorBackground":false,"colorValue":true,"colors":["rgba(50, 172, 45, 0.97)","rgba(237, 129, 40, 0.89)","rgba(245, 54, 54, 0.9)"],"datasource":"bf2jnz67bydj4c","description":"Total number of time series in prometheus","format":"none","gauge":{"maxValue":100,"minValue":0,"show":false,"thresholdLabels":false,"thresholdMarkers":true},"id":12,"interval":null,"links":[],"mappingType":1,"mappingTypes":[{"name":"value to text","value":1},{"name":"range to text","value":2}],"maxDataPoints":100,"nullPointMode":"connected","nullText":null,"postfix":"","postfixFontSize":"50%","prefix":"","prefixFontSize":"50%","rangeMaps":[{"from":"null","text":"N/A","to":"null"}],"span":3,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":true,"lineColor":"rgb(31, 120, 193)","show":true},"tableColumn":"","targets":[{"expr":"sum(prometheus_tsdb_head_series{job=~\"$job\",instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"refId":"B","step":40}],"thresholds":"1000000,2000000","title":"Total Series","type":"singlestat","valueFontSize":"100%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"current"},{"cacheTimeout":null,"colorBackground":false,"colorValue":false,"colors":["rgba(245, 54, 54, 0.9)","rgba(237, 129, 40, 0.89)","rgba(50, 172, 45, 0.97)"],"datasource":"bf2jnz67bydj4c","format":"none","gauge":{"maxValue":100,"minValue":0,"show":false,"thresholdLabels":false,"thresholdMarkers":true},"id":14,"interval":null,"links":[],"mappingType":1,"mappingTypes":[{"name":"value to text","value":1},{"name":"range to text","value":2}],"maxDataPoints":100,"nullPointMode":"connected","nullText":null,"postfix":"","postfixFontSize":"50%","prefix":"","prefixFontSize":"50%","rangeMaps":[{"from":"null","text":"N/A","to":"null"}],"span":3,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":true,"lineColor":"rgb(31, 120, 193)","show":true},"tableColumn":"","targets":[{"expr":"sum(prometheus_tsdb_head_chunks{job=~\"$job\",instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"refId":"B","step":40}],"thresholds":"","title":"Memory Chunks","type":"singlestat","valueFontSize":"100%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"current"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"at a glance","titleSize":"h6"},{"collapse":false,"height":236,"panels":[{"cacheTimeout":null,"colorBackground":false,"colorValue":true,"colors":["rgba(50, 172, 45, 0.97)","rgba(237, 129, 40, 0.89)","rgba(245, 54, 54, 0.9)"],"datasource":"bf2jnz67bydj4c","description":"The total number of rule group evaluations missed due to slow rule group evaluation.","format":"none","gauge":{"maxValue":100,"minValue":0,"show":false,"thresholdLabels":false,"thresholdMarkers":true},"id":16,"interval":null,"links":[],"mappingType":1,"mappingTypes":[{"name":"value to text","value":1},{"name":"range to text","value":2}],"maxDataPoints":100,"nullPointMode":"connected","nullText":null,"postfix":"","postfixFontSize":"50%","prefix":"","prefixFontSize":"50%","rangeMaps":[{"from":"null","text":"N/A","to":"null"}],"span":2,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":false,"lineColor":"rgb(31, 120, 193)","show":false},"tableColumn":"","targets":[{"expr":"sum(sum_over_time(prometheus_evaluator_iterations_missed_total{job=~\"$job\",instance=~\"$instance\"}[$interval]))","format":"time_series","intervalFactor":2,"refId":"A","step":40}],"thresholds":"1,10","title":"Missed Iterations [$interval]","type":"singlestat","valueFontSize":"100%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"current"},{"cacheTimeout":null,"colorBackground":false,"colorValue":true,"colors":["rgba(50, 172, 45, 0.97)","rgba(237, 129, 40, 0.89)","rgba(245, 54, 54, 0.9)"],"datasource":"bf2jnz67bydj4c","description":"The total number of rule group evaluations skipped due to throttled metric storage.","format":"none","gauge":{"maxValue":100,"minValue":0,"show":false,"thresholdLabels":false,"thresholdMarkers":true},"id":18,"interval":null,"links":[],"mappingType":1,"mappingTypes":[{"name":"value to text","value":1},{"name":"range to text","value":2}],"maxDataPoints":100,"nullPointMode":"connected","nullText":null,"postfix":"","postfixFontSize":"50%","prefix":"","prefixFontSize":"50%","rangeMaps":[{"from":"null","text":"N/A","to":"null"}],"span":2,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":false,"lineColor":"rgb(31, 120, 193)","show":false},"tableColumn":"","targets":[{"expr":"sum(sum_over_time(prometheus_evaluator_iterations_skipped_total{job=~\"$job\",instance=~\"$instance\"}[$interval]))","format":"time_series","intervalFactor":2,"refId":"A","step":40}],"thresholds":"1,10","title":"Skipped Iterations [$interval]","type":"singlestat","valueFontSize":"100%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"current"},{"cacheTimeout":null,"colorBackground":false,"colorValue":true,"colors":["rgba(50, 172, 45, 0.97)","rgba(237, 129, 40, 0.89)","rgba(245, 54, 54, 0.9)"],"datasource":"bf2jnz67bydj4c","description":"Total number of scrapes that hit the sample limit and were rejected.","format":"none","gauge":{"maxValue":100,"minValue":0,"show":false,"thresholdLabels":false,"thresholdMarkers":true},"id":19,"interval":null,"links":[],"mappingType":1,"mappingTypes":[{"name":"value to text","value":1},{"name":"range to text","value":2}],"maxDataPoints":100,"nullPointMode":"connected","nullText":null,"postfix":"","postfixFontSize":"50%","prefix":"","prefixFontSize":"50%","rangeMaps":[{"from":"null","text":"N/A","to":"null"}],"span":2,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":false,"lineColor":"rgb(31, 120, 193)","show":false},"tableColumn":"","targets":[{"expr":"sum(sum_over_time(prometheus_target_scrapes_exceeded_sample_limit_total{job=~\"$job\",instance=~\"$instance\"}[$interval]))","format":"time_series","intervalFactor":2,"refId":"A","step":40}],"thresholds":"1,10","title":"Tardy Scrapes [$interval]","type":"singlestat","valueFontSize":"100%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"current"},{"cacheTimeout":null,"colorBackground":false,"colorValue":true,"colors":["rgba(50, 172, 45, 0.97)","rgba(237, 129, 40, 0.89)","rgba(245, 54, 54, 0.9)"],"datasource":"bf2jnz67bydj4c","description":"Number of times the database failed to reload block data from disk.","format":"none","gauge":{"maxValue":100,"minValue":0,"show":false,"thresholdLabels":false,"thresholdMarkers":true},"id":13,"interval":null,"links":[],"mappingType":1,"mappingTypes":[{"name":"value to text","value":1},{"name":"range to text","value":2}],"maxDataPoints":100,"nullPointMode":"connected","nullText":null,"postfix":"","postfixFontSize":"50%","prefix":"","prefixFontSize":"50%","rangeMaps":[{"from":"null","text":"N/A","to":"null"}],"span":2,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":false,"lineColor":"rgb(31, 120, 193)","show":false},"tableColumn":"","targets":[{"expr":"sum(sum_over_time(prometheus_tsdb_reloads_failures_total{job=~\"$job\",instance=~\"$instance\"}[$interval]))","format":"time_series","intervalFactor":2,"refId":"A","step":40}],"thresholds":"1,10","title":"Reload Failures [$interval]","type":"singlestat","valueFontSize":"100%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"current"},{"cacheTimeout":null,"colorBackground":false,"colorValue":true,"colors":["rgba(50, 172, 45, 0.97)","rgba(237, 129, 40, 0.89)","rgba(245, 54, 54, 0.9)"],"datasource":"bf2jnz67bydj4c","description":"Sum of all skipped scrapes","format":"none","gauge":{"maxValue":100,"minValue":0,"show":false,"thresholdLabels":false,"thresholdMarkers":true},"id":20,"interval":null,"links":[],"mappingType":1,"mappingTypes":[{"name":"value to text","value":1},{"name":"range to text","value":2}],"maxDataPoints":100,"nullPointMode":"connected","nullText":null,"postfix":"","postfixFontSize":"50%","prefix":"","prefixFontSize":"50%","rangeMaps":[{"from":"null","text":"N/A","to":"null"}],"span":4,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":false,"lineColor":"rgb(31, 120, 193)","show":false},"tableColumn":"","targets":[{"expr":"sum(sum_over_time(prometheus_target_scrapes_exceeded_sample_limit_total{job=~\"$job\",instance=~\"$instance\"}[$interval])) + \nsum(sum_over_time(prometheus_target_scrapes_sample_duplicate_timestamp_total{job=~\"$job\",instance=~\"$instance\"}[$interval])) + \nsum(sum_over_time(prometheus_target_scrapes_sample_out_of_bounds_total{job=~\"$job\",instance=~\"$instance\"}[$interval])) + \nsum(sum_over_time(prometheus_target_scrapes_sample_out_of_order_total{job=~\"$job\",instance=~\"$instance\"}[$interval])) ","format":"time_series","intervalFactor":2,"refId":"A","step":40}],"thresholds":"1,10","title":"Skipped Scrapes [$interval]","type":"singlestat","valueFontSize":"100%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"current"}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"quick numbers","titleSize":"h6"},{"collapse":false,"height":250,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","description":"All non-zero failures and errors","fill":1,"id":33,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":12,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(increase(net_conntrack_dialer_conn_failed_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Failed Connections","refId":"A","step":2},{"expr":"sum(increase(prometheus_evaluator_iterations_missed_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Missed Iterations","refId":"B","step":2},{"expr":"sum(increase(prometheus_evaluator_iterations_skipped_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Skipped Iterations","refId":"C","step":2},{"expr":"sum(increase(prometheus_rule_evaluation_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Evaluation","refId":"D","step":2},{"expr":"sum(increase(prometheus_sd_azure_refresh_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Azure Refresh","refId":"E","step":2},{"expr":"sum(increase(prometheus_sd_consul_rpc_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Consul RPC","refId":"F","step":2},{"expr":"sum(increase(prometheus_sd_dns_lookup_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"DNS Lookup","refId":"G","step":2},{"expr":"sum(increase(prometheus_sd_ec2_refresh_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"EC2 Refresh","refId":"H","step":2},{"expr":"sum(increase(prometheus_sd_gce_refresh_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"GCE Refresh","refId":"I","step":2},{"expr":"sum(increase(prometheus_sd_marathon_refresh_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Marathon Refresh","refId":"J","step":2},{"expr":"sum(increase(prometheus_sd_openstack_refresh_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Openstack Refresh","refId":"K","step":2},{"expr":"sum(increase(prometheus_sd_triton_refresh_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Triton Refresh","refId":"L","step":2},{"expr":"sum(increase(prometheus_target_scrapes_exceeded_sample_limit_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Sample Limit","refId":"M","step":2},{"expr":"sum(increase(prometheus_target_scrapes_sample_duplicate_timestamp_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Duplicate Timestamp","refId":"N","step":2},{"expr":"sum(increase(prometheus_target_scrapes_sample_out_of_bounds_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Timestamp Out of Bounds","refId":"O","step":2},{"expr":"sum(increase(prometheus_target_scrapes_sample_out_of_order_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Sample Out of Order","refId":"P","step":2},{"expr":"sum(increase(prometheus_treecache_zookeeper_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Zookeeper","refId":"Q","step":2},{"expr":"sum(increase(prometheus_tsdb_compactions_failed_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"TSDB Compactions","refId":"R","step":2},{"expr":"sum(increase(prometheus_tsdb_head_series_not_found{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Series Not Found","refId":"S","step":2},{"expr":"sum(increase(prometheus_tsdb_reloads_failures_total{instance=~\"$instance\"}[5m])) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"Reload","refId":"T","step":2}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Failures and Errors","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Errors","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"errors","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":1,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":true,"steppedLine":false,"targets":[{"expr":"up{instance=~\"$instance\",job=~\"$job\"}","format":"time_series","interval":"","intervalFactor":1,"legendFormat":"{{instance}}","refId":"A","step":2}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Upness (stacked)","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"decimals":0,"format":"none","label":"Up","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":5,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"prometheus_tsdb_head_chunks{job=~\"$job\",instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Storage Memory Chunks","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Chunks","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"up","titleSize":"h6"},{"collapse":false,"height":250,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":3,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"prometheus_tsdb_head_series{job=~\"$job\",instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Series Count","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Series","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":32,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"removed","transform":"negative-Y"}],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"sum( increase(prometheus_tsdb_head_series_created_total{instance=~\"$instance\"}[5m]) )","format":"time_series","intervalFactor":2,"legendFormat":"created","refId":"A","step":4},{"expr":"sum( increase(prometheus_tsdb_head_series_removed_total{instance=~\"$instance\"}[5m]) )","format":"time_series","intervalFactor":2,"legendFormat":"removed","refId":"B","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Series Created / Removed","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Series Count","logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"series","titleSize":"h6"},{"collapse":false,"height":250,"panels":[{"aliasColors":{"10.58.3.10:80":"#BA43A9"},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","description":"Rate of total number of appended samples","fill":1,"id":4,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":12,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(prometheus_tsdb_head_samples_appended_total{job=~\"$job\",instance=~\"$instance\"}[1m])","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A","step":2}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Appended Samples per Second","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Samples / Second","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"appended samples","titleSize":"h6"},{"collapse":false,"height":250,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","description":"Total number of syncs that were executed on a scrape pool.","fill":1,"id":6,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(prometheus_target_scrape_pool_sync_total{job=~\"$job\",instance=~\"$instance\"}) by (scrape_job)","format":"time_series","hide":false,"intervalFactor":2,"legendFormat":"{{scrape_job}}","refId":"B","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Scrape Sync Total","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Syncs","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","description":"Actual interval to sync the scrape pool.","fill":1,"id":21,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(prometheus_target_sync_length_seconds_sum{job=~\"$job\",instance=~\"$instance\"}[2m])) by (scrape_job) * 1000","format":"time_series","intervalFactor":2,"legendFormat":"{{scrape_job}}","refId":"A","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Target Sync","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Milliseconds","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"sync","titleSize":"h6"},{"collapse":false,"height":250,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":29,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"scrape_duration_seconds{instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Scrape Duration","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Seconds","logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","description":"Total number of rejected scrapes","fill":1,"id":30,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(prometheus_target_scrapes_exceeded_sample_limit_total{job=~\"$job\",instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"exceeded sample limit","refId":"A","step":4},{"expr":"sum(prometheus_target_scrapes_sample_duplicate_timestamp_total{job=~\"$job\",instance=~\"$instance\"})","format":"time_series","hide":false,"intervalFactor":2,"legendFormat":"duplicate timestamp","refId":"B","step":4},{"expr":"sum(prometheus_target_scrapes_sample_out_of_bounds_total{job=~\"$job\",instance=~\"$instance\"})","format":"time_series","hide":false,"intervalFactor":2,"legendFormat":"out of bounds","refId":"C","step":4},{"expr":"sum(prometheus_target_scrapes_sample_out_of_order_total{job=~\"$job\",instance=~\"$instance\"}) ","format":"time_series","hide":false,"intervalFactor":2,"legendFormat":"out of order","refId":"D","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Rejected Scrapes","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"decimals":0,"format":"short","label":"Scrapes","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"scrapes","titleSize":"h6"},{"collapse":false,"height":250,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","description":"The duration of rule group evaluations","fill":1,"id":10,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"1000 * rate(prometheus_evaluator_duration_seconds_sum{job=~\"$job\", instance=~\"$instance\"}[5m]) / rate(prometheus_evaluator_duration_seconds_count{job=~\"$job\", instance=~\"$instance\"}[5m])","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"E","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Average Rule Evaluation Duration","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Milliseconds","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":11,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(http_request_duration_microseconds_count{job=~\"$job\",instance=~\"$instance\"}[1m])) by (handler) \u003e 0","format":"time_series","intervalFactor":2,"legendFormat":"{{handler}}","refId":"A","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"HTTP Request Duration","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Microseconds","logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":15,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(prometheus_engine_query_duration_seconds_sum{job=~\"$job\",instance=~\"$instance\"}) by (slice)","format":"time_series","intervalFactor":2,"legendFormat":"{{slice}}","refId":"A","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Prometheus Engine Query Duration Seconds","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Seconds","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","description":"Rule-group evaluations \n - total\n - missed due to slow rule group evaluation\n - skipped due to throttled metric storage","fill":1,"id":31,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(prometheus_evaluator_iterations_total{job=~\"$job\", instance=~\"$instance\"}[5m]))","format":"time_series","intervalFactor":2,"legendFormat":"Total","refId":"B","step":4},{"expr":"sum(rate(prometheus_evaluator_iterations_missed_total{job=~\"$job\", instance=~\"$instance\"}[5m]))","format":"time_series","intervalFactor":2,"legendFormat":"Missed","refId":"A","step":4},{"expr":"sum(rate(prometheus_evaluator_iterations_skipped_total{job=~\"$job\", instance=~\"$instance\"}[5m]))","format":"time_series","intervalFactor":2,"legendFormat":"Skipped","refId":"C","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Rule Evaluator Iterations","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"iterations","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"durations","titleSize":"h6"},{"collapse":false,"height":250,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":22,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":12,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(prometheus_notifications_sent_total[5m])","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A","step":2}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Notifications Sent","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Notifications","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"notifications","titleSize":"h6"},{"collapse":false,"height":250,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":23,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"(time() - prometheus_config_last_reload_success_timestamp_seconds{job=~\"$job\",instance=~\"$instance\"}) / 60","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Minutes Since Successful Config Reload","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Minutes","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":24,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"prometheus_config_last_reload_successful{job=~\"$job\",instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A","step":4}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Successful Config Reload","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"decimals":0,"format":"short","label":"Success","logBase":1,"max":"1","min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"config","titleSize":"h6"},{"collapse":false,"height":250,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","description":"GC invocation durations","fill":1,"id":28,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":12,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(go_gc_duration_seconds_sum{instance=~\"$instance\",job=~\"$job\"}[2m])) by (instance)","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A","step":2}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"GC Rate / 2m","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"garbage collection","titleSize":"h6"},{"collapse":true,"height":250,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","description":"This is probably wrong!  Please help.","fill":1,"id":26,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"allocated","stack":false}],"spaceLength":10,"span":6,"stack":true,"steppedLine":false,"targets":[{"expr":"sum(go_memstats_alloc_bytes_total{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","hide":true,"intervalFactor":2,"legendFormat":"alloc_bytes_total","refId":"A","step":10},{"expr":"sum(go_memstats_alloc_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","hide":false,"intervalFactor":2,"legendFormat":"allocated","refId":"B","step":10},{"expr":"sum(go_memstats_buck_hash_sys_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"profiling bucket hash table","refId":"C","step":10},{"expr":"sum(go_memstats_gc_sys_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"GC metadata","refId":"D","step":10},{"expr":"sum(go_memstats_heap_alloc_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"heap in-use","refId":"E","step":10},{"expr":"sum(go_memstats_heap_idle_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"heap idle","refId":"F","step":10},{"expr":"sum(go_memstats_heap_inuse_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"heap in use","refId":"G","step":10},{"expr":"sum(go_memstats_heap_released_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"heap released","refId":"H","step":10},{"expr":"sum(go_memstats_heap_sys_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"heap system","refId":"I","step":10},{"expr":"sum(go_memstats_mcache_inuse_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"mcache in use","refId":"J","step":10},{"expr":"sum(go_memstats_mcache_sys_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"mcache sys","refId":"K","step":10},{"expr":"sum(go_memstats_mspan_inuse_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"mspan in use","refId":"L","step":10},{"expr":"sum(go_memstats_mspan_sys_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"mspan sys","refId":"M","step":10},{"expr":"sum(go_memstats_next_gc_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"heap next gc","refId":"N","step":10},{"expr":"sum(go_memstats_other_sys_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"other sys","refId":"O","step":10},{"expr":"sum(go_memstats_stack_inuse_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"stack in use","refId":"P","step":10},{"expr":"sum(go_memstats_stack_sys_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"stack sys","refId":"Q","step":10},{"expr":"sum(go_memstats_sys_bytes{job=~\"$job\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"sys","refId":"R","step":10}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Go Memory Usage (FIXME)","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","label":null,"logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":9,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":3,"stack":false,"steppedLine":false,"targets":[{"expr":"prometheus_target_interval_length_seconds{instance=~\"$instance\", job=~\"$job\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{quantile}} {{interval}}","refId":"A","step":20}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Scrape Duration","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Seconds","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"bf2jnz67bydj4c","fill":1,"id":7,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":1,"links":[],"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":3,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(prometheus_target_interval_length_seconds_count{job=~\"$job\",instance=~\"$instance\"}[5m])) by (interval)","format":"time_series","intervalFactor":2,"legendFormat":"{{interval}}","refId":"A","step":20}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Target Scrapes / 5m","tooltip":{"shared":true,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"short","label":"Scrapes","logBase":1,"max":null,"min":"0","show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":false,"title":"Broken, ignore","titleSize":"h6"}],"schemaVersion":14,"style":"dark","tags":[],"templating":{"list":[{"allValue":null,"current":{},"datasource":"bf2jnz67bydj4c","hide":0,"includeAll":true,"label":null,"multi":true,"name":"job","options":[],"query":"query_result(prometheus_tsdb_head_samples_appended_total)","refresh":2,"regex":"/.*job=\"([^\"]+)/","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"bf2jnz67bydj4c","hide":0,"includeAll":true,"label":null,"multi":true,"name":"instance","options":[],"query":"query_result(up{job=~\"$job\"})","refresh":2,"regex":"/.*instance=\"([^\"]+).*/","sort":0,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"selected":true,"text":"1h","value":"1h"},"hide":0,"includeAll":false,"label":null,"multi":false,"name":"interval","options":[{"selected":true,"text":"1h","value":"1h"},{"selected":false,"text":"3h","value":"3h"},{"selected":false,"text":"6h","value":"6h"},{"selected":false,"text":"12h","value":"12h"},{"selected":false,"text":"1d","value":"1d"},{"selected":false,"text":"2d","value":"2d"},{"selected":false,"text":"7d","value":"7d"},{"selected":false,"text":"30d","value":"30d"},{"selected":false,"text":"90d","value":"90d"},{"selected":false,"text":"180d","value":"180d"}],"query":"1h, 3h, 6h, 12h, 1d, 2d, 7d, 30d, 90d, 180d","type":"custom"}]},"time":{"from":"now-30m","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone":"","title":"Prometheus 2.0 Overview","uid":"0ffe4a3d-6005-4095-bfe0-11bd4f80e34e","version":1}


slug: host-health
title: Host Health
created: 2025-12-23 08:48:39
updated: 2025-12-23 08:48:39
uid: 18f08ded-7573-4d30-afaa-6c5191b0dd99
api_version: v0alpha1
data:
  {"dashboard":{"annotations":{"list":[{"builtIn":1,"datasource":{"type":"grafana","uid":"-- Grafana --"},"enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 1)","name":"Annotations \u0026 Alerts","type":"dashboard"}]},"editable":true,"graphTooltip":1,"panels":[{"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"fieldConfig":{"defaults":{"unit":"short"},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":0},"id":1,"options":{"legend":{"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"multi","sort":"none"}},"targets":[{"expr":"up","legendFormat":"{{job}} / {{instance}}","refId":"A"}],"title":"Targets up (all)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"fieldConfig":{"defaults":{"unit":"s"},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":0},"id":2,"options":{"legend":{"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"multi","sort":"none"}},"targets":[{"expr":"scrape_duration_seconds","legendFormat":"{{job}} / {{instance}}","refId":"A"}],"title":"Scrape duration (s)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"fieldConfig":{"defaults":{"unit":"percent"},"overrides":[]},"gridPos":{"h":8,"w":8,"x":0,"y":8},"id":3,"options":{"legend":{"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"multi","sort":"none"}},"targets":[{"expr":"100 - (avg by (instance) (irate(node_cpu_seconds_total{instance=\"$node_instance\", mode=\"idle\"}[5m])) * 100)","legendFormat":"{{instance}}","refId":"A"}],"title":"CPU usage (%)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"fieldConfig":{"defaults":{"unit":"bytes"},"overrides":[]},"gridPos":{"h":8,"w":8,"x":8,"y":8},"id":4,"options":{"legend":{"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"multi","sort":"none"}},"targets":[{"expr":"node_memory_MemTotal_bytes{instance=\"$node_instance\"} - node_memory_MemAvailable_bytes{instance=\"$node_instance\"}","legendFormat":"used","refId":"A"},{"expr":"node_memory_MemAvailable_bytes{instance=\"$node_instance\"}","legendFormat":"available","refId":"B"}],"title":"Memory used (bytes)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"fieldConfig":{"defaults":{"unit":"percent"},"overrides":[]},"gridPos":{"h":8,"w":8,"x":16,"y":8},"id":5,"options":{"legend":{"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"multi","sort":"none"}},"targets":[{"expr":"100 * (1 - (node_filesystem_avail_bytes{instance=\"$node_instance\", fstype!~\"tmpfs|overlay|squashfs\"} / node_filesystem_size_bytes{instance=\"$node_instance\", fstype!~\"tmpfs|overlay|squashfs\"}))","legendFormat":"{{mountpoint}}","refId":"A"}],"title":"Disk usage (%) by mount","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"fieldConfig":{"defaults":{"unit":"percent"},"overrides":[]},"gridPos":{"h":9,"w":12,"x":0,"y":16},"id":6,"options":{"legend":{"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"multi","sort":"none"}},"targets":[{"expr":"topk(10, 100 * (sum by (cname) (label_replace(rate(container_cpu_usage_seconds_total[5m]){instance=\"$cadvisor_instance\", name=~\"$container\"}, \"cname\", \"$1\", \"name\", \"(.*)\"))) or (sum by (cname) (label_replace(rate(container_cpu_usage_seconds_total[5m]){instance=\"$cadvisor_instance\", container=~\"$container\"}, \"cname\", \"$1\", \"container\", \"(.*)\"))))","legendFormat":"{{cname}}","refId":"A"}],"title":"Top container CPU (%)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"fieldConfig":{"defaults":{"unit":"bytes"},"overrides":[]},"gridPos":{"h":9,"w":12,"x":12,"y":16},"id":7,"options":{"legend":{"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"multi","sort":"none"}},"targets":[{"expr":"topk(10, (sum by (cname) (label_replace(container_memory_usage_bytes{instance=\"$cadvisor_instance\", name=~\"$container\"}, \"cname\", \"$1\", \"name\", \"(.*)\"))) or (sum by (cname) (label_replace(container_memory_usage_bytes{instance=\"$cadvisor_instance\", container=~\"$container\"}, \"cname\", \"$1\", \"container\", \"(.*)\"))))","legendFormat":"{{cname}}","refId":"A"}],"title":"Top container memory (bytes)","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"fieldConfig":{"defaults":{"unit":"Bps"},"overrides":[]},"gridPos":{"h":9,"w":24,"x":0,"y":25},"id":8,"options":{"legend":{"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"multi","sort":"none"}},"targets":[{"expr":"topk(10, (sum by (cname) (label_replace(rate(container_network_receive_bytes_total[5m]){instance=\"$cadvisor_instance\", name=~\"$container\"}, \"cname\", \"$1\", \"name\", \"(.*)\"))) or (sum by (cname) (label_replace(rate(container_network_receive_bytes_total[5m]){instance=\"$cadvisor_instance\", container=~\"$container\"}, \"cname\", \"$1\", \"container\", \"(.*)\"))))","legendFormat":"rx {{cname}}","refId":"A"},{"expr":"topk(10, (sum by (cname) (label_replace(rate(container_network_transmit_bytes_total[5m]){instance=\"$cadvisor_instance\", name=~\"$container\"}, \"cname\", \"$1\", \"name\", \"(.*)\"))) or (sum by (cname) (label_replace(rate(container_network_transmit_bytes_total[5m]){instance=\"$cadvisor_instance\", container=~\"$container\"}, \"cname\", \"$1\", \"container\", \"(.*)\"))))","legendFormat":"tx {{cname}}","refId":"B"}],"title":"Container network RX/TX (bytes/s)","type":"timeseries"}],"refresh":"10s","schemaVersion":39,"style":"dark","tags":["host","docker","prometheus"],"templating":{"list":[{"current":{"selected":false,"text":"default","value":"default"},"hide":0,"includeAll":false,"label":"Datasource","name":"DS_PROMETHEUS","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"current":{"selected":false,"text":"","value":""},"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"hide":0,"includeAll":false,"label":"Node instance","name":"node_instance","options":[],"query":"label_values(node_uname_info, instance)","refresh":2,"regex":"","type":"query"},{"current":{"selected":false,"text":"","value":""},"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"hide":0,"includeAll":false,"label":"cAdvisor instance","name":"cadvisor_instance","options":[],"query":"label_values(container_last_seen, instance)","refresh":2,"regex":"","type":"query"},{"current":{"selected":false,"text":"All","value":"$__all"},"datasource":{"type":"prometheus","uid":"${DS_PROMETHEUS}"},"hide":0,"includeAll":true,"label":"Container","name":"container","options":[],"query":"label_values(container_last_seen{instance=\"$cadvisor_instance\"}, name)","refresh":2,"regex":"^(?!/).*$","type":"query"}]},"time":{"from":"now-6h","to":"now"},"timepicker":{"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h"]},"timezone":"","title":"Host + Docker (flat import)","uid":"emy-host-docker-flat","version":1},"overwrite":true,"title":"Host Health","uid":"18f08ded-7573-4d30-afaa-6c5191b0dd99","version":1}


# preferences

theme: sapphiredusk
created: 2025-10-29 20:46:17
updated: 2025-10-29 20:46:17
week_start: monday
home_dashboard_uid: 0ffe4a3d-6005-4095-bfe0-11bd4f80e34e
json_data:
  {"language":"","regionalFormat":"","queryHistory":{"homeTab":""},"cookiePreferences":null,"navbar":{"bookmarkUrls":null}}


# alert_configuration

configuration_version: v1
configuration_hash: db463725de5126aef4e620cd05141bc5
alertmanager_configuration:
  {"template_files":null,"alertmanager_config":{"route":{"receiver":"grafana-default-email","group_by":["grafana_folder","alertname"]},"receivers":[{"name":"grafana-default-email","grafana_managed_receiver_configs":[{"uid":"","name":"email receiver","type":"email","disableResolveMessage":false,"settings":{"addresses":"\u003cexample@email.com\u003e"}}]},{"name":"cutemeli","grafana_managed_receiver_configs":[{"uid":"bf2jpgkk6bgu8c","name":"cutemeli","type":"telegram","disableResolveMessage":false,"settings":{"chatid":"1039774554","disable_notification":false,"disable_web_page_preview":false,"protect_content":false},"secureSettings":{"bottoken":"I1ptWXlhbTV5ZG5SMFpYRnlhMlkjKllXVnpMV05tWWcqd2Zoak1Lck0+yxCIIh7siRijJlnFSgisw6ggK8Ge8ho6iz/1b/qCRhuRc1rEzFHfniUtJ6tfyhRnQRQqZs0JKBnGoH6Hmg=="}}]}]}}


# alert_configuration_history

configuration_hash: ed091fbc8c639dd8063190127c806946
configuration_version: v1
alertmanager_configuration:
  {
  	"alertmanager_config": {
  		"route": {
  			"receiver": "grafana-default-email",
  			"group_by": ["grafana_folder", "alertname"]
  		},
  		"receivers": [{
  			"name": "grafana-default-email",
  			"grafana_managed_receiver_configs": [{
  				"uid": "",
  				"name": "email receiver",
  				"type": "email",
  				"settings": {
  					"addresses": "<example@email.com>"
  				}
  			}]
  		}]
  	}
  }


# kv_store

namespace: plugin.angularpatterns
key: angular_patterns
created: 2025-10-29 20:29:02
updated: 2025-10-29 20:29:02
value:
  [{"Name":"PanelCtrl","Pattern":"PanelCtrl","Type":"contains"},{"Name":"ConfigCtrl","Pattern":"ConfigCtrl","Type":"contains"},{"Name":"app/plugins/sdk","Pattern":"app/plugins/sdk","Type":"contains"},{"Name":"Angular Specific Function","Pattern":"angular.isNumber(","Type":"contains"},{"Name":"ctrl.annotation","Pattern":"ctrl.annotation","Type":"contains"},{"Name":"QueryCtrl","Pattern":"[\"']QueryCtrl[\"']","Type":"regex"}]


namespace: plugin.publickeys
key: key-7e4d0c6a708866e7
created: 2025-10-29 20:29:02
updated: 2025-10-29 20:29:02
value:
  -----BEGIN PGP PUBLIC KEY BLOCK-----
  Version: OpenPGP.js v4.10.1
  Comment: https://openpgpjs.org

  xpMEXpTXXxMFK4EEACMEIwQBiOUQhvGbDLvndE0fEXaR0908wXzPGFpf0P0Z
  HJ06tsq+0higIYHp7WTNJVEZtcwoYLcPRGaa9OQqbUU63BEyZdgAkPTz3RFd
  5+TkDWZizDcaVFhzbDd500yTwexrpIrdInwC/jrgs7Zy/15h8KA59XXUkdmT
  YB6TR+OA9RKME+dCJozNGUdyYWZhbmEgPGVuZ0BncmFmYW5hLmNvbT7CvAQQ
  EwoAIAUCXpTXXwYLCQcIAwIEFQgKAgQWAgEAAhkBAhsDAh4BAAoJEH5NDGpw
  iGbnaWoCCQGQ3SQnCkRWrG6XrMkXOKfDTX2ow9fuoErN46BeKmLM4f1EkDZQ
  Tpq3SE8+My8B5BIH3SOcBeKzi3S57JHGBdFA+wIJAYWMrJNIvw8GeXne+oUo
  NzzACdvfqXAZEp/HFMQhCKfEoWGJE8d2YmwY2+3GufVRTI5lQnZOHLE8L/Vc
  1S5MXESjzpcEXpTXXxIFK4EEACMEIwQBtHX/SD5Qm3v4V92qpaIZQgtTX0sT
  cFPjYWAHqsQ1iENrYN/vg1wU3ADlYATvydOQYvkTyT/tbDvx2Fse8PL84MQA
  YKKQ6AJ3gLVvmeouZdU03YoV4MYaT8KbnJUkZQZkqdz2riOlySNI9CG3oYmv
  omjUAtzgAgnCcurfGLZkkMxlmY8DAQoJwqQEGBMKAAkFAl6U118CGwwACgkQ
  fk0ManCIZuc0jAIJAVw2xdLr4ZQqPUhubrUyFcqlWoW8dQoQagwO8s8ubmby
  KuLA9FWJkfuuRQr+O9gHkDVCez3aism7zmJBqIOi38aNAgjJ3bo6leSS2jR/
  x5NqiKVi83tiXDPncDQYPymOnMhW0l7CVA7wj75HrFvvlRI/4MArlbsZ2tBn
  N1c5v9v/4h6qeA==
  =DNbR
  -----END PGP PUBLIC KEY BLOCK-----


# signing_key

key_id: id-2025-10-es256
added_at: 2025-10-29 20:38:33.713754119+00:00
expires_at: 2025-11-28 20:38:33.713754119+00:00
alg: ES256
private_key:
  I1ptWXlhbTV5ZG5SMFpYRnlhMlkjKllXVnpMV05tWWcqTU5qMTVMZXRzm+N/ATgeicE92OXyhM34/2RhX9euzld6yE5XZ9nl2s5ei668stXeo05/sj9ju/DsWY/0wWAA3yNdL6qANl4UjN5LYWsWjKpiZ6XcAtCaKiWdVhB2qOBCUQMNhB9N0uRO5M9Q2+8wa21z8vCaazXbOMAcv8qw/PK3hfThhy56F8mAn97kjXGBSKfNgVwQ1v0tEOmexKgc/oW6HsMG2GNc4/VmYncQizl+XFZibNdsqRHYs99RTvkvm9mUt9CGWBVZk3tYPvB/y4X926qR9f13DklrF1T1vE0kAK/YViFUpqjWQ9XmR6AqBIdI4Nt64LGMrgUsbKAiizJ3PX1CeTgfpg


key_id: id-2025-12-es256
added_at: 2025-12-06 15:28:45.390697454+00:00
expires_at: 2026-01-05 15:28:45.390697454+00:00
alg: ES256
private_key:
  I1ltWTJZV2huYUdFeU16WjViMlUjKllXVnpMV05tWWcqZnhGb0FZSEQhvjCoF3DoTVKgdM881uyRwYYwCeaeEivPEy+pYDowbHZ4x800CyUC2gv1Lu81nfEXqzy8Y1YKNulhEjv9xMh0XApqTT9WGhZZxhsaCUV+Qju10JzUeaGmy43UgitvvYr17gz5wMdsX4u7BZJ5ZGEFw1sDpcAvTQ9RhHxIdld/KmrdlmfU/H0h3mLDvSEwiMjgNLlYiwTtRjRtP3XVVJq2NjB5A+7sloCWvxmeIa9rLV+FJe5CFfev7TXxJQNH/e3HxEBbhmdpkLpx/7tYQQ+H6nWge/gEIocmLmp4yBj/8VUiqYJKeWQMIe16uomNQomRN24u8q/jZLQFkgy9eVMEag


# resource_migration_log

migration_id: create resource_migration_log table
timestamp: 2025-10-29 20:29:02
sql:
  CREATE TABLE IF NOT EXISTS `resource_migration_log` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `migration_id` TEXT NOT NULL
  , `sql` TEXT NOT NULL
  , `success` INTEGER NOT NULL
  , `error` TEXT NOT NULL
  , `timestamp` DATETIME NOT NULL
  );


migration_id: create table resource
timestamp: 2025-10-29 20:29:02
sql:
  CREATE TABLE IF NOT EXISTS `resource` (
  `guid` TEXT PRIMARY KEY NOT NULL
  , `resource_version` INTEGER NULL
  , `group` TEXT NOT NULL
  , `resource` TEXT NOT NULL
  , `namespace` TEXT NOT NULL
  , `name` TEXT NOT NULL
  , `value` TEXT NULL
  , `action` INTEGER NOT NULL
  , `label_set` TEXT NULL
  );


migration_id: create table resource, index: 0
timestamp: 2025-10-29 20:29:02
sql:
  CREATE UNIQUE INDEX `UQE_resource_namespace_group_resource_name` ON `resource` (`namespace`,`group`,`resource`,`name`);


migration_id: create table resource_history
timestamp: 2025-10-29 20:29:02
sql:
  CREATE TABLE IF NOT EXISTS `resource_history` (
  `guid` TEXT PRIMARY KEY NOT NULL
  , `resource_version` INTEGER NULL
  , `group` TEXT NOT NULL
  , `resource` TEXT NOT NULL
  , `namespace` TEXT NOT NULL
  , `name` TEXT NOT NULL
  , `value` TEXT NULL
  , `action` INTEGER NOT NULL
  , `label_set` TEXT NULL
  );


migration_id: create table resource_history, index: 0
timestamp: 2025-10-29 20:29:02
sql:
  CREATE UNIQUE INDEX `UQE_resource_history_namespace_group_name_version` ON `resource_history` (`namespace`,`group`,`resource`,`name`,`resource_version`);


migration_id: create table resource_version
timestamp: 2025-10-29 20:29:02
sql:
  CREATE TABLE IF NOT EXISTS `resource_version` (
  `group` TEXT NOT NULL
  , `resource` TEXT NOT NULL
  , `resource_version` INTEGER NOT NULL
  );


migration_id: create table resource_version, index: 0
timestamp: 2025-10-29 20:29:02
sql:
  CREATE UNIQUE INDEX `UQE_resource_version_group_resource` ON `resource_version` (`group`,`resource`);


migration_id: create table resource_blob
timestamp: 2025-10-29 20:29:02
sql:
  CREATE TABLE IF NOT EXISTS `resource_blob` (
  `uuid` UUID PRIMARY KEY NOT NULL
  , `created` DATETIME NOT NULL
  , `group` TEXT NOT NULL
  , `resource` TEXT NOT NULL
  , `namespace` TEXT NOT NULL
  , `name` TEXT NOT NULL
  , `value` BLOB NOT NULL
  , `hash` TEXT NOT NULL
  , `content_type` TEXT NOT NULL
  );


migration_id: create table resource_blob, index: 0
timestamp: 2025-10-29 20:29:02
sql:
  CREATE INDEX `IDX_resource_history_namespace_group_name` ON `resource_blob` (`namespace`,`group`,`resource`,`name`);


migration_id: Add index to resource_history for polling
timestamp: 2025-10-29 20:29:02
sql:
  CREATE INDEX `IDX_resource_history_group_resource_resource_version` ON `resource_history` (`group`,`resource`,`resource_version`);


migration_id: Add index to resource_history for get trash
timestamp: 2025-10-29 20:29:02
sql:
  CREATE INDEX `IDX_resource_history_namespace_group_resource_action_version` ON `resource_history` (`namespace`,`group`,`resource`,`action`,`resource_version`);


migration_id: Add generation index to resource history
timestamp: 2025-10-29 20:29:02
sql:
  CREATE INDEX `IDX_resource_history_namespace_group_resource_name_generation` ON `resource_history` (`namespace`,`group`,`resource`,`name`,`generation`);


# secret_migration_log

migration_id: create secret_migration_log table
timestamp: 2025-10-29 20:29:02
sql:
  CREATE TABLE IF NOT EXISTS `secret_migration_log` (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
  , `migration_id` TEXT NOT NULL
  , `sql` TEXT NOT NULL
  , `success` INTEGER NOT NULL
  , `error` TEXT NOT NULL
  , `timestamp` DATETIME NOT NULL
  );


migration_id: create table secret_secure_value
timestamp: 2025-10-29 20:29:02
sql:
  CREATE TABLE IF NOT EXISTS `secret_secure_value` (
  `guid` TEXT PRIMARY KEY NOT NULL
  , `name` TEXT NOT NULL
  , `namespace` TEXT NOT NULL
  , `annotations` TEXT NULL
  , `labels` TEXT NULL
  , `created` INTEGER NOT NULL
  , `created_by` TEXT NOT NULL
  , `updated` INTEGER NOT NULL
  , `updated_by` TEXT NOT NULL
  , `external_id` TEXT NOT NULL
  , `active` INTEGER NOT NULL
  , `version` INTEGER NOT NULL
  , `description` TEXT NOT NULL
  , `keeper` TEXT NULL
  , `decrypters` TEXT NULL
  , `ref` TEXT NULL
  );


migration_id: create table secret_secure_value, index: 0
timestamp: 2025-10-29 20:29:02
sql:
  CREATE UNIQUE INDEX `UQE_secret_secure_value_namespace_name_version_active` ON `secret_secure_value` (`namespace`,`name`,`version`,`active`);


migration_id: create table secret_secure_value, index: 1
timestamp: 2025-10-29 20:29:02
sql:
  CREATE UNIQUE INDEX `UQE_secret_secure_value_namespace_name_version` ON `secret_secure_value` (`namespace`,`name`,`version`);


migration_id: create table secret_keeper
timestamp: 2025-10-29 20:29:02
sql:
  CREATE TABLE IF NOT EXISTS `secret_keeper` (
  `guid` TEXT PRIMARY KEY NOT NULL
  , `name` TEXT NOT NULL
  , `namespace` TEXT NOT NULL
  , `annotations` TEXT NULL
  , `labels` TEXT NULL
  , `created` INTEGER NOT NULL
  , `created_by` TEXT NOT NULL
  , `updated` INTEGER NOT NULL
  , `updated_by` TEXT NOT NULL
  , `description` TEXT NOT NULL
  , `type` TEXT NOT NULL
  , `payload` TEXT NULL
  );


migration_id: create table secret_data_key
timestamp: 2025-10-29 20:29:02
sql:
  CREATE TABLE IF NOT EXISTS `secret_data_key` (
  `uid` TEXT PRIMARY KEY NOT NULL
  , `namespace` TEXT NOT NULL
  , `label` TEXT NOT NULL
  , `active` INTEGER NOT NULL
  , `provider` TEXT NOT NULL
  , `encrypted_data` BLOB NOT NULL
  , `created` DATETIME NOT NULL
  , `updated` DATETIME NOT NULL
  );


migration_id: create table secret_encrypted_value
timestamp: 2025-10-29 20:29:02
sql:
  CREATE TABLE IF NOT EXISTS `secret_encrypted_value` (
  `namespace` TEXT NOT NULL
  , `name` TEXT NOT NULL
  , `version` INTEGER NOT NULL
  , `encrypted_data` BLOB NOT NULL
  , `created` INTEGER NOT NULL
  , `updated` INTEGER NOT NULL
  );


migration_id: create table secret_encrypted_value, index: 0
timestamp: 2025-10-29 20:29:02
sql:
  CREATE UNIQUE INDEX `UQE_secret_encrypted_value_namespace_name_version` ON `secret_encrypted_value` (`namespace`,`name`,`version`);


migration_id: create index for list on secret_secure_value
timestamp: 2025-10-29 20:29:02
sql:
  CREATE INDEX `IDX_secret_secure_value_namespace_active_updated` ON `secret_secure_value` (`namespace`,`active`,`updated`);


migration_id: create index for list and read current on secret_data_key
timestamp: 2025-10-29 20:29:02
sql:
  CREATE INDEX `IDX_secret_data_key_namespace_label_active` ON `secret_data_key` (`namespace`,`label`,`active`);


