皆さま、
さて、
埋もれるデータをクラウドに飛ばせ! HapyrusあらためFlyData Inc.が日本でも本格始動
さて、
データベース監査ログ
Amazon Redshiftはデータベース内のアクティビティをロギングする仕組みをサポートしました。この機能によって、
この新リリースによって、
監査ログ保存を開始するには、
では、


監査ログ設定をした後は、

しばらくすると、

次に、

編集ページでは、
これで ユーザアクティビティロギングを有効にするCluster Parameter Groupが作成されました。このパラメータグループをクラスタに紐付けることで、

最後に、

これで完了です!

これが実際のログ内容の例です。

参照リンク
- Bucket Structure for Amazon Redshift Audit Logging
- Amazon Redshift Parameter Groups
- Managing Parameter Groups Using the Console
VPC内でのクラスタ管理機能向上
AWSは、
Amazon RedshiftのためのCloudTrailログ
先日のre:Inventイベントで発表されたCloudTrailログもRedshiftで利用可能になっています。詳細は以下のリンクをご参照ください。
TIPS:Redshiftの実使用量をSQLでモニタする方法
皆さんご存知のように、
- Web (AWSのコンソール) からの確認
- Amazon CloudWatchのアラームの利用
- SQLで確認し、
独自にモニタリング
ここでは、
テーブルごとのデータサイズを確認するには、
select
trim (pgdb.datname) as Database,
trim (pgn.nspname) as Schema,
trim (a.name) as Table,
b.mbytes,
a.rows
from
(
select
db_id,
id,
name,
sum (rows) as rows
from
stv_tbl_perm a
group by
db_id,
id,
name
) as a join
pg_class as pgc
on pgc.oid = a.id join
pg_namespace as pgn
on pgn.oid = pgc.relnamespace join
pg_database as pgdb
on pgdb.oid = a.db_id join
(
select
tbl,
count(*) as mbytes
from
stv_blocklist
group by
tbl
) b
on a.id = b.tbl
order by
mbytes desc,
a.db_id,
a.name
;
また、
select
sum (capacity) / 1024 as capacity_gbytes,
sum (used) / 1024 as used_gbytes,
(sum (capacity) - sum (used)) / 1024 as free_gbytes
from
stv_partitions
where
part_begin = 0
;
実際にpsql等を利用して実行してみてください。これをZabbixやNagiosなどのモニタリングツールと組み合わせることで、
なお、
最後に
Amazon Redshiftは2013年2月15日に一般公開されてから来月
筆者が所属するFlyDataでは、