モニタリング用の PostgreSQL の設定
ユーザ権限
pg_stat_activity および pg_stat_statements の内容を表示できるようになります。
pg_stat_statements セクションの有効化
セットアップの検証
SELECT * FROM pg_stat_activity_allusers
SELECT * FROM pg_stat_statements_allusers
Gain operational intelligence by collecting, indexing, and visualizing data using a powerful on-premises engine for actionable insights.
Release NotesCollect, index, and visualize your data in the cloud for better operational intelligence.
Release NotesDiscover, share, and install apps and add-ons with the Splunk community on Splunkbase. Publish your own or add others to your Splunk platform instance.
Gain operational intelligence by collecting, indexing, and visualizing data using a powerful on-premises engine for actionable insights.
Release NotesStreamline your security operations with a SOAR system that integrates orchestration, playbook automation, and case management to enhance threat response.
Release NotesPrevent disruptions and optimize operations when you monitor and analyze your IT service with predictive analytics and machine learning.
Release NotesCollect, index, and visualize your data in the cloud for better operational intelligence.
Release NotesGain end-to-end visibility, troubleshoot in real-time, and optimize performance across infrastructure, applications, and user interfaces.
Release NotesMonitor business application performance for cloud environments and IT infrastructure.
Release NotesMonitor business application performance for cloud environments and IT infrastructure.
Release NotesAn on-premises solution using AppDynamics On-Premises or Appdynamics Virtual Appliance (self hosted).
Release NotesBuild and deliver apps and integrations with SDKs, APIs and tools.
Access and share apps and add-ons with the Splunk community on Splunkbase. Publish your own apps, or download and install others on your Splunk platform instance.
Explore information on best practices, connect with community, or contact support.
pg_stat_activity および pg_stat_statements の内容を表示できるようになります。
get_sa() 関数を呼び出します。
CREATE FUNCTION get_sa()
RETURNS SETOF pg_stat_activity LANGUAGE sql AS
$$ SELECT * FROM pg_catalog.pg_stat_activity; $$
VOLATILE
SECURITY DEFINER;
CREATE VIEW pg_stat_activity_allusers AS SELECT * FROM get_sa();
GRANT SELECT ON pg_stat_activity_allusers TO public;
get_querystats( ) 関数を呼び出します。
CREATE FUNCTION get_querystats()
RETURNS SETOF pg_stat_statements LANGUAGE sql AS
$$ SELECT * FROM pg_stat_statements; $$
VOLATILE
SECURITY DEFINER;
CREATE VIEW pg_stat_statements_allusers AS SELECT * FROM get_querystats();
GRANT SELECT ON pg_stat_statements_allusers TO public;
pg_stat_statements 拡張機能を作成します。
create extension pg_stat_statements
pg_stat_statements 拡張を初めて作成する場合は、データベースを再起動します。SELECT * FROM pg_stat_activity_allusers
SELECT * FROM pg_stat_statements_allusers