MacBook之GrafanaByPostgreSQL

Macbook Version

macOS Mojave
10.14.6 (18G87)

Work Directory

~/grafana_work

Install Grafana

Reference

install_grafana_for_macbook

Prepare work of database [ PostgreSQL 11.4 ]

create database grafana;
create user grafana password 'grafana';

create database grafana_moni;

Install grafana for Macbook

curl -O https://dl.grafana.com/oss/release/grafana-7.3.6.darwin-amd64.tar.gz

tar -zxvf grafana-7.3.6.darwin-amd64.tar.gz

Modify the default database to PostgreSQL

cd ~/grafana_work/grafana-7.3.6/conf/
cp defaults.ini custom.ini

## modify the parameter of chapter `[database]` 
type = postgres
host = 127.0.0.1:5432
name = grafana
user = grafana
password = grafana

Start Grafana

cd /Users/fei/work/grafana_work/grafana-7.3.6/bin
➜   ./grafana-server

The flowchart of parse start sequence

flow.png

Display info

fei@feideMacBook-Pro: /Users/fei/work/grafana_work/grafana-7.3.6/bin
➜   ./grafana-server
INFO[12-19|22:23:45] Starting Grafana                         logger=server version=7.3.6 commit=ea06633c34 branch=HEAD compiled=2020-12-14T17:19:44+0800
INFO[12-19|22:23:45] Config loaded from                       logger=settings file=/Users/fei/work/grafana_work/grafana-7.3.6/conf/defaults.ini
INFO[12-19|23:08:23] Config loaded from                       logger=settings file=/Users/fei/work/grafana_work/grafana-7.3.6/conf/custom.ini
INFO[12-19|22:23:45] Path Home                                logger=settings path=/Users/fei/work/grafana_work/grafana-7.3.6
INFO[12-19|22:23:45] Path Data                                logger=settings path=/Users/fei/work/grafana_work/grafana-7.3.6/data
INFO[12-19|22:23:45] Path Logs                                logger=settings path=/Users/fei/work/grafana_work/grafana-7.3.6/data/log
INFO[12-19|22:23:45] Path Plugins                             logger=settings path=/Users/fei/work/grafana_work/grafana-7.3.6/data/plugins
INFO[12-19|22:23:45] Path Provisioning                        logger=settings path=/Users/fei/work/grafana_work/grafana-7.3.6/conf/provisioning
INFO[12-19|22:23:45] App mode production                      logger=settings
INFO[12-19|22:23:45] Connecting to DB                         logger=sqlstore dbtype=sqlite3
INFO[12-19|22:23:45] Creating SQLite database file            logger=sqlstore path=/Users/fei/work/grafana_work/grafana-7.3.6/data/grafana.db
INFO[12-19|22:23:45] Starting DB migrations                   logger=migrator
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create migration_log table"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create user table"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="add unique index user.login"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="add unique index user.email"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="drop index UQE_user_login - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="drop index UQE_user_email - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Rename table user to user_v1 - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create user table v2"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index UQE_user_login - v2"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index UQE_user_email - v2"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="copy data_source v1 to v2"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Drop old table user_v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Add column help_flags1 to user table"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Update user table charset"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Add last_seen_at column to user"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Add missing user data"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Add is_disabled column to user"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Add index user.login/user.email"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create temp user table v1-7"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index IDX_temp_user_email - v1-7"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index IDX_temp_user_org_id - v1-7"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index IDX_temp_user_code - v1-7"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index IDX_temp_user_status - v1-7"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Update temp_user table charset"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="drop index IDX_temp_user_email - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="drop index IDX_temp_user_org_id - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="drop index IDX_temp_user_code - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="drop index IDX_temp_user_status - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Rename table temp_user to temp_user_tmp_qwerty - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create temp_user v2"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index IDX_temp_user_email - v2"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index IDX_temp_user_org_id - v2"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index IDX_temp_user_code - v2"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index IDX_temp_user_status - v2"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="copy temp_user v1 to v2"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="drop temp_user_tmp_qwerty"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Set created for temp users that will otherwise prematurely expire"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create star table"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="add unique index star.user_id_dashboard_id"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create org table v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index UQE_org_name - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create org_user table v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index IDX_org_user_org_id - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create index UQE_org_user_org_id_user_id - v1"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Update org table charset"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Update org_user table charset"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="Migrate all Read Only Viewers to Viewers"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create dashboard table"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="add index dashboard.account_id"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="add unique index dashboard_account_id_slug"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="create dashboard_tag table"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="add unique index dashboard_tag.dasboard_id_term"
INFO[12-19|22:23:45] Executing migration                      logger=migrator id="drop index UQE_dashboard_tag_dashboard_id_term - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Rename table dashboard to dashboard_v1 - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create dashboard v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index IDX_dashboard_org_id - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index UQE_dashboard_org_id_slug - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="copy dashboard v1 to v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop table dashboard_v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="alter dashboard.data to mediumtext v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column updated_by in dashboard - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column created_by in dashboard - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column gnetId in dashboard"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index for gnetId in dashboard"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column plugin_id in dashboard"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index for plugin_id in dashboard"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index for dashboard_id in dashboard_tag"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update dashboard table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update dashboard_tag table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column folder_id in dashboard"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column isFolder in dashboard"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column has_acl in dashboard"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column uid in dashboard"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update uid column values in dashboard"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add unique index dashboard_org_id_uid"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Remove unique index org_id_slug"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update dashboard title length"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add unique index for dashboard_org_id_title_folder_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create dashboard_provisioning"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Rename table dashboard_provisioning to dashboard_provisioning_tmp_qwerty - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create dashboard_provisioning v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index IDX_dashboard_provisioning_dashboard_id - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index IDX_dashboard_provisioning_dashboard_id_name - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="copy dashboard_provisioning v1 to v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop dashboard_provisioning_tmp_qwerty"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add check_sum column"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index for dashboard_title"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="delete tags for deleted dashboards"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="delete stars for deleted dashboards"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create data_source table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index data_source.account_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add unique index data_source.account_id_name"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop index IDX_data_source_account_id - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop index UQE_data_source_account_id_name - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Rename table data_source to data_source_v1 - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create data_source table v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index IDX_data_source_org_id - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index UQE_data_source_org_id_name - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="copy data_source v1 to v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Drop old table data_source_v1 #2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column with_credentials"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add secure json data column"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update data_source table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update initial version to 1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add read_only data column"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Migrate logging ds to loki ds"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update json_data with nulls"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add uid column"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update uid value"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add unique index datasource_org_id_uid"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create api_key table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index api_key.account_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index api_key.key"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index api_key.account_id_name"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop index IDX_api_key_account_id - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop index UQE_api_key_key - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop index UQE_api_key_account_id_name - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Rename table api_key to api_key_v1 - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create api_key table v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index IDX_api_key_org_id - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index UQE_api_key_key - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index UQE_api_key_org_id_name - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="copy api_key v1 to v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Drop old table api_key_v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update api_key table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add expires to api_key table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create dashboard_snapshot table v4"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop table dashboard_snapshot_v4 #1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create dashboard_snapshot table v5 #2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index UQE_dashboard_snapshot_key - v5"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index UQE_dashboard_snapshot_delete_key - v5"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index IDX_dashboard_snapshot_user_id - v5"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="alter dashboard_snapshot to mediumtext v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update dashboard_snapshot table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column external_delete_url to dashboard_snapshots table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add encrypted dashboard json column"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Change dashboard_encrypted column to MEDIUMBLOB"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create quota table v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index UQE_quota_org_id_user_id_target - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update quota table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create plugin_setting table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index UQE_plugin_setting_org_id_plugin_id - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column plugin_version to plugin_settings"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update plugin_setting table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create session table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Drop old table playlist table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Drop old table playlist_item table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create playlist table v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create playlist item table v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update playlist table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update playlist_item table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop preferences table v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop preferences table v3"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create preferences table v3"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update preferences table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column team_id in preferences"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update team_id column values in preferences"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create alert table v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index alert org_id & id "
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index alert state"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index alert dashboard_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Create alert_rule_tag table v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add unique index alert_rule_tag.alert_id_tag_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create alert_notification table v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column is_default"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column frequency"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column send_reminder"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column disable_resolve_message"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index alert_notification org_id & name"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update alert table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update alert_notification table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create notification_journal table v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index notification_journal org_id & alert_id & notifier_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop alert_notification_journal"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create alert_notification_state table v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index alert_notification_state org_id & alert_id & notifier_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add for to alert table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column uid in alert_notification"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update uid column values in alert_notification"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add unique index alert_notification_org_id_uid"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Remove unique index org_id_name"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column secure_settings in alert_notification"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="alter alert.settings to mediumtext"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add non-unique index alert_notification_state_alert_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add non-unique index alert_rule_tag_alert_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Drop old annotation table v4"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create annotation table v5"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index annotation 0 v3"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index annotation 1 v3"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index annotation 2 v3"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index annotation 3 v3"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index annotation 4 v3"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update annotation table charset"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column region_id to annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Drop category_id index"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column tags to annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Create annotation_tag table v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add unique index annotation_tag.annotation_id_tag_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Update alert annotations and set TEXT to empty"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add created time to annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add updated time to annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index for created in annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index for updated in annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Convert existing annotations from seconds to milliseconds"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add epoch_end column"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index for epoch_end"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Make epoch_end the same as epoch"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Move region to single row"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Remove index org_id_epoch from annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Remove index org_id_dashboard_id_panel_id_epoch from annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index for org_id_dashboard_id_epoch_end_epoch on annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index for org_id_epoch_end_epoch on annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Remove index org_id_epoch_epoch_end from annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index for alert_id on annotation table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create test_data table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create dashboard_version table v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index dashboard_version.dashboard_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add unique index dashboard_version.dashboard_id and dashboard_version.version"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Set dashboard version to 1 where 0"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="save existing dashboard data in dashboard_version table v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="alter dashboard_version.data to mediumtext v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create team table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index team.org_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add unique index team_org_id_name"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create team member table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index team_member.org_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add unique index team_member_org_id_team_id_user_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index team_member.team_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column email to team table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column external to team_member table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add column permission to team_member table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create dashboard acl table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index dashboard_acl_dashboard_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add unique index dashboard_acl_dashboard_id_user_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add unique index dashboard_acl_dashboard_id_team_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="save default acl rules in dashboard_acl table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="delete acl rules for deleted dashboards and folders"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create tag table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index tag.key_value"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create login attempt table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index login_attempt.username"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop index IDX_login_attempt_username - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Rename table login_attempt to login_attempt_tmp_qwerty - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create login_attempt v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index IDX_login_attempt_username - v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="copy login_attempt v1 to v2"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="drop login_attempt_tmp_qwerty"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create user auth table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create index IDX_user_auth_auth_module_auth_id - v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="alter user_auth.auth_id to length 190"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add OAuth access token to user_auth"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add OAuth refresh token to user_auth"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add OAuth token type to user_auth"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add OAuth expiry to user_auth"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="Add index to user_id column in user_auth"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create server_lock table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index server_lock.operation_uid"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create user auth token table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add unique index user_auth_token.auth_token"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add unique index user_auth_token.prev_auth_token"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index user_auth_token.user_id"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create cache_data table"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add unique index cache_data.cache_key"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="create short_url table v1"
INFO[12-19|22:23:46] Executing migration                      logger=migrator id="add index short_url.org_id-uid"
INFO[12-19|22:23:46] Created default admin                    logger=sqlstore user=admin
INFO[12-19|22:23:46] Starting plugin search                   logger=plugins
INFO[12-19|22:23:46] Registering plugin                       logger=plugins id=input
INFO[12-19|22:23:46] External plugins directory created       logger=plugins directory=/Users/fei/work/grafana_work/grafana-7.3.6/data/plugins
INFO[12-19|22:23:46] HTTP Server Listen                       logger=http.server address=[::]:3000 protocol=http subUrl= socket=

WEB login grafana

http://localhost:3000/

user: admin
pass: admin

Configure grafana

Add data sources for PostgreSQL

Configuration -> Data Sources
20201219_grf.png

Grafana Tutorials

tutorials

Add User

20201220_grf_adduser_01.png

Add Teams

20201220_grf_02.png

Invite user

20201220_grf_03.png

Dashboards

Manage Dashboards

20201221_d.png

Dashboards Store

dashboards_store

Demo

Prepare TimescaleDB for DASHBOARD [ PostgreSQL Infrastructure ]

PGDATABASE=collectd
PGUSER=monitoring
PGPASSWORD=password123

## stall collectd_timescaledb_bootstrap.sql into Database [ PostgreSQL ]
psql -d collectd -f collectd_timescaledb_bootstrap.sql 

collectd_timescaledb_bootstrap.sql

Add data sources for PostgreSQL [ TimescaleDB ]

20201221_demo.png

Select Dashboards

the_dashboards_of_PostgreSQL Infrastructure

Import json of Dashboards [ postgresql-infrastructure_rev2.json ]

20201221_d.png

Select Database

20201221_demo02.png
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 212,884评论 6 492
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,755评论 3 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 158,369评论 0 348
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,799评论 1 285
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,910评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,096评论 1 291
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,159评论 3 411
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,917评论 0 268
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,360评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,673评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,814评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,509评论 4 334
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,156评论 3 317
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,882评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,123评论 1 267
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,641评论 2 362
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,728评论 2 351

推荐阅读更多精彩内容