Prometheus/Grafanaメモ - (1)Podmanでのテスト環境構築

# はじめに
クラウド上のサービスなどを中心にパフォーマンス情報を集約して管理/可視化するOSSとしてPrometheus、Grafanaというのは色々なところで使われています。
テストでPrometheus, Grafanaの環境を作る必要があったので、手っ取り早く環境を作った時のログを備忘録として残しておきます。
今回はRHEL上のPodmanを使ってコンテナとして稼働させます。

## 関連記事
[Prometheus/Grafanaメモ - (1)Podmanでのテスト環境構築](https://qiita.com/tomotagwork/items/5c557d871530ff47f35d)
[Prometheus/Grafanaメモ - (2)GrafanaのDashboadを作ってみる](https://qiita.com/tomotagwork/items/72ca04949b0b99dba871)

# おさらい
一応Prometheus, Grafanaについての概要補足。
**[Prometheus](https://prometheus.io/)** とは
パフォーマンス情報などを管理するためのOSSです。各管理対象に対してデータ取得のリクエストを定期的に発行してメトリック情報を蓄積していきます。つまり、"Pull型"のアーキテクチャーです。PrometheusはPromQLというクエリ言語を提供しています。

**[Grafana](https://grafana.com/)** とは
様々なデータソースに蓄えられた情報を簡単に可視化するための機能を提供するOSSです。時系列のグラフなどを1つのダッシュボードに表示して監視や分析を行うことができます。Prometheus上に蓄積されたデータの可視化ツールとしてよく利用されます。Prometheus自体にも可視化のためのインターフェースは提供されていますが、より使いやすく、より汎用的な可視化機能が提供されています。(Prometheus以外の多様なデータソースの可視化も可能)
GrafanaでPrometheusのデータを可視化する際には内部的にPromQLが発行されてPrometheus上のデータを取得することになります。

位置づけとしてはPrometheus/Grafana は Elasticsearch/Kibana の関係に似ていますね。

# 環境構築
RHEL V8.5
Podman V3.3.1
Prometheus V2.38
Grafana V9.1.2

## 全体像
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/7dd766a4-26b3-af83-8af6-8bedf3509ac5.png)
上の赤枠部分の環境を作るイメージです。

## Prometheus

### 事前準備
構成ファイルやデータのディレクトリは永続化するため、ホストOS側にディレクトリを作成しコンテナからアクセスできるようにパーミッションを変更しておきます。

```
[root@test14 ~]# mkdir -p /root/Prometheus/config
[root@test14 ~]# mkdir -p /root/Prometheus/data

[root@test14 ~]# chmod 777 /root/Prometheus/config
[root@test14 ~]# chmod 777 /root/Prometheus/data
```

現時点での最新のDockerイメージ "docker.io/prom/prometheus:latest"を使用します。
まずダミーでコンテナ作成してデフォルトの構成ファイル `/etc/prometheus/prometheus.yml`を取得します。

```
[root@test14 ~]# podman run -d --rm --name prometheus_temp docker.io/prom/prometheus:latest
9ed84ded0e98d3ee681ad7499c548f784bb29e6f11b43490cda4f9acbd83c5dc

[root@test14 ~]# podman cp prometheus_temp:/etc/prometheus/prometheus.yml /root/Prometheus/config/

[root@test14 ~]# podman stop prometheus_temp
prometheus_temp
```

### 構成ファイル編集

必要に応じて /root/Prometheus/config/prometheus.yml を編集します。まずはデフォルトのまま。

```yml:prometheus.yml 
# my global config
global:
  scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
  alertmanagers:
    - static_configs:
        - targets:
          # - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: "prometheus"

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
      - targets: ["localhost:9090"]
```

上のYAMLでは`.scrape_configs.job_name`に監視対象の定義をしていくことになりますが、デフォルトではprometheus自身のメトリックを取得する構成が追加されているようです。

### 起動

起動用スクリプトを作成しておきます。

```sh:run.sh
#!/bin/bash

podman run -d --rm \
        --name prometheus \
        -v /root/Prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml \
        -v /root/Prometheus/data:/prometheus \
        --net=host \
        docker.io/prom/prometheus:latest
```

構成ファイルとデータ用のディレクトリは永続化のためホストのディレクトリをマッピングしています。
今後、Grafanaや他の監視対象のコンポーネントも同OS上の別コンテナとして作成してテストする都合上、'--net=host`を指定してホストOSのネットワークに直接接続するようにします。(ホストネットワークを使うのでポート公開の指定は不要)


上のスクリプトを使用して起動します。

```
[root@test14 ~/Prometheus]# ./run.sh
6bf786110a5c6e83cb5095b5bd3959af775630ffde452e832c27d16024cd24e4

[root@test14 ~/Prometheus]# podman ps
CONTAINER ID  IMAGE                             COMMAND               CREATED        STATUS            PORTS       NAMES
6bf786110a5c  docker.io/prom/prometheus:latest  --config.file=/et...  4 seconds ago  Up 4 seconds ago              prometheus

[root@test14 ~/Prometheus]# netstat -an | grep 9090
tcp6       0      0 :::9090                 :::*                    LISTEN
tcp6       0      0 ::1:9090                ::1:45446               ESTABLISHED
tcp6       0      0 ::1:45446               ::1:9090                ESTABLISHED
```

Prometheusはデフォルトで9090番ポートをListenします。

<details><summary><font color="blue">起動時ログ</font></summary><div>

```
[root@test14 ~/Prometheus]# podman logs -f prometheus
ts=2022-09-16T02:58:33.332Z caller=main.go:495 level=info msg="No time or size retention was set so using the default time retention" duration=15d
ts=2022-09-16T02:58:33.332Z caller=main.go:539 level=info msg="Starting Prometheus Server" mode=server version="(version=2.38.0, branch=HEAD, revision=818d6e60888b2a3ea363aee8a9828c7bafd73699)"
ts=2022-09-16T02:58:33.332Z caller=main.go:544 level=info build_context="(go=go1.18.5, user=root@e6b781f65453, date=20220816-13:23:14)"
ts=2022-09-16T02:58:33.332Z caller=main.go:545 level=info host_details="(Linux 4.18.0-348.el8.x86_64 #1 SMP Mon Oct 4 12:17:22 EDT 2021 x86_64 test14 (none))"
ts=2022-09-16T02:58:33.332Z caller=main.go:546 level=info fd_limits="(soft=1048576, hard=1048576)"
ts=2022-09-16T02:58:33.332Z caller=main.go:547 level=info vm_limits="(soft=unlimited, hard=unlimited)"
ts=2022-09-16T02:58:33.333Z caller=web.go:553 level=info component=web msg="Start listening for connections" address=0.0.0.0:9090
ts=2022-09-16T02:58:33.339Z caller=main.go:976 level=info msg="Starting TSDB ..."
ts=2022-09-16T02:58:33.340Z caller=repair.go:56 level=info component=tsdb msg="Found healthy block" mint=1663056541216 maxt=1663063200000 ulid=01GCV8KGDACND60YGXVJAX2874
ts=2022-09-16T02:58:33.340Z caller=repair.go:56 level=info component=tsdb msg="Found healthy block" mint=1663063200000 maxt=1663070400000 ulid=01GD20TKHGMZPAQCE8ZBYRM8ND
ts=2022-09-16T02:58:33.340Z caller=repair.go:56 level=info component=tsdb msg="Found healthy block" mint=1663070401216 maxt=1663077600000 ulid=01GD20TKJVDCQGH6S4HGQF3SHE
ts=2022-09-16T02:58:33.340Z caller=repair.go:56 level=info component=tsdb msg="Found healthy block" mint=1662446026209 maxt=1662465600000 ulid=01GD20TKPM3Q2NA0CWECAFJXMG
ts=2022-09-16T02:58:33.349Z caller=tls_config.go:195 level=info component=web msg="TLS is disabled." http2=false
ts=2022-09-16T02:58:33.353Z caller=head.go:495 level=info component=tsdb msg="Replaying on-disk memory mappable chunks if any"
ts=2022-09-16T02:58:33.353Z caller=head.go:538 level=info component=tsdb msg="On-disk memory mappable chunks replay completed" duration=105.983μs
ts=2022-09-16T02:58:33.353Z caller=head.go:544 level=info component=tsdb msg="Replaying WAL, this may take a while"
ts=2022-09-16T02:58:33.363Z caller=head_wal.go:371 level=warn component=tsdb msg="Unknown series references" samples=2113 exemplars=0 metadata=0
ts=2022-09-16T02:58:33.363Z caller=head.go:580 level=info component=tsdb msg="WAL checkpoint loaded"
ts=2022-09-16T02:58:33.376Z caller=head.go:615 level=info component=tsdb msg="WAL segment loaded" segment=18 maxSegment=21
ts=2022-09-16T02:58:33.376Z caller=head.go:615 level=info component=tsdb msg="WAL segment loaded" segment=19 maxSegment=21
ts=2022-09-16T02:58:33.381Z caller=head.go:615 level=info component=tsdb msg="WAL segment loaded" segment=20 maxSegment=21
ts=2022-09-16T02:58:33.381Z caller=head.go:615 level=info component=tsdb msg="WAL segment loaded" segment=21 maxSegment=21
ts=2022-09-16T02:58:33.382Z caller=head.go:621 level=info component=tsdb msg="WAL replay completed" checkpoint_replay_duration=10.340406ms wal_replay_duration=18.375278ms total_replay_duration=28.839195ms
ts=2022-09-16T02:58:33.383Z caller=main.go:997 level=info fs_type=XFS_SUPER_MAGIC
ts=2022-09-16T02:58:33.383Z caller=main.go:1000 level=info msg="TSDB started"
ts=2022-09-16T02:58:33.383Z caller=main.go:1181 level=info msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml
ts=2022-09-16T02:58:33.507Z caller=main.go:1218 level=info msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml totalDuration=123.55189ms db_storage=606ns remote_storage=1.303μs web_handler=537ns query_engine=698ns scrape=122.834229ms scrape_sd=29.184μs notify=24.362μs notify_sd=5.485μs rules=1.034μs tracing=7.675μs
ts=2022-09-16T02:58:33.507Z caller=main.go:961 level=info msg="Server is ready to receive web requests."
ts=2022-09-16T02:58:33.507Z caller=manager.go:941 level=info component="rule manager" msg="Starting rule manager..."
ts=2022-09-16T02:58:48.717Z caller=compact.go:510 level=info component=tsdb msg="write block resulted in empty block" mint=1663077600000 maxt=1663084800000 duration=25.160899ms
ts=2022-09-16T02:58:48.719Z caller=head.go:844 level=info component=tsdb msg="Head GC completed" duration=1.448003ms
ts=2022-09-16T02:58:48.719Z caller=checkpoint.go:100 level=info component=tsdb msg="Creating checkpoint" from_segment=18 to_segment=19 mint=1663084800000
ts=2022-09-16T02:58:48.737Z caller=head.go:1013 level=info component=tsdb msg="WAL checkpoint complete" first=18 last=19 duration=17.446166ms
```

</div></details>

firewalldを使用している場合は外部からアクセスできるように穴をあけておきます。

```
[root@test14 ~]# firewall-cmd --zone=public --add-port=9090/tcp --permanent
success
[root@test14 ~]# firewall-cmd --reload
success
```

### 管理コンソールへのアクセス

ブラウザから`http://localhost:9090/`にアクセスしてみます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/7afa9fea-4935-1cd1-7566-6b4761019589.png)

StatusからTargetsを選択
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/d37df129-421f-3547-8c5b-51177592bf85.png)

監視対象としてPrometheus自分自身のエントリーが登録されていることが確認できます。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/b4192ffa-781f-ad71-f696-21ac416df67b.png)


### 停止

```
[root@test14 ~/Prometheus]# podman stop prometheus
prometheus
```

## Grafana

### 事前準備

構成ファイルやデータのディレクトリは永続化するため、ホストOS側にディレクトリを作成しコンテナからアクセスできるようにパーミッションを変更しておきます。。

```
[root@test14 ~]# mkdir -p /root/Grafana/config
[root@test14 ~]# mkdir -p /root/Grafana/data

[root@test14 ~]# chmod 777 /root/Grafana/config
[root@test14 ~]# chmod 777 /root/Grafana/data
```

現時点での最新のDockerイメージ "docker.io/grafana/grafana:latest"を使用します。
まずダミーでコンテナ作成してデフォルトの構成ファイル /etc/grafana/grafana.iniを取得します。

```
[root@test14 ~]# podman run -d --rm --name grafana_temp docker.io/grafana/grafana:latest
1356a63f3b7a53fed11b3950f9cd97492ddac36e8f43ace60b3d8020b7d8757c

[root@test14 ~]# podman cp grafana_temp:/etc/grafana/grafana.ini /root/Grafana/config/

[root@test14 ~]# podman stop grafana_temp
grafana_temp
```

### 構成ファイル編集

必要に応じて /root/Grafana/config/grafana.ini を編集します。まずはデフォルトのまま。

### 起動

起動用スクリプトを作成しておきます。

```sh:run.sh
#!/bin/bash

podman run -d --rm \
        --name grafana \
        -v /root/Grafana/config/grafana.ini:/etc/grafana/grafana.ini \
        -v /root/Grafana/data:/var/lib/grafana \
        --net=host \
        docker.io/grafana/grafana:latest
```

構成ファイルとデータ用のディレクトリは永続化のためホストのディレクトリをマッピングしています。
Prometheusと同様に '--net=host`を指定してホストOSのネットワークに直接接続するようにします。(ホストネットワークを使うのでポート公開の指定は不要)

上のスクリプトを使用して起動します。

```
[root@test14 ~/Grafana]# ./run.sh
cecbc581e935a966d9edf1caf67ef4380a0172694886d767c4d022de4abf22c9

[root@test14 ~/Grafana]# podman ps
CONTAINER ID  IMAGE                             COMMAND               CREATED         STATUS             PORTS       NAMES
ac6da584847c  docker.io/prom/prometheus:latest  --config.file=/et...  48 minutes ago  Up 48 minutes ago              prometheus
cecbc581e935  docker.io/grafana/grafana:latest                        19 seconds ago  Up 18 seconds ago              grafana

[root@test14 ~/Grafana]# netstat -an | grep 3000 | grep LISTEN
tcp6       0      0 :::3000                 :::*                    LISTEN
```

Grafanaはデフォルトで3000番ポートをListenします。

<details><summary><font color="blue">起動時ログ</font></summary><div>

```
[root@test14 ~/Grafana]# podman logs -f grafana
logger=settings t=2022-09-06T07:15:05.275233453Z level=info msg="Starting Grafana" version=9.1.2 commit=3c13120cde branch=HEAD compiled=2022-08-30T11:31:21Z
logger=settings t=2022-09-06T07:15:05.275362063Z level=info msg="Config loaded from" file=/usr/share/grafana/conf/defaults.ini
logger=settings t=2022-09-06T07:15:05.275367212Z level=info msg="Config loaded from" file=/etc/grafana/grafana.ini
logger=settings t=2022-09-06T07:15:05.275369615Z level=info msg="Config overridden from command line" arg="default.paths.data=/var/lib/grafana"
logger=settings t=2022-09-06T07:15:05.275371967Z level=info msg="Config overridden from command line" arg="default.paths.logs=/var/log/grafana"
logger=settings t=2022-09-06T07:15:05.275374183Z level=info msg="Config overridden from command line" arg="default.paths.plugins=/var/lib/grafana/plugins"
logger=settings t=2022-09-06T07:15:05.275376491Z level=info msg="Config overridden from command line" arg="default.paths.provisioning=/etc/grafana/provisioning"
logger=settings t=2022-09-06T07:15:05.275378794Z level=info msg="Config overridden from command line" arg="default.log.mode=console"
logger=settings t=2022-09-06T07:15:05.275381172Z level=info msg="Config overridden from Environment variable" var="GF_PATHS_DATA=/var/lib/grafana"
logger=settings t=2022-09-06T07:15:05.275383838Z level=info msg="Config overridden from Environment variable" var="GF_PATHS_LOGS=/var/log/grafana"
logger=settings t=2022-09-06T07:15:05.275386145Z level=info msg="Config overridden from Environment variable" var="GF_PATHS_PLUGINS=/var/lib/grafana/plugins"
logger=settings t=2022-09-06T07:15:05.275388383Z level=info msg="Config overridden from Environment variable" var="GF_PATHS_PROVISIONING=/etc/grafana/provisioning"
logger=settings t=2022-09-06T07:15:05.275390642Z level=info msg="Path Home" path=/usr/share/grafana
logger=settings t=2022-09-06T07:15:05.275392893Z level=info msg="Path Data" path=/var/lib/grafana
logger=settings t=2022-09-06T07:15:05.275395011Z level=info msg="Path Logs" path=/var/log/grafana
logger=settings t=2022-09-06T07:15:05.275398322Z level=info msg="Path Plugins" path=/var/lib/grafana/plugins
logger=settings t=2022-09-06T07:15:05.275400531Z level=info msg="Path Provisioning" path=/etc/grafana/provisioning
logger=settings t=2022-09-06T07:15:05.275402835Z level=info msg="App mode production"
logger=sqlstore t=2022-09-06T07:15:05.275653935Z level=info msg="Connecting to DB" dbtype=sqlite3
logger=sqlstore t=2022-09-06T07:15:05.275666944Z level=info msg="Creating SQLite database file" path=/var/lib/grafana/grafana.db
logger=migrator t=2022-09-06T07:15:05.276494471Z level=info msg="Starting DB migrations"
logger=migrator t=2022-09-06T07:15:05.27659281Z level=info msg="Executing migration" id="create migration_log table"
logger=migrator t=2022-09-06T07:15:05.287082719Z level=info msg="Executing migration" id="create user table"
logger=migrator t=2022-09-06T07:15:05.29254606Z level=info msg="Executing migration" id="add unique index user.login"
logger=migrator t=2022-09-06T07:15:05.297041112Z level=info msg="Executing migration" id="add unique index user.email"
logger=migrator t=2022-09-06T07:15:05.302287929Z level=info msg="Executing migration" id="drop index UQE_user_login - v1"
logger=migrator t=2022-09-06T07:15:05.306935118Z level=info msg="Executing migration" id="drop index UQE_user_email - v1"
logger=migrator t=2022-09-06T07:15:05.311862293Z level=info msg="Executing migration" id="Rename table user to user_v1 - v1"
logger=migrator t=2022-09-06T07:15:05.32054202Z level=info msg="Executing migration" id="create user table v2"
logger=migrator t=2022-09-06T07:15:05.327728072Z level=info msg="Executing migration" id="create index UQE_user_login - v2"
logger=migrator t=2022-09-06T07:15:05.332055222Z level=info msg="Executing migration" id="create index UQE_user_email - v2"
logger=migrator t=2022-09-06T07:15:05.336428399Z level=info msg="Executing migration" id="copy data_source v1 to v2"
logger=migrator t=2022-09-06T07:15:05.340512397Z level=info msg="Executing migration" id="Drop old table user_v1"
logger=migrator t=2022-09-06T07:15:05.344975444Z level=info msg="Executing migration" id="Add column help_flags1 to user table"
logger=migrator t=2022-09-06T07:15:05.349089205Z level=info msg="Executing migration" id="Update user table charset"
logger=migrator t=2022-09-06T07:15:05.353480153Z level=info msg="Executing migration" id="Add last_seen_at column to user"
logger=migrator t=2022-09-06T07:15:05.358066015Z level=info msg="Executing migration" id="Add missing user data"
logger=migrator t=2022-09-06T07:15:05.362414192Z level=info msg="Executing migration" id="Add is_disabled column to user"
logger=migrator t=2022-09-06T07:15:05.367592363Z level=info msg="Executing migration" id="Add index user.login/user.email"
logger=migrator t=2022-09-06T07:15:05.371902502Z level=info msg="Executing migration" id="Add is_service_account column to user"
logger=migrator t=2022-09-06T07:15:05.376781152Z level=info msg="Executing migration" id="Update is_service_account column to nullable"
logger=migrator t=2022-09-06T07:15:05.382225168Z level=info msg="Executing migration" id="create temp user table v1-7"
logger=migrator t=2022-09-06T07:15:05.387053981Z level=info msg="Executing migration" id="create index IDX_temp_user_email - v1-7"
logger=migrator t=2022-09-06T07:15:05.391920021Z level=info msg="Executing migration" id="create index IDX_temp_user_org_id - v1-7"
logger=migrator t=2022-09-06T07:15:05.396679461Z level=info msg="Executing migration" id="create index IDX_temp_user_code - v1-7"
logger=migrator t=2022-09-06T07:15:05.402228857Z level=info msg="Executing migration" id="create index IDX_temp_user_status - v1-7"
logger=migrator t=2022-09-06T07:15:05.407114243Z level=info msg="Executing migration" id="Update temp_user table charset"
logger=migrator t=2022-09-06T07:15:05.411453955Z level=info msg="Executing migration" id="drop index IDX_temp_user_email - v1"
logger=migrator t=2022-09-06T07:15:05.415816763Z level=info msg="Executing migration" id="drop index IDX_temp_user_org_id - v1"
logger=migrator t=2022-09-06T07:15:05.420596811Z level=info msg="Executing migration" id="drop index IDX_temp_user_code - v1"
logger=migrator t=2022-09-06T07:15:05.426429417Z level=info msg="Executing migration" id="drop index IDX_temp_user_status - v1"
logger=migrator t=2022-09-06T07:15:05.430913963Z level=info msg="Executing migration" id="Rename table temp_user to temp_user_tmp_qwerty - v1"
logger=migrator t=2022-09-06T07:15:05.436780325Z level=info msg="Executing migration" id="create temp_user v2"
logger=migrator t=2022-09-06T07:15:05.441379529Z level=info msg="Executing migration" id="create index IDX_temp_user_email - v2"
logger=migrator t=2022-09-06T07:15:05.446863014Z level=info msg="Executing migration" id="create index IDX_temp_user_org_id - v2"
logger=migrator t=2022-09-06T07:15:05.452708626Z level=info msg="Executing migration" id="create index IDX_temp_user_code - v2"
logger=migrator t=2022-09-06T07:15:05.469032372Z level=info msg="Executing migration" id="create index IDX_temp_user_status - v2"
logger=migrator t=2022-09-06T07:15:05.481573575Z level=info msg="Executing migration" id="copy temp_user v1 to v2"
logger=migrator t=2022-09-06T07:15:05.487277037Z level=info msg="Executing migration" id="drop temp_user_tmp_qwerty"
logger=migrator t=2022-09-06T07:15:05.492230593Z level=info msg="Executing migration" id="Set created for temp users that will otherwise prematurely expire"
logger=migrator t=2022-09-06T07:15:05.497367372Z level=info msg="Executing migration" id="create star table"
logger=migrator t=2022-09-06T07:15:05.505023284Z level=info msg="Executing migration" id="add unique index star.user_id_dashboard_id"
logger=migrator t=2022-09-06T07:15:05.511054287Z level=info msg="Executing migration" id="create org table v1"
logger=migrator t=2022-09-06T07:15:05.51663886Z level=info msg="Executing migration" id="create index UQE_org_name - v1"
logger=migrator t=2022-09-06T07:15:05.522066333Z level=info msg="Executing migration" id="create org_user table v1"
logger=migrator t=2022-09-06T07:15:05.527511996Z level=info msg="Executing migration" id="create index IDX_org_user_org_id - v1"
logger=migrator t=2022-09-06T07:15:05.533101352Z level=info msg="Executing migration" id="create index UQE_org_user_org_id_user_id - v1"
logger=migrator t=2022-09-06T07:15:05.539057347Z level=info msg="Executing migration" id="create index IDX_org_user_user_id - v1"
logger=migrator t=2022-09-06T07:15:05.543858945Z level=info msg="Executing migration" id="Update org table charset"
logger=migrator t=2022-09-06T07:15:05.546985229Z level=info msg="Executing migration" id="Update org_user table charset"
logger=migrator t=2022-09-06T07:15:05.550485256Z level=info msg="Executing migration" id="Migrate all Read Only Viewers to Viewers"
logger=migrator t=2022-09-06T07:15:05.553477508Z level=info msg="Executing migration" id="create dashboard table"
logger=migrator t=2022-09-06T07:15:05.558189374Z level=info msg="Executing migration" id="add index dashboard.account_id"
logger=migrator t=2022-09-06T07:15:05.562421727Z level=info msg="Executing migration" id="add unique index dashboard_account_id_slug"
logger=migrator t=2022-09-06T07:15:05.567411241Z level=info msg="Executing migration" id="create dashboard_tag table"
logger=migrator t=2022-09-06T07:15:05.571890477Z level=info msg="Executing migration" id="add unique index dashboard_tag.dasboard_id_term"
logger=migrator t=2022-09-06T07:15:05.577136897Z level=info msg="Executing migration" id="drop index UQE_dashboard_tag_dashboard_id_term - v1"
logger=migrator t=2022-09-06T07:15:05.580891807Z level=info msg="Executing migration" id="Rename table dashboard to dashboard_v1 - v1"
logger=migrator t=2022-09-06T07:15:05.584975661Z level=info msg="Executing migration" id="create dashboard v2"
logger=migrator t=2022-09-06T07:15:05.588452597Z level=info msg="Executing migration" id="create index IDX_dashboard_org_id - v2"
logger=migrator t=2022-09-06T07:15:05.593463255Z level=info msg="Executing migration" id="create index UQE_dashboard_org_id_slug - v2"
logger=migrator t=2022-09-06T07:15:05.598216704Z level=info msg="Executing migration" id="copy dashboard v1 to v2"
logger=migrator t=2022-09-06T07:15:05.601617082Z level=info msg="Executing migration" id="drop table dashboard_v1"
logger=migrator t=2022-09-06T07:15:05.605252481Z level=info msg="Executing migration" id="alter dashboard.data to mediumtext v1"
logger=migrator t=2022-09-06T07:15:05.609101269Z level=info msg="Executing migration" id="Add column updated_by in dashboard - v2"
logger=migrator t=2022-09-06T07:15:05.612820544Z level=info msg="Executing migration" id="Add column created_by in dashboard - v2"
logger=migrator t=2022-09-06T07:15:05.616971054Z level=info msg="Executing migration" id="Add column gnetId in dashboard"
logger=migrator t=2022-09-06T07:15:05.620663679Z level=info msg="Executing migration" id="Add index for gnetId in dashboard"
logger=migrator t=2022-09-06T07:15:05.624960424Z level=info msg="Executing migration" id="Add column plugin_id in dashboard"
logger=migrator t=2022-09-06T07:15:05.628983933Z level=info msg="Executing migration" id="Add index for plugin_id in dashboard"
logger=migrator t=2022-09-06T07:15:05.632739554Z level=info msg="Executing migration" id="Add index for dashboard_id in dashboard_tag"
logger=migrator t=2022-09-06T07:15:05.641988871Z level=info msg="Executing migration" id="Update dashboard table charset"
logger=migrator t=2022-09-06T07:15:05.647330626Z level=info msg="Executing migration" id="Update dashboard_tag table charset"
logger=migrator t=2022-09-06T07:15:05.650948069Z level=info msg="Executing migration" id="Add column folder_id in dashboard"
logger=migrator t=2022-09-06T07:15:05.656145595Z level=info msg="Executing migration" id="Add column isFolder in dashboard"
logger=migrator t=2022-09-06T07:15:05.660033597Z level=info msg="Executing migration" id="Add column has_acl in dashboard"
logger=migrator t=2022-09-06T07:15:05.66388458Z level=info msg="Executing migration" id="Add column uid in dashboard"
logger=migrator t=2022-09-06T07:15:05.668324171Z level=info msg="Executing migration" id="Update uid column values in dashboard"
logger=migrator t=2022-09-06T07:15:05.67171962Z level=info msg="Executing migration" id="Add unique index dashboard_org_id_uid"
logger=migrator t=2022-09-06T07:15:05.676920482Z level=info msg="Executing migration" id="Remove unique index org_id_slug"
logger=migrator t=2022-09-06T07:15:05.680824004Z level=info msg="Executing migration" id="Update dashboard title length"
logger=migrator t=2022-09-06T07:15:05.684292012Z level=info msg="Executing migration" id="Add unique index for dashboard_org_id_title_folder_id"
logger=migrator t=2022-09-06T07:15:05.688058205Z level=info msg="Executing migration" id="create dashboard_provisioning"
logger=migrator t=2022-09-06T07:15:05.693515763Z level=info msg="Executing migration" id="Rename table dashboard_provisioning to dashboard_provisioning_tmp_qwerty - v1"
logger=migrator t=2022-09-06T07:15:05.698597886Z level=info msg="Executing migration" id="create dashboard_provisioning v2"
logger=migrator t=2022-09-06T07:15:05.703867071Z level=info msg="Executing migration" id="create index IDX_dashboard_provisioning_dashboard_id - v2"
logger=migrator t=2022-09-06T07:15:05.709042985Z level=info msg="Executing migration" id="create index IDX_dashboard_provisioning_dashboard_id_name - v2"
logger=migrator t=2022-09-06T07:15:05.714395315Z level=info msg="Executing migration" id="copy dashboard_provisioning v1 to v2"
logger=migrator t=2022-09-06T07:15:05.71835863Z level=info msg="Executing migration" id="drop dashboard_provisioning_tmp_qwerty"
logger=migrator t=2022-09-06T07:15:05.722869817Z level=info msg="Executing migration" id="Add check_sum column"
logger=migrator t=2022-09-06T07:15:05.72811172Z level=info msg="Executing migration" id="Add index for dashboard_title"
logger=migrator t=2022-09-06T07:15:05.73309894Z level=info msg="Executing migration" id="delete tags for deleted dashboards"
logger=migrator t=2022-09-06T07:15:05.736735602Z level=info msg="Executing migration" id="delete stars for deleted dashboards"
logger=migrator t=2022-09-06T07:15:05.740437341Z level=info msg="Executing migration" id="Add index for dashboard_is_folder"
logger=migrator t=2022-09-06T07:15:05.745850728Z level=info msg="Executing migration" id="Add isPublic for dashboard"
logger=migrator t=2022-09-06T07:15:05.750080993Z level=info msg="Executing migration" id="create data_source table"
logger=migrator t=2022-09-06T07:15:05.75555387Z level=info msg="Executing migration" id="add index data_source.account_id"
logger=migrator t=2022-09-06T07:15:05.760601695Z level=info msg="Executing migration" id="add unique index data_source.account_id_name"
logger=migrator t=2022-09-06T07:15:05.766040139Z level=info msg="Executing migration" id="drop index IDX_data_source_account_id - v1"
logger=migrator t=2022-09-06T07:15:05.77052102Z level=info msg="Executing migration" id="drop index UQE_data_source_account_id_name - v1"
logger=migrator t=2022-09-06T07:15:05.774271269Z level=info msg="Executing migration" id="Rename table data_source to data_source_v1 - v1"
logger=migrator t=2022-09-06T07:15:05.779235527Z level=info msg="Executing migration" id="create data_source table v2"
logger=migrator t=2022-09-06T07:15:05.782887368Z level=info msg="Executing migration" id="create index IDX_data_source_org_id - v2"
logger=migrator t=2022-09-06T07:15:05.786912671Z level=info msg="Executing migration" id="create index UQE_data_source_org_id_name - v2"
logger=migrator t=2022-09-06T07:15:05.792040413Z level=info msg="Executing migration" id="Drop old table data_source_v1 #2"
logger=migrator t=2022-09-06T07:15:05.796117307Z level=info msg="Executing migration" id="Add column with_credentials"
logger=migrator t=2022-09-06T07:15:05.800170185Z level=info msg="Executing migration" id="Add secure json data column"
logger=migrator t=2022-09-06T07:15:05.80428537Z level=info msg="Executing migration" id="Update data_source table charset"
logger=migrator t=2022-09-06T07:15:05.808020616Z level=info msg="Executing migration" id="Update initial version to 1"
logger=migrator t=2022-09-06T07:15:05.811573078Z level=info msg="Executing migration" id="Add read_only data column"
logger=migrator t=2022-09-06T07:15:05.815235257Z level=info msg="Executing migration" id="Migrate logging ds to loki ds"
logger=migrator t=2022-09-06T07:15:05.818713858Z level=info msg="Executing migration" id="Update json_data with nulls"
logger=migrator t=2022-09-06T07:15:05.822169102Z level=info msg="Executing migration" id="Add uid column"
logger=migrator t=2022-09-06T07:15:05.82606899Z level=info msg="Executing migration" id="Update uid value"
logger=migrator t=2022-09-06T07:15:05.829431299Z level=info msg="Executing migration" id="Add unique index datasource_org_id_uid"
logger=migrator t=2022-09-06T07:15:05.833219266Z level=info msg="Executing migration" id="add unique index datasource_org_id_is_default"
logger=migrator t=2022-09-06T07:15:05.838603176Z level=info msg="Executing migration" id="create api_key table"
logger=migrator t=2022-09-06T07:15:05.843721839Z level=info msg="Executing migration" id="add index api_key.account_id"
logger=migrator t=2022-09-06T07:15:05.849154355Z level=info msg="Executing migration" id="add index api_key.key"
logger=migrator t=2022-09-06T07:15:05.854537979Z level=info msg="Executing migration" id="add index api_key.account_id_name"
logger=migrator t=2022-09-06T07:15:05.860251968Z level=info msg="Executing migration" id="drop index IDX_api_key_account_id - v1"
logger=migrator t=2022-09-06T07:15:05.86412605Z level=info msg="Executing migration" id="drop index UQE_api_key_key - v1"
logger=migrator t=2022-09-06T07:15:05.867906878Z level=info msg="Executing migration" id="drop index UQE_api_key_account_id_name - v1"
logger=migrator t=2022-09-06T07:15:05.871772083Z level=info msg="Executing migration" id="Rename table api_key to api_key_v1 - v1"
logger=migrator t=2022-09-06T07:15:05.876165516Z level=info msg="Executing migration" id="create api_key table v2"
logger=migrator t=2022-09-06T07:15:05.879516856Z level=info msg="Executing migration" id="create index IDX_api_key_org_id - v2"
logger=migrator t=2022-09-06T07:15:05.883303351Z level=info msg="Executing migration" id="create index UQE_api_key_key - v2"
logger=migrator t=2022-09-06T07:15:05.88820527Z level=info msg="Executing migration" id="create index UQE_api_key_org_id_name - v2"
logger=migrator t=2022-09-06T07:15:05.893168121Z level=info msg="Executing migration" id="copy api_key v1 to v2"
logger=migrator t=2022-09-06T07:15:05.896715631Z level=info msg="Executing migration" id="Drop old table api_key_v1"
logger=migrator t=2022-09-06T07:15:05.900401247Z level=info msg="Executing migration" id="Update api_key table charset"
logger=migrator t=2022-09-06T07:15:05.903625573Z level=info msg="Executing migration" id="Add expires to api_key table"
logger=migrator t=2022-09-06T07:15:05.90779444Z level=info msg="Executing migration" id="Add service account foreign key"
logger=migrator t=2022-09-06T07:15:05.911541817Z level=info msg="Executing migration" id="set service account foreign key to nil if 0"
logger=migrator t=2022-09-06T07:15:05.914907324Z level=info msg="Executing migration" id="Add last_used_at to api_key table"
logger=migrator t=2022-09-06T07:15:05.918878473Z level=info msg="Executing migration" id="create dashboard_snapshot table v4"
logger=migrator t=2022-09-06T07:15:05.922480089Z level=info msg="Executing migration" id="drop table dashboard_snapshot_v4 #1"
logger=migrator t=2022-09-06T07:15:05.926243487Z level=info msg="Executing migration" id="create dashboard_snapshot table v5 #2"
logger=migrator t=2022-09-06T07:15:05.930055382Z level=info msg="Executing migration" id="create index UQE_dashboard_snapshot_key - v5"
logger=migrator t=2022-09-06T07:15:05.935040351Z level=info msg="Executing migration" id="create index UQE_dashboard_snapshot_delete_key - v5"
logger=migrator t=2022-09-06T07:15:05.94015521Z level=info msg="Executing migration" id="create index IDX_dashboard_snapshot_user_id - v5"
logger=migrator t=2022-09-06T07:15:05.945354781Z level=info msg="Executing migration" id="alter dashboard_snapshot to mediumtext v2"
logger=migrator t=2022-09-06T07:15:05.948814752Z level=info msg="Executing migration" id="Update dashboard_snapshot table charset"
logger=migrator t=2022-09-06T07:15:05.952072294Z level=info msg="Executing migration" id="Add column external_delete_url to dashboard_snapshots table"
logger=migrator t=2022-09-06T07:15:05.955633516Z level=info msg="Executing migration" id="Add encrypted dashboard json column"
logger=migrator t=2022-09-06T07:15:05.959030511Z level=info msg="Executing migration" id="Change dashboard_encrypted column to MEDIUMBLOB"
logger=migrator t=2022-09-06T07:15:05.962441868Z level=info msg="Executing migration" id="create quota table v1"
logger=migrator t=2022-09-06T07:15:05.967130536Z level=info msg="Executing migration" id="create index UQE_quota_org_id_user_id_target - v1"
logger=migrator t=2022-09-06T07:15:05.972148961Z level=info msg="Executing migration" id="Update quota table charset"
logger=migrator t=2022-09-06T07:15:05.977175194Z level=info msg="Executing migration" id="create plugin_setting table"
logger=migrator t=2022-09-06T07:15:05.982387064Z level=info msg="Executing migration" id="create index UQE_plugin_setting_org_id_plugin_id - v1"
logger=migrator t=2022-09-06T07:15:05.987626519Z level=info msg="Executing migration" id="Add column plugin_version to plugin_settings"
logger=migrator t=2022-09-06T07:15:05.992601453Z level=info msg="Executing migration" id="Update plugin_setting table charset"
logger=migrator t=2022-09-06T07:15:05.996105264Z level=info msg="Executing migration" id="create session table"
logger=migrator t=2022-09-06T07:15:06.001878271Z level=info msg="Executing migration" id="Drop old table playlist table"
logger=migrator t=2022-09-06T07:15:06.005211849Z level=info msg="Executing migration" id="Drop old table playlist_item table"
logger=migrator t=2022-09-06T07:15:06.008928104Z level=info msg="Executing migration" id="create playlist table v2"
logger=migrator t=2022-09-06T07:15:06.014134204Z level=info msg="Executing migration" id="create playlist item table v2"
logger=migrator t=2022-09-06T07:15:06.01949593Z level=info msg="Executing migration" id="Update playlist table charset"
logger=migrator t=2022-09-06T07:15:06.022677398Z level=info msg="Executing migration" id="Update playlist_item table charset"
logger=migrator t=2022-09-06T07:15:06.026081432Z level=info msg="Executing migration" id="drop preferences table v2"
logger=migrator t=2022-09-06T07:15:06.029338796Z level=info msg="Executing migration" id="drop preferences table v3"
logger=migrator t=2022-09-06T07:15:06.032812628Z level=info msg="Executing migration" id="create preferences table v3"
logger=migrator t=2022-09-06T07:15:06.03818723Z level=info msg="Executing migration" id="Update preferences table charset"
logger=migrator t=2022-09-06T07:15:06.041544573Z level=info msg="Executing migration" id="Add column team_id in preferences"
logger=migrator t=2022-09-06T07:15:06.045478834Z level=info msg="Executing migration" id="Update team_id column values in preferences"
logger=migrator t=2022-09-06T07:15:06.049328674Z level=info msg="Executing migration" id="Add column week_start in preferences"
logger=migrator t=2022-09-06T07:15:06.053518294Z level=info msg="Executing migration" id="Add column preferences.json_data"
logger=migrator t=2022-09-06T07:15:06.058385697Z level=info msg="Executing migration" id="alter preferences.json_data to mediumtext v1"
logger=migrator t=2022-09-06T07:15:06.061582356Z level=info msg="Executing migration" id="create alert table v1"
logger=migrator t=2022-09-06T07:15:06.067012713Z level=info msg="Executing migration" id="add index alert org_id & id "
logger=migrator t=2022-09-06T07:15:06.071674371Z level=info msg="Executing migration" id="add index alert state"
logger=migrator t=2022-09-06T07:15:06.077027506Z level=info msg="Executing migration" id="add index alert dashboard_id"
logger=migrator t=2022-09-06T07:15:06.082033292Z level=info msg="Executing migration" id="Create alert_rule_tag table v1"
logger=migrator t=2022-09-06T07:15:06.087999732Z level=info msg="Executing migration" id="Add unique index alert_rule_tag.alert_id_tag_id"
logger=migrator t=2022-09-06T07:15:06.093647975Z level=info msg="Executing migration" id="drop index UQE_alert_rule_tag_alert_id_tag_id - v1"
logger=migrator t=2022-09-06T07:15:06.09823014Z level=info msg="Executing migration" id="Rename table alert_rule_tag to alert_rule_tag_v1 - v1"
logger=migrator t=2022-09-06T07:15:06.103103278Z level=info msg="Executing migration" id="Create alert_rule_tag table v2"
logger=migrator t=2022-09-06T07:15:06.106929001Z level=info msg="Executing migration" id="create index UQE_alert_rule_tag_alert_id_tag_id - Add unique index alert_rule_tag.alert_id_tag_id V2"
logger=migrator t=2022-09-06T07:15:06.111929182Z level=info msg="Executing migration" id="copy alert_rule_tag v1 to v2"
logger=migrator t=2022-09-06T07:15:06.1153815Z level=info msg="Executing migration" id="drop table alert_rule_tag_v1"
logger=migrator t=2022-09-06T07:15:06.119183972Z level=info msg="Executing migration" id="create alert_notification table v1"
logger=migrator t=2022-09-06T07:15:06.123236234Z level=info msg="Executing migration" id="Add column is_default"
logger=migrator t=2022-09-06T07:15:06.128295072Z level=info msg="Executing migration" id="Add column frequency"
logger=migrator t=2022-09-06T07:15:06.133082208Z level=info msg="Executing migration" id="Add column send_reminder"
logger=migrator t=2022-09-06T07:15:06.137567836Z level=info msg="Executing migration" id="Add column disable_resolve_message"
logger=migrator t=2022-09-06T07:15:06.141779303Z level=info msg="Executing migration" id="add index alert_notification org_id & name"
logger=migrator t=2022-09-06T07:15:06.147013792Z level=info msg="Executing migration" id="Update alert table charset"
logger=migrator t=2022-09-06T07:15:06.150673207Z level=info msg="Executing migration" id="Update alert_notification table charset"
logger=migrator t=2022-09-06T07:15:06.153995424Z level=info msg="Executing migration" id="create notification_journal table v1"
logger=migrator t=2022-09-06T07:15:06.159179294Z level=info msg="Executing migration" id="add index notification_journal org_id & alert_id & notifier_id"
logger=migrator t=2022-09-06T07:15:06.164356945Z level=info msg="Executing migration" id="drop alert_notification_journal"
logger=migrator t=2022-09-06T07:15:06.168517863Z level=info msg="Executing migration" id="create alert_notification_state table v1"
logger=migrator t=2022-09-06T07:15:06.172218049Z level=info msg="Executing migration" id="add index alert_notification_state org_id & alert_id & notifier_id"
logger=migrator t=2022-09-06T07:15:06.176013679Z level=info msg="Executing migration" id="Add for to alert table"
logger=migrator t=2022-09-06T07:15:06.18128812Z level=info msg="Executing migration" id="Add column uid in alert_notification"
logger=migrator t=2022-09-06T07:15:06.185426422Z level=info msg="Executing migration" id="Update uid column values in alert_notification"
logger=migrator t=2022-09-06T07:15:06.18909797Z level=info msg="Executing migration" id="Add unique index alert_notification_org_id_uid"
logger=migrator t=2022-09-06T07:15:06.194583733Z level=info msg="Executing migration" id="Remove unique index org_id_name"
logger=migrator t=2022-09-06T07:15:06.198943772Z level=info msg="Executing migration" id="Add column secure_settings in alert_notification"
logger=migrator t=2022-09-06T07:15:06.203159202Z level=info msg="Executing migration" id="alter alert.settings to mediumtext"
logger=migrator t=2022-09-06T07:15:06.206781414Z level=info msg="Executing migration" id="Add non-unique index alert_notification_state_alert_id"
logger=migrator t=2022-09-06T07:15:06.210603689Z level=info msg="Executing migration" id="Add non-unique index alert_rule_tag_alert_id"
logger=migrator t=2022-09-06T07:15:06.215562698Z level=info msg="Executing migration" id="Drop old annotation table v4"
logger=migrator t=2022-09-06T07:15:06.219153138Z level=info msg="Executing migration" id="create annotation table v5"
logger=migrator t=2022-09-06T07:15:06.224930065Z level=info msg="Executing migration" id="add index annotation 0 v3"
logger=migrator t=2022-09-06T07:15:06.230626779Z level=info msg="Executing migration" id="add index annotation 1 v3"
logger=migrator t=2022-09-06T07:15:06.236028154Z level=info msg="Executing migration" id="add index annotation 2 v3"
logger=migrator t=2022-09-06T07:15:06.241113365Z level=info msg="Executing migration" id="add index annotation 3 v3"
logger=migrator t=2022-09-06T07:15:06.246549043Z level=info msg="Executing migration" id="add index annotation 4 v3"
logger=migrator t=2022-09-06T07:15:06.251697919Z level=info msg="Executing migration" id="Update annotation table charset"
logger=migrator t=2022-09-06T07:15:06.254993038Z level=info msg="Executing migration" id="Add column region_id to annotation table"
logger=migrator t=2022-09-06T07:15:06.259068771Z level=info msg="Executing migration" id="Drop category_id index"
logger=migrator t=2022-09-06T07:15:06.263261826Z level=info msg="Executing migration" id="Add column tags to annotation table"
logger=migrator t=2022-09-06T07:15:06.267520102Z level=info msg="Executing migration" id="Create annotation_tag table v2"
logger=migrator t=2022-09-06T07:15:06.271188281Z level=info msg="Executing migration" id="Add unique index annotation_tag.annotation_id_tag_id"
logger=migrator t=2022-09-06T07:15:06.276829556Z level=info msg="Executing migration" id="drop index UQE_annotation_tag_annotation_id_tag_id - v2"
logger=migrator t=2022-09-06T07:15:06.280774495Z level=info msg="Executing migration" id="Rename table annotation_tag to annotation_tag_v2 - v2"
logger=migrator t=2022-09-06T07:15:06.286154651Z level=info msg="Executing migration" id="Create annotation_tag table v3"
logger=migrator t=2022-09-06T07:15:06.29055161Z level=info msg="Executing migration" id="create index UQE_annotation_tag_annotation_id_tag_id - Add unique index annotation_tag.annotation_id_tag_id V3"
logger=migrator t=2022-09-06T07:15:06.295263549Z level=info msg="Executing migration" id="copy annotation_tag v2 to v3"
logger=migrator t=2022-09-06T07:15:06.29876446Z level=info msg="Executing migration" id="drop table annotation_tag_v2"
logger=migrator t=2022-09-06T07:15:06.302489543Z level=info msg="Executing migration" id="Update alert annotations and set TEXT to empty"
logger=migrator t=2022-09-06T07:15:06.306207912Z level=info msg="Executing migration" id="Add created time to annotation table"
logger=migrator t=2022-09-06T07:15:06.310828679Z level=info msg="Executing migration" id="Add updated time to annotation table"
logger=migrator t=2022-09-06T07:15:06.315207041Z level=info msg="Executing migration" id="Add index for created in annotation table"
logger=migrator t=2022-09-06T07:15:06.319437416Z level=info msg="Executing migration" id="Add index for updated in annotation table"
logger=migrator t=2022-09-06T07:15:06.326250924Z level=info msg="Executing migration" id="Convert existing annotations from seconds to milliseconds"
logger=migrator t=2022-09-06T07:15:06.330088055Z level=info msg="Executing migration" id="Add epoch_end column"
logger=migrator t=2022-09-06T07:15:06.334952546Z level=info msg="Executing migration" id="Add index for epoch_end"
logger=migrator t=2022-09-06T07:15:06.343515868Z level=info msg="Executing migration" id="Make epoch_end the same as epoch"
logger=migrator t=2022-09-06T07:15:06.348861744Z level=info msg="Executing migration" id="Move region to single row"
logger=migrator t=2022-09-06T07:15:06.353836542Z level=info msg="Executing migration" id="Remove index org_id_epoch from annotation table"
logger=migrator t=2022-09-06T07:15:06.359719183Z level=info msg="Executing migration" id="Remove index org_id_dashboard_id_panel_id_epoch from annotation table"
logger=migrator t=2022-09-06T07:15:06.365317915Z level=info msg="Executing migration" id="Add index for org_id_dashboard_id_epoch_end_epoch on annotation table"
logger=migrator t=2022-09-06T07:15:06.370796662Z level=info msg="Executing migration" id="Add index for org_id_epoch_end_epoch on annotation table"
logger=migrator t=2022-09-06T07:15:06.376724745Z level=info msg="Executing migration" id="Remove index org_id_epoch_epoch_end from annotation table"
logger=migrator t=2022-09-06T07:15:06.381976337Z level=info msg="Executing migration" id="Add index for alert_id on annotation table"
logger=migrator t=2022-09-06T07:15:06.387878149Z level=info msg="Executing migration" id="create test_data table"
logger=migrator t=2022-09-06T07:15:06.393381267Z level=info msg="Executing migration" id="create dashboard_version table v1"
logger=migrator t=2022-09-06T07:15:06.399287564Z level=info msg="Executing migration" id="add index dashboard_version.dashboard_id"
logger=migrator t=2022-09-06T07:15:06.404836538Z level=info msg="Executing migration" id="add unique index dashboard_version.dashboard_id and dashboard_version.version"
logger=migrator t=2022-09-06T07:15:06.409962093Z level=info msg="Executing migration" id="Set dashboard version to 1 where 0"
logger=migrator t=2022-09-06T07:15:06.416172854Z level=info msg="Executing migration" id="save existing dashboard data in dashboard_version table v1"
logger=migrator t=2022-09-06T07:15:06.420275314Z level=info msg="Executing migration" id="alter dashboard_version.data to mediumtext v1"
logger=migrator t=2022-09-06T07:15:06.423921098Z level=info msg="Executing migration" id="create team table"
logger=migrator t=2022-09-06T07:15:06.429110431Z level=info msg="Executing migration" id="add index team.org_id"
logger=migrator t=2022-09-06T07:15:06.434752089Z level=info msg="Executing migration" id="add unique index team_org_id_name"
logger=migrator t=2022-09-06T07:15:06.441217453Z level=info msg="Executing migration" id="create team member table"
logger=migrator t=2022-09-06T07:15:06.446975768Z level=info msg="Executing migration" id="add index team_member.org_id"
logger=migrator t=2022-09-06T07:15:06.452159516Z level=info msg="Executing migration" id="add unique index team_member_org_id_team_id_user_id"
logger=migrator t=2022-09-06T07:15:06.458062061Z level=info msg="Executing migration" id="add index team_member.team_id"
logger=migrator t=2022-09-06T07:15:06.463098608Z level=info msg="Executing migration" id="Add column email to team table"
logger=migrator t=2022-09-06T07:15:06.467268895Z level=info msg="Executing migration" id="Add column external to team_member table"
logger=migrator t=2022-09-06T07:15:06.471182856Z level=info msg="Executing migration" id="Add column permission to team_member table"
logger=migrator t=2022-09-06T07:15:06.475333927Z level=info msg="Executing migration" id="create dashboard acl table"
logger=migrator t=2022-09-06T07:15:06.480365473Z level=info msg="Executing migration" id="add index dashboard_acl_dashboard_id"
logger=migrator t=2022-09-06T07:15:06.48613948Z level=info msg="Executing migration" id="add unique index dashboard_acl_dashboard_id_user_id"
logger=migrator t=2022-09-06T07:15:06.491497319Z level=info msg="Executing migration" id="add unique index dashboard_acl_dashboard_id_team_id"
logger=migrator t=2022-09-06T07:15:06.49707041Z level=info msg="Executing migration" id="add index dashboard_acl_user_id"
logger=migrator t=2022-09-06T07:15:06.503145702Z level=info msg="Executing migration" id="add index dashboard_acl_team_id"
logger=migrator t=2022-09-06T07:15:06.508459105Z level=info msg="Executing migration" id="add index dashboard_acl_org_id_role"
logger=migrator t=2022-09-06T07:15:06.513991468Z level=info msg="Executing migration" id="add index dashboard_permission"
logger=migrator t=2022-09-06T07:15:06.5194615Z level=info msg="Executing migration" id="save default acl rules in dashboard_acl table"
logger=migrator t=2022-09-06T07:15:06.523169701Z level=info msg="Executing migration" id="delete acl rules for deleted dashboards and folders"
logger=migrator t=2022-09-06T07:15:06.528170266Z level=info msg="Executing migration" id="create tag table"
logger=migrator t=2022-09-06T07:15:06.533115192Z level=info msg="Executing migration" id="add index tag.key_value"
logger=migrator t=2022-09-06T07:15:06.538534485Z level=info msg="Executing migration" id="create login attempt table"
logger=migrator t=2022-09-06T07:15:06.543179453Z level=info msg="Executing migration" id="add index login_attempt.username"
logger=migrator t=2022-09-06T07:15:06.548389231Z level=info msg="Executing migration" id="drop index IDX_login_attempt_username - v1"
logger=migrator t=2022-09-06T07:15:06.552226859Z level=info msg="Executing migration" id="Rename table login_attempt to login_attempt_tmp_qwerty - v1"
logger=migrator t=2022-09-06T07:15:06.557864198Z level=info msg="Executing migration" id="create login_attempt v2"
logger=migrator t=2022-09-06T07:15:06.561352762Z level=info msg="Executing migration" id="create index IDX_login_attempt_username - v2"
logger=migrator t=2022-09-06T07:15:06.566575049Z level=info msg="Executing migration" id="copy login_attempt v1 to v2"
logger=migrator t=2022-09-06T07:15:06.570012253Z level=info msg="Executing migration" id="drop login_attempt_tmp_qwerty"
logger=migrator t=2022-09-06T07:15:06.573757497Z level=info msg="Executing migration" id="create user auth table"
logger=migrator t=2022-09-06T07:15:06.577354092Z level=info msg="Executing migration" id="create index IDX_user_auth_auth_module_auth_id - v1"
logger=migrator t=2022-09-06T07:15:06.582242891Z level=info msg="Executing migration" id="alter user_auth.auth_id to length 190"
logger=migrator t=2022-09-06T07:15:06.585684134Z level=info msg="Executing migration" id="Add OAuth access token to user_auth"
logger=migrator t=2022-09-06T07:15:06.589876547Z level=info msg="Executing migration" id="Add OAuth refresh token to user_auth"
logger=migrator t=2022-09-06T07:15:06.593820478Z level=info msg="Executing migration" id="Add OAuth token type to user_auth"
logger=migrator t=2022-09-06T07:15:06.597914244Z level=info msg="Executing migration" id="Add OAuth expiry to user_auth"
logger=migrator t=2022-09-06T07:15:06.601862097Z level=info msg="Executing migration" id="Add index to user_id column in user_auth"
logger=migrator t=2022-09-06T07:15:06.6070812Z level=info msg="Executing migration" id="Add OAuth ID token to user_auth"
logger=migrator t=2022-09-06T07:15:06.611344638Z level=info msg="Executing migration" id="create server_lock table"
logger=migrator t=2022-09-06T07:15:06.616694001Z level=info msg="Executing migration" id="add index server_lock.operation_uid"
logger=migrator t=2022-09-06T07:15:06.622409172Z level=info msg="Executing migration" id="create user auth token table"
logger=migrator t=2022-09-06T07:15:06.627850775Z level=info msg="Executing migration" id="add unique index user_auth_token.auth_token"
logger=migrator t=2022-09-06T07:15:06.632636042Z level=info msg="Executing migration" id="add unique index user_auth_token.prev_auth_token"
logger=migrator t=2022-09-06T07:15:06.646377211Z level=info msg="Executing migration" id="add index user_auth_token.user_id"
logger=migrator t=2022-09-06T07:15:06.652002453Z level=info msg="Executing migration" id="Add revoked_at to the user auth token"
logger=migrator t=2022-09-06T07:15:06.656925786Z level=info msg="Executing migration" id="create cache_data table"
logger=migrator t=2022-09-06T07:15:06.661880631Z level=info msg="Executing migration" id="add unique index cache_data.cache_key"
logger=migrator t=2022-09-06T07:15:06.666763554Z level=info msg="Executing migration" id="create short_url table v1"
logger=migrator t=2022-09-06T07:15:06.671915922Z level=info msg="Executing migration" id="add index short_url.org_id-uid"
logger=migrator t=2022-09-06T07:15:06.67652799Z level=info msg="Executing migration" id="delete alert_definition table"
logger=migrator t=2022-09-06T07:15:06.679701887Z level=info msg="Executing migration" id="recreate alert_definition table"
logger=migrator t=2022-09-06T07:15:06.684172801Z level=info msg="Executing migration" id="add index in alert_definition on org_id and title columns"
logger=migrator t=2022-09-06T07:15:06.690594968Z level=info msg="Executing migration" id="add index in alert_definition on org_id and uid columns"
logger=migrator t=2022-09-06T07:15:06.696002827Z level=info msg="Executing migration" id="alter alert_definition table data column to mediumtext in mysql"
logger=migrator t=2022-09-06T07:15:06.700054752Z level=info msg="Executing migration" id="drop index in alert_definition on org_id and title columns"
logger=migrator t=2022-09-06T07:15:06.704026677Z level=info msg="Executing migration" id="drop index in alert_definition on org_id and uid columns"
logger=migrator t=2022-09-06T07:15:06.708662255Z level=info msg="Executing migration" id="add unique index in alert_definition on org_id and title columns"
logger=migrator t=2022-09-06T07:15:06.71259118Z level=info msg="Executing migration" id="add unique index in alert_definition on org_id and uid columns"
logger=migrator t=2022-09-06T07:15:06.716721229Z level=info msg="Executing migration" id="Add column paused in alert_definition"
logger=migrator t=2022-09-06T07:15:06.721528066Z level=info msg="Executing migration" id="drop alert_definition table"
logger=migrator t=2022-09-06T07:15:06.725508955Z level=info msg="Executing migration" id="delete alert_definition_version table"
logger=migrator t=2022-09-06T07:15:06.729883707Z level=info msg="Executing migration" id="recreate alert_definition_version table"
logger=migrator t=2022-09-06T07:15:06.735954298Z level=info msg="Executing migration" id="add index in alert_definition_version table on alert_definition_id and version columns"
logger=migrator t=2022-09-06T07:15:06.741235272Z level=info msg="Executing migration" id="add index in alert_definition_version table on alert_definition_uid and version columns"
logger=migrator t=2022-09-06T07:15:06.748785631Z level=info msg="Executing migration" id="alter alert_definition_version table data column to mediumtext in mysql"
logger=migrator t=2022-09-06T07:15:06.753539408Z level=info msg="Executing migration" id="drop alert_definition_version table"
logger=migrator t=2022-09-06T07:15:06.758871836Z level=info msg="Executing migration" id="create alert_instance table"
logger=migrator t=2022-09-06T07:15:06.763802288Z level=info msg="Executing migration" id="add index in alert_instance table on def_org_id, def_uid and current_state columns"
logger=migrator t=2022-09-06T07:15:06.769104021Z level=info msg="Executing migration" id="add index in alert_instance table on def_org_id, current_state columns"
logger=migrator t=2022-09-06T07:15:06.776709698Z level=info msg="Executing migration" id="add column current_state_end to alert_instance"
logger=migrator t=2022-09-06T07:15:06.782837355Z level=info msg="Executing migration" id="remove index def_org_id, def_uid, current_state on alert_instance"
logger=migrator t=2022-09-06T07:15:06.792719061Z level=info msg="Executing migration" id="remove index def_org_id, current_state on alert_instance"
logger=migrator t=2022-09-06T07:15:06.818626066Z level=info msg="Executing migration" id="rename def_org_id to rule_org_id in alert_instance"
logger=migrator t=2022-09-06T07:15:06.832013296Z level=info msg="Executing migration" id="rename def_uid to rule_uid in alert_instance"
logger=migrator t=2022-09-06T07:15:06.839705632Z level=info msg="Executing migration" id="add index rule_org_id, rule_uid, current_state on alert_instance"
logger=migrator t=2022-09-06T07:15:06.846617004Z level=info msg="Executing migration" id="add index rule_org_id, current_state on alert_instance"
logger=migrator t=2022-09-06T07:15:06.855763765Z level=info msg="Executing migration" id="add current_reason column related to current_state"
logger=migrator t=2022-09-06T07:15:06.86415908Z level=info msg="Executing migration" id="create alert_rule table"
logger=migrator t=2022-09-06T07:15:06.872558267Z level=info msg="Executing migration" id="add index in alert_rule on org_id and title columns"
logger=migrator t=2022-09-06T07:15:06.880646073Z level=info msg="Executing migration" id="add index in alert_rule on org_id and uid columns"
logger=migrator t=2022-09-06T07:15:06.889039682Z level=info msg="Executing migration" id="add index in alert_rule on org_id, namespace_uid, group_uid columns"
logger=migrator t=2022-09-06T07:15:06.89740713Z level=info msg="Executing migration" id="alter alert_rule table data column to mediumtext in mysql"
logger=migrator t=2022-09-06T07:15:06.903501013Z level=info msg="Executing migration" id="add column for to alert_rule"
logger=migrator t=2022-09-06T07:15:06.912286188Z level=info msg="Executing migration" id="add column annotations to alert_rule"
logger=migrator t=2022-09-06T07:15:06.920881243Z level=info msg="Executing migration" id="add column labels to alert_rule"
logger=migrator t=2022-09-06T07:15:06.944921568Z level=info msg="Executing migration" id="remove unique index from alert_rule on org_id, title columns"
logger=migrator t=2022-09-06T07:15:06.956722733Z level=info msg="Executing migration" id="add index in alert_rule on org_id, namespase_uid and title columns"
logger=migrator t=2022-09-06T07:15:06.96742533Z level=info msg="Executing migration" id="add dashboard_uid column to alert_rule"
logger=migrator t=2022-09-06T07:15:06.978659096Z level=info msg="Executing migration" id="add panel_id column to alert_rule"
logger=migrator t=2022-09-06T07:15:06.988784097Z level=info msg="Executing migration" id="add index in alert_rule on org_id, dashboard_uid and panel_id columns"
logger=migrator t=2022-09-06T07:15:07.000694657Z level=info msg="Executing migration" id="add rule_group_idx column to alert_rule"
logger=migrator t=2022-09-06T07:15:07.011305699Z level=info msg="Executing migration" id="create alert_rule_version table"
logger=migrator t=2022-09-06T07:15:07.019827096Z level=info msg="Executing migration" id="add index in alert_rule_version table on rule_org_id, rule_uid and version columns"
logger=migrator t=2022-09-06T07:15:07.028948369Z level=info msg="Executing migration" id="add index in alert_rule_version table on rule_org_id, rule_namespace_uid and rule_group columns"
logger=migrator t=2022-09-06T07:15:07.040008616Z level=info msg="Executing migration" id="alter alert_rule_version table data column to mediumtext in mysql"
logger=migrator t=2022-09-06T07:15:07.049067706Z level=info msg="Executing migration" id="add column for to alert_rule_version"
logger=migrator t=2022-09-06T07:15:07.057818231Z level=info msg="Executing migration" id="add column annotations to alert_rule_version"
logger=migrator t=2022-09-06T07:15:07.067182938Z level=info msg="Executing migration" id="add column labels to alert_rule_version"
logger=migrator t=2022-09-06T07:15:07.074800835Z level=info msg="Executing migration" id="add rule_group_idx column to alert_rule_version"
logger=migrator t=2022-09-06T07:15:07.080791951Z level=info msg="Executing migration" id=create_alert_configuration_table
logger=migrator t=2022-09-06T07:15:07.086405015Z level=info msg="Executing migration" id="Add column default in alert_configuration"
logger=migrator t=2022-09-06T07:15:07.092569987Z level=info msg="Executing migration" id="alert alert_configuration alertmanager_configuration column from TEXT to MEDIUMTEXT if mysql"
logger=migrator t=2022-09-06T07:15:07.097689736Z level=info msg="Executing migration" id="add column org_id in alert_configuration"
logger=migrator t=2022-09-06T07:15:07.103846085Z level=info msg="Executing migration" id="add index in alert_configuration table on org_id column"
logger=migrator t=2022-09-06T07:15:07.110421969Z level=info msg="Executing migration" id="add configuration_hash column to alert_configuration"
logger=migrator t=2022-09-06T07:15:07.117506479Z level=info msg="Executing migration" id=create_ngalert_configuration_table
logger=migrator t=2022-09-06T07:15:07.123025386Z level=info msg="Executing migration" id="add index in ngalert_configuration on org_id column"
logger=migrator t=2022-09-06T07:15:07.128991503Z level=info msg="Executing migration" id="add column send_alerts_to in ngalert_configuration"
logger=migrator t=2022-09-06T07:15:07.134928393Z level=info msg="Executing migration" id="create provenance_type table"
logger=migrator t=2022-09-06T07:15:07.140824296Z level=info msg="Executing migration" id="add index to uniquify (record_key, record_type, org_id) columns"
logger=migrator t=2022-09-06T07:15:07.147534631Z level=info msg="Executing migration" id="create alert_image table"
logger=migrator t=2022-09-06T07:15:07.152565382Z level=info msg="Executing migration" id="add unique index on token to alert_image table"
logger=migrator t=2022-09-06T07:15:07.157505768Z level=info msg="Executing migration" id="support longer URLs in alert_image table"
logger=migrator t=2022-09-06T07:15:07.16121131Z level=info msg="Executing migration" id="clear migration entry \"remove unified alerting data\""
logger=migrator t=2022-09-06T07:15:07.161331945Z level=info msg="Executing migration" id="move dashboard alerts to unified alerting"
logger=migrator t=2022-09-06T07:15:07.161422405Z level=info msg="alerts found to migrate" alerts=0
logger=migrator t=2022-09-06T07:15:07.165281058Z level=info msg="Executing migration" id="create library_element table v1"
logger=migrator t=2022-09-06T07:15:07.170485405Z level=info msg="Executing migration" id="add index library_element org_id-folder_id-name-kind"
logger=migrator t=2022-09-06T07:15:07.175767423Z level=info msg="Executing migration" id="create library_element_connection table v1"
logger=migrator t=2022-09-06T07:15:07.180490692Z level=info msg="Executing migration" id="add index library_element_connection element_id-kind-connection_id"
logger=migrator t=2022-09-06T07:15:07.185044455Z level=info msg="Executing migration" id="add unique index library_element org_id_uid"
logger=migrator t=2022-09-06T07:15:07.189965997Z level=info msg="Executing migration" id="increase max description length to 2048"
logger=migrator t=2022-09-06T07:15:07.193197755Z level=info msg="Executing migration" id="clone move dashboard alerts to unified alerting"
logger=migrator t=2022-09-06T07:15:07.197379821Z level=info msg="Executing migration" id="create data_keys table"
logger=migrator t=2022-09-06T07:15:07.202858836Z level=info msg="Executing migration" id="create secrets table"
logger=migrator t=2022-09-06T07:15:07.207329712Z level=info msg="Executing migration" id="rename data_keys name column to id"
logger=migrator t=2022-09-06T07:15:07.213212289Z level=info msg="Executing migration" id="add name column into data_keys"
logger=migrator t=2022-09-06T07:15:07.217669776Z level=info msg="Executing migration" id="copy data_keys id column values into name"
logger=migrator t=2022-09-06T07:15:07.220676647Z level=info msg="Executing migration" id="rename data_keys name column to label"
logger=migrator t=2022-09-06T07:15:07.226402555Z level=info msg="Executing migration" id="rename data_keys id column back to name"
logger=migrator t=2022-09-06T07:15:07.23213381Z level=info msg="Executing migration" id="create kv_store table v1"
logger=migrator t=2022-09-06T07:15:07.237526534Z level=info msg="Executing migration" id="add index kv_store.org_id-namespace-key"
logger=migrator t=2022-09-06T07:15:07.242661191Z level=info msg="Executing migration" id="update dashboard_uid and panel_id from existing annotations"
logger=migrator t=2022-09-06T07:15:07.246388367Z level=info msg="Executing migration" id="create permission table"
logger=migrator t=2022-09-06T07:15:07.251814636Z level=info msg="Executing migration" id="add unique index permission.role_id"
logger=migrator t=2022-09-06T07:15:07.257427124Z level=info msg="Executing migration" id="add unique index role_id_action_scope"
logger=migrator t=2022-09-06T07:15:07.262553956Z level=info msg="Executing migration" id="create role table"
logger=migrator t=2022-09-06T07:15:07.267376263Z level=info msg="Executing migration" id="add column display_name"
logger=migrator t=2022-09-06T07:15:07.271376902Z level=info msg="Executing migration" id="add column group_name"
logger=migrator t=2022-09-06T07:15:07.275129409Z level=info msg="Executing migration" id="add index role.org_id"
logger=migrator t=2022-09-06T07:15:07.280189586Z level=info msg="Executing migration" id="add unique index role_org_id_name"
logger=migrator t=2022-09-06T07:15:07.285812693Z level=info msg="Executing migration" id="add index role_org_id_uid"
logger=migrator t=2022-09-06T07:15:07.291326142Z level=info msg="Executing migration" id="create team role table"
logger=migrator t=2022-09-06T07:15:07.296590486Z level=info msg="Executing migration" id="add index team_role.org_id"
logger=migrator t=2022-09-06T07:15:07.301520881Z level=info msg="Executing migration" id="add unique index team_role_org_id_team_id_role_id"
logger=migrator t=2022-09-06T07:15:07.306075499Z level=info msg="Executing migration" id="add index team_role.team_id"
logger=migrator t=2022-09-06T07:15:07.310779313Z level=info msg="Executing migration" id="create user role table"
logger=migrator t=2022-09-06T07:15:07.315218463Z level=info msg="Executing migration" id="add index user_role.org_id"
logger=migrator t=2022-09-06T07:15:07.32077101Z level=info msg="Executing migration" id="add unique index user_role_org_id_user_id_role_id"
logger=migrator t=2022-09-06T07:15:07.325406282Z level=info msg="Executing migration" id="add index user_role.user_id"
logger=migrator t=2022-09-06T07:15:07.330398513Z level=info msg="Executing migration" id="create builtin role table"
logger=migrator t=2022-09-06T07:15:07.335381734Z level=info msg="Executing migration" id="add index builtin_role.role_id"
logger=migrator t=2022-09-06T07:15:07.340500177Z level=info msg="Executing migration" id="add index builtin_role.name"
logger=migrator t=2022-09-06T07:15:07.34590983Z level=info msg="Executing migration" id="Add column org_id to builtin_role table"
logger=migrator t=2022-09-06T07:15:07.350840644Z level=info msg="Executing migration" id="add index builtin_role.org_id"
logger=migrator t=2022-09-06T07:15:07.355631112Z level=info msg="Executing migration" id="add unique index builtin_role_org_id_role_id_role"
logger=migrator t=2022-09-06T07:15:07.360286119Z level=info msg="Executing migration" id="Remove unique index role_org_id_uid"
logger=migrator t=2022-09-06T07:15:07.364138007Z level=info msg="Executing migration" id="add unique index role.uid"
logger=migrator t=2022-09-06T07:15:07.368136303Z level=info msg="Executing migration" id="create seed assignment table"
logger=migrator t=2022-09-06T07:15:07.373638311Z level=info msg="Executing migration" id="add unique index builtin_role_role_name"
logger=migrator t=2022-09-06T07:15:07.378784435Z level=info msg="Executing migration" id="add column hidden to role table"
logger=migrator t=2022-09-06T07:15:07.383053926Z level=info msg="Executing migration" id="create query_history table v1"
logger=migrator t=2022-09-06T07:15:07.387621392Z level=info msg="Executing migration" id="add index query_history.org_id-created_by-datasource_uid"
logger=migrator t=2022-09-06T07:15:07.392360705Z level=info msg="Executing migration" id="teams permissions migration"
logger=migrator t=2022-09-06T07:15:07.395599275Z level=info msg="Executing migration" id="dashboard permissions"
logger=migrator t=2022-09-06T07:15:07.403707997Z level=info msg="Executing migration" id="dashboard permissions uid scopes"
logger=migrator t=2022-09-06T07:15:07.406989872Z level=info msg="Executing migration" id="drop managed folder create actions"
logger=migrator t=2022-09-06T07:15:07.410226078Z level=info msg="Executing migration" id="alerting notification permissions"
logger=migrator t=2022-09-06T07:15:07.413196751Z level=info msg="Executing migration" id="create query_history_star table v1"
logger=migrator t=2022-09-06T07:15:07.418693747Z level=info msg="Executing migration" id="add index query_history.user_id-query_uid"
logger=migrator t=2022-09-06T07:15:07.43401974Z level=info msg="Executing migration" id="add column org_id in query_history_star"
logger=migrator t=2022-09-06T07:15:07.450591941Z level=info msg="Executing migration" id="create correlation table v1"
logger=migrator t=2022-09-06T07:15:07.458497117Z level=info msg="Executing migration" id="create entity_events table"
logger=migrator t=2022-09-06T07:15:07.464559928Z level=info msg="Executing migration" id="create dashboard public config v1"
logger=migrator t=2022-09-06T07:15:07.46894405Z level=info msg="Executing migration" id="drop index UQE_dashboard_public_config_uid - v1"
logger=migrator t=2022-09-06T07:15:07.469100451Z level=warn msg="Skipping migration: Already executed, but not recorded in migration log" id="drop index UQE_dashboard_public_config_uid - v1"
logger=migrator t=2022-09-06T07:15:07.473214974Z level=info msg="Executing migration" id="drop index IDX_dashboard_public_config_org_id_dashboard_uid - v1"
logger=migrator t=2022-09-06T07:15:07.473421366Z level=warn msg="Skipping migration: Already executed, but not recorded in migration log" id="drop index IDX_dashboard_public_config_org_id_dashboard_uid - v1"
logger=migrator t=2022-09-06T07:15:07.477556703Z level=info msg="Executing migration" id="Drop old dashboard public config table"
logger=migrator t=2022-09-06T07:15:07.481884304Z level=info msg="Executing migration" id="recreate dashboard public config v1"
logger=migrator t=2022-09-06T07:15:07.485630647Z level=info msg="Executing migration" id="create index UQE_dashboard_public_config_uid - v1"
logger=migrator t=2022-09-06T07:15:07.490968172Z level=info msg="Executing migration" id="create index IDX_dashboard_public_config_org_id_dashboard_uid - v1"
logger=migrator t=2022-09-06T07:15:07.497441722Z level=info msg="Executing migration" id="drop index UQE_dashboard_public_config_uid - v2"
logger=migrator t=2022-09-06T07:15:07.501774112Z level=info msg="Executing migration" id="drop index IDX_dashboard_public_config_org_id_dashboard_uid - v2"
logger=migrator t=2022-09-06T07:15:07.505918547Z level=info msg="Executing migration" id="Drop public config table"
logger=migrator t=2022-09-06T07:15:07.510017635Z level=info msg="Executing migration" id="Recreate dashboard public config v2"
logger=migrator t=2022-09-06T07:15:07.513843992Z level=info msg="Executing migration" id="create index UQE_dashboard_public_config_uid - v2"
logger=migrator t=2022-09-06T07:15:07.518073985Z level=info msg="Executing migration" id="create index IDX_dashboard_public_config_org_id_dashboard_uid - v2"
logger=migrator t=2022-09-06T07:15:07.522335766Z level=info msg="Executing migration" id="create index UQE_dashboard_public_config_access_token - v2"
logger=migrator t=2022-09-06T07:15:07.527811662Z level=info msg="Executing migration" id="Rename table dashboard_public_config to dashboard_public - v2"
logger=migrator t=2022-09-06T07:15:07.537216184Z level=info msg="Executing migration" id="create default alerting folders"
logger=migrator t=2022-09-06T07:15:07.541445529Z level=info msg="Executing migration" id="create file table"
logger=migrator t=2022-09-06T07:15:07.54712283Z level=info msg="Executing migration" id="file table idx: path natural pk"
logger=migrator t=2022-09-06T07:15:07.554247493Z level=info msg="Executing migration" id="file table idx: parent_folder_path_hash fast folder retrieval"
logger=migrator t=2022-09-06T07:15:07.561346449Z level=info msg="Executing migration" id="create file_meta table"
logger=migrator t=2022-09-06T07:15:07.568196612Z level=info msg="Executing migration" id="file table idx: path key"
logger=migrator t=2022-09-06T07:15:07.573664219Z level=info msg="Executing migration" id="set path collation in file table"
logger=migrator t=2022-09-06T07:15:07.578731453Z level=info msg="Executing migration" id="managed permissions migration"
logger=migrator t=2022-09-06T07:15:07.583175973Z level=info msg="Executing migration" id="managed folder permissions alert actions migration"
logger=migrator t=2022-09-06T07:15:07.587136731Z level=info msg="Executing migration" id="RBAC action name migrator"
logger=migrator t=2022-09-06T07:15:07.590865101Z level=info msg="Executing migration" id="Add UID column to playlist"
logger=migrator t=2022-09-06T07:15:07.595675419Z level=info msg="Executing migration" id="Update uid column values in playlist"
logger=migrator t=2022-09-06T07:15:07.599105604Z level=info msg="Executing migration" id="Add index for uid in playlist"
logger=migrator t=2022-09-06T07:15:07.603724542Z level=info msg="Executing migration" id="update group index for alert rules"
logger=migrator t=2022-09-06T07:15:07.607461256Z level=info msg="Executing migration" id="managed folder permissions alert actions repeated migration"
logger=migrator t=2022-09-06T07:15:07.611197872Z level=info msg="migrations completed" performed=447 skipped=0 duration=2.334618442s
logger=sqlstore t=2022-09-06T07:15:07.625006637Z level=info msg="Created default admin" user=admin
logger=sqlstore t=2022-09-06T07:15:07.625209654Z level=info msg="Created default organization"
logger=plugin.manager t=2022-09-06T07:15:07.673333877Z level=info msg="Plugin registered" pluginId=input
logger=secrets t=2022-09-06T07:15:07.673711866Z level=info msg="Envelope encryption state" enabled=true currentprovider=secretKey.v1
logger=query_data t=2022-09-06T07:15:07.675283761Z level=info msg="Query Service initialization"
logger=live.push_http t=2022-09-06T07:15:07.964403036Z level=info msg="Live Push Gateway initialization"
logger=ticker t=2022-09-06T07:15:07.980717201Z level=info msg=starting first_tick=2022-09-06T07:15:10Z
logger=infra.usagestats.collector t=2022-09-06T07:15:08.053032771Z level=info msg="registering usage stat providers" usageStatsProvidersLen=2
logger=provisioning.alerting t=2022-09-06T07:15:08.071551428Z level=info msg="starting to provision alerting"
logger=provisioning.alerting t=2022-09-06T07:15:08.071618794Z level=info msg="finished to provision alerting"
logger=grafanaStorageLogger t=2022-09-06T07:15:08.072072557Z level=info msg="storage starting"
logger=ngalert t=2022-09-06T07:15:08.074262324Z level=info msg="warming cache for startup"
logger=http.server t=2022-09-06T07:15:08.076656047Z level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl= socket=
logger=ngalert.multiorg.alertmanager t=2022-09-06T07:15:08.096918795Z level=info msg="starting MultiOrg Alertmanager"

```

</div></details>

firewalldを使用している場合は外部からアクセスできるように穴をあけておきます。

```
[root@test14 ~]# firewall-cmd --zone=public --add-port=3000/tcp --permanent
success
[root@test14 ~]# firewall-cmd --reload
success
```

### 管理コンソールへのアクセス

ブラウザからhttp://localhost:3000/にアクセスしてみます。
admin/adminでログインします。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/39c354b3-f4b5-1142-70fb-5eafa71f79a1.png)

パスワード変更が促されるのでパスワードを変更しておきます。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/f82a4cb4-4963-0237-e641-f5465334853a.png)

Grafanaの画面が開きました。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/fe33d318-7d78-8a81-465f-3de993741f55.png)

### Prometheus接続構成

データソースとしてPrometheusを登録して、GrafanaでPrometheusのデータを可視化できるようにします。

左側のメニューからConfiguation - Data sourcesを選択
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/2f3e2add-d274-6d36-c4e8-f0a2cfc923bf.png)

Add data sourceをクリック
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/bd59ddb5-4e4d-4fa5-c7da-b19b2de4d560.png)

Prometheusをクリック
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/dbcf4ddc-f3ed-184d-cce1-a3e72e1a05b8.png)

PrometheusのURLを指定します。その他は適宜カスタマイズし(ここでは他のパラメータはデフォルトのまま)、Save & testをクリックします。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/913d8b3b-3595-94ce-caae-5d42b9d42d19.png)

以下のメッセージが出ればOKです。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/64f998a8-b66a-76cb-182c-643509054118.png)

### 停止

```
[root@test14 ~/Prometheus]# podman stop grafana
grafana
```