Linux 仮想配信エージェント 2503

モニターサービスデーモン

  • モニターサービスである ctxmonitord は、Linux VDA の稼働状況を監視するデーモンです。これは次の 3 つのモジュールで構成されています。

  • 主要プロセス監視モジュール: このモジュールは、予期せぬ障害発生時に主要サービスを自動的に再起動するよう Systemd に委任し、ターゲットプロセスのステータスを定期的にスキャンして記録し、Xorg の残存ファイルをタイムリーにクリーンアップします。ログは /var/log/xdl/ms.log に保存されます。
  • XDPing 統合モジュール: このモジュールは、XDPing 分析およびバックアップタスクを定期的に実行します。これらのタスクからのすべての出力は、/var/log/xdl/msxdping.log で確認できます。
  • Linux VDA セルフアップデートモジュール: 詳しくは、「Azure を介した Linux VDA のセルフアップデート」を参照してください。

構成

デフォルトでは、VDA の起動時にモニターサービス ctxmonitord が自動的に起動します。管理者権限を持つユーザーは、/etc/xdl/ctxmonitord.conf および /etc/xdl/whitelist.conf を介してこれを構成できます。

ctxmonitord.conf

この構成ファイルは、モニターサービス ctxmonitord とそのモジュールの動作を指定します。デフォルトでは、次のように構成されています。

     ; This is the configuration file for ctxmonitord service  

; Section 'service' configures the key process monitor module
[service]
MonitorEnable=true     ; true or false
DetectInterval=300      ; in seconds, minimum is 60

; Section 'xdping' configures the XDPing integration module
[xdping]
XdpingEnable=true      ; true or false
AnalysisInterval=600    ; in seconds, minimum is 60, 0 means disable
BackupInterval=1        ; in days, 0 means disable

; Section 'rules' configures the rules about how to monitor each key process
; Each rule should be named as rules.<ProcessName> where <ProcessName> is the name of the process to be monitored
; 'ProcessName' should be the name of the target process that is picked up from whitelist.conf
; 'MonitorType' should be 'HealthCheck' or 'ResidueCleanup'. All 'MonitorType' should be 'HealthCheck' except for 'Xorg'
[rules]
[rules.ctxhdx]
ProcessName=ctxhdx
MonitorType=HealthCheck

[rules.ctxvda]
ProcessName=ctxvda
MonitorType=HealthCheck

[rules.ctxjproxy]
ProcessName=ctxjproxy
MonitorType=HealthCheck

[rules.ctxpolicyd]
ProcessName=ctxjproxy
MonitorType=HealthCheck

[rules.ctxlogd]
ProcessName=ctxlogd
MonitorType=HealthCheck

[rules.xorg]
ProcessName=Xorg
MonitorType=ResidueCleanup
<!--NeedCopy-->

whitelist.conf

この構成ファイルは、監視対象プロセスのホワイトリストを指定します。ctxmonitord.conf ファイルで指定されたターゲットサービスは、whitelist.conf ファイルにもリストされている必要があります。デフォルトでは、次のように構成されています。

ctxhdx
ctxvda
ctxjproxy
ctxlogd
ctxcdm
ctxcups
ctxpolicyd
ctxusbsd
ctxceip
ctxsdcd
ctxrunatboot
ctxgdtd
ctxbcrd
ctxfidod
ctxpfwd
ctxwcamsd
ctxcertmgr
ctxscardsd  # Except for SLES
ctxfedsd    # Only for RHEL 8/9
Xorg
<!--NeedCopy-->

注:

  • ctxmonitord.conf および whitelist.conf ファイルでの変更を有効にするには、systemctl restart ctxmonitord コマンドを実行してモニターサービスデーモンを再起動します。

  • 予期せぬ障害発生時にサービスが再起動する方法を構成するには、/usr/lib/systemd/system/ctx*.service ファイルを編集します。たとえば、以下のものがデフォルトの再起動オプションです。

     Restart=on-failure
     RestartSec=5
     StartLimitInterval=60
     StartLimitBurst=3
     <!--NeedCopy-->
    
モニターサービスデーモン