Setting agent privileges#
デフォルトでは、PEMエージェントは、オペレーティングシステムホストのroot権限とデータベースサーバーのスーパーユーザー権限でインストールされます。これらの特権により、PEMエージェントは、システムの使用状況について監視対象ホストおよびデータベースサーバーで無制限のプローブを呼び出し、情報を取得してPEMサーバーに返すことができます。
rootユーザーと非rootユーザー#
PEMエージェントの権限が低下すると、PEM機能が低下します。完全な機能を実現するには、rootとしてPEMエージェントを実行します。 PEMエージェントがデータベースサーバーのサービスアカウントで実行されている場合、PEMプローブはレポートの生成に使用される統計情報に完全にアクセスできず、機能はそのアカウントの機能に制限されます。 PEMエージェントが別の権限の低いアカウントで実行されている場合、機能はさらに制限されます。
Feature name |
Works with root user |
Works with non-root user |
Works with remote PEM agent |
|---|---|---|---|
Audit Manager |
yes |
The Audit Log Manager might not be able to apply requested modifications if the service can't be restarted. The user running the PEM agent might be different from the user who owns the data directory of the database server. Thus the user running the PEM agent might not be able to change the configuration and also might not be able to restart the services of the database server. |
no |
Capacity Manager |
yes |
yes |
yes Note: There's no correlation between the database server and operating system metrics |
Log Manager |
yes |
The Log Manager might not be able to apply requested modifications if the service can't restart. The user running the PEM agent might be different from the user who owns the data directory of the database server. Thus the user running the PEM agent might not be able to change the configuration and also might not be able to restart the services of the database server. |
no |
Manage Alerts |
yes |
yes |
yes Note: When Run Alert Script on the database server is selected, it runs on the machine where the bound PEM agent is running and not on the actual database server machine. |
Manage Charts |
yes |
yes |
yes |
Manage Dashboards |
yes |
Some dashboards might not be able to show complete data. For example, columns such as swap usage, CPU usage, IO read, and IO write appear as 0 in the session activity dashboard. |
Some dashboards might not be able to show complete data. For example, the operating system information of the database server doesn't appear as not available. |
Manage Probes |
yes |
Some of the PEM probes don't return information, and some of functionality might be affected. |
Some of the PEM probes don't return information, and some of the functionality might be affected. |
Postgres Expert |
yes |
The Postgres Expert can access the configuration expert and schema expert but not the security expert. |
The Expert provides partial information, as operating system information isn't available. |
Postgres Log Analysis Expert |
yes |
The Postgres Log Analysis Expert might not be able to do the analysis, as it depends on the logs imported by Log Manager, which doesn't work as required. |
The Postgres Log Analysis Expert can't do the analysis, as it depends on the logs imported by Log Manager, which doesn't work as required. |
Scheduled Tasks |
yes |
For Linux, if the user is the same as batch_script_user in agent.cfg, then the shell script runs. |
Scheduled tasks work only for the database server. Scripts run on a remote agent. |
Tuning Wizard |
yes |
The Tuning Wizard can't run if the service can't restart. The user running the PEM agent might be different from the user who owns the data directory of the database server. Thus the user running the PEM agent might not be able to change the configuration and also might not be able to restart the services of the database server. |
no |
System Reports |
yes |
yes |
yes |
Core Usage Reports |
yes |
yes |
The Core usage report doesn't show complete information. For example, the platform, number of cores, and total RAM aren't displayed. |
Managing BART |
yes |
BART and the BART scanner might not be able to start or reload. |
no Note: BART requires passwordless authentication between two machines where database server and BART are installed. |
オペレーティングシステムの権限の制限によって影響を受ける機能#
PEMエージェントのオペレーティングシステム権限を制限すると、一部のPEMプローブは情報を結果ず、次の機能が影響を受ける可能性があります。
注釈
このリストは包括的なものではありませんが、制限されている機能の種類の概要を提供します。
Probe or action |
Operating system |
PEM functionality affected |
|---|---|---|
Data And Logfile Analysis |
Linux/ Windows |
The Postgres Expert can't access complete information. |
Session Information |
Linux |
The per-process statistics are incomplete. |
PG HBA |
Linux/ Windows |
The Postgres Expert can't access complete information. |
Service restart functionality |
Linux/ Windows |
The Audit Log Manager, Server Log Manager Log Analysis Expert, and PEM might not be able to apply requested modifications. |
Package Deployment |
Linux/ Windows |
PEM can't run downloaded installation modules. |
Batch Task |
Windows |
PEM can't run scheduled batch jobs in Windows. |
Collect data from server (root access required) |
Linux/ Windows |
Columns such as swap usage, CPU usage, IO read, IO write appear as 0 in the session activity dashboard. |
データベース特権の制限によって影響を受ける機能#
PEMエージェントのデータベース特権を制限すると、次のPEM機能が影響を受ける可能性があります。
Probe |
Operating system |
PEM functionality affected |
|---|---|---|
Audit Log Collection |
Linux/Windows |
PEM receives empty data from the PEM database. |
Server Log Collection |
Linux/Windows |
PEM can't collect server log information. |
Database Statistics |
Linux/Windows |
The Database/Server Analysis dashboards contain incomplete information. |
Session Waits/System Waits |
Linux/Windows |
The Session/System Waits dashboards contain incomplete information. |
Locks Information |
Linux/Windows |
The Database/Server Analysis dashboards contain incomplete information. |
Streaming Replication |
Linux/Windows |
The Streaming Replication dashboard doesn't display information. |
Slony Replication |
Linux/Windows |
Slony-related charts on the Database Analysis dashboard don't display information. |
Tablespace Size |
Linux/Windows |
The Server Analysis dashboard doesn't display complete information. |
xDB Replication |
Linux/Windows |
PEM can't send xDB alerts and traps. |
エラー処理#
プローブは、十分な権限なしでオペレーティングシステムを検索している場合、プローブはpermission denied
エラーを結果ことができます。プローブが十分な権限なしでデータベースを照会している場合、プローブはpermission denied
エラーを返すか、返されたデータを空の値としてPEMチャートまたはグラフに表示する場合があります。
プローブが失敗すると、プローブの名前、プローブが失敗した理由、問題の解決に役立つヒントを含むエントリがログファイルに書き込まれます。
サーバーで発生したプローブ関連のエラーをプローブログダッシュボードで表示したり、PEMワーカーログファイルのエラーメッセージを確認したりできます。 Linuxでは、ログファイルのデフォルトの場所は次のとおりです。
/var/log/pem/worker.log
Windows、 Event Viewerでログ情報を利用できます。