拡張機能
拡張パックの設定
通常のインストール後に拡張パックの機能を使用するには、構成ファイルを作成し、次のようにエージェントを再起動します。
MySQLサーバーリスト
MySQL/MariaDB モニタリングエージェントが利用可能です。
Web URLの性能チェック
WhaTapインフラエージェントは、与えられたWebアドレスに接続し、接続有無および応答時間を収集します。収集されたWeb URLの性能はカテゴリserver_webcheck
で確認できます。次のコマンドでチェックするWebアドレスを追加します。URLモニタリングサービスの詳細については、次の文書を参照してください。
- Linux Shell
- Windows Powershell
echo "チェックするウェブアドレス" | sudo tee -a /usr/whatap/infra/conf/webcheck.conf
echo "webcheck.enabled=true" | sudo tee -a /usr/whatap/infra/conf/whatap.conf
sudo service whatap-infra restart
Add-Content -Path "C:\Program Files\WhatapInfra\webcheck.conf" -Value "チェックするウェブアドレス"
Add-Content -Path "C:\Program Files\WhatapInfra\whatap.conf" -Value "webcheck.enabled=true"
Restart-Service "Whatap Infra"
Redisインスタンス
WhaTapインフラエージェントは、特定のRedisアドレスに接続し、接続数を含む複数の性能指数を収集します。収集された性能情報は、カテゴリserver_redis
で確認できます。次のコマンドでチェックするRedisサーバーの接続情報を追加できます。
- Linux Shell
- Windows Powershell
sudo echo "addr=Redisアドレス:ポート番号" | sudo tee /usr/whatap/infra/conf/redis.conf
sudo echo "password=Redis 패스워드" | sudo tee -a /usr/whatap/infra/conf/redis.conf
sudo service whatap-infra restart
Add-Content -Path "C:\Program Files\WhatapInfra\redis.conf" -Value "addr=Redisアドレス:ポート番号"
Add-Content -Path "C:\Program Files\WhatapInfra\redis.conf" -Value "password=Redisパスワード"
Restart-Service "Whatap Infra"
Memcachedインスタンス
WhaTapインフラエージェントは、特定のMemcachedアドレスに接続し、接続数を含む複数の性能指数を収集します。収集された情報は、カテゴリserver_memcached
で確認できます。次のコマンドでチェックするMemcachedサーバーの接続情報を追加できます。
- Linux Shell
- Windows Powershell
sudo echo "addr=Memcachedアドレス:ポート番号" | sudo tee /usr/whatap/infra/conf/memcached.conf
sudo echo "password=Memcachedパスワード" | sudo tee -a /usr/whatap/infra/conf/memcached.conf
sudo service whatap-infra restart
Add-Content -Path "C:\Program Files\WhatapInfra\memcached.conf" -Value "addr=Memcachedアドレス"
Add-Content -Path "C:\Program Files\WhatapInfra\memcached.conf" -Value "password=Memcachedパスワード"
Restart-Service "Whatap Infra"
TCPポートモニタリング
ネットワークデーモンの受信ポートが無効になった場合に通知を受け取ることができます。
ホーム画面>プロジェクトの選択> アラート通知 > イベント設定 > サーバータブを選択して、+ イベント設定追加ボタンを選択します。
-
ポート指標のトグルボタンをクリックして、使用状態に変更します。
-
保存ボタンを選択して保存します。
-
対象サーバーに、次のコマンドを追加してください。
- Linux Shell
- Windows Powershell
#以下の変数にモニタリング対象IPを指定します。
export TARGET_IP=127.0.0.1
#以下の変数にモニタリング対象ポート番号を指定します。
export TARGET_PORT=80
echo "tcp.check.$TARGET_PORT=tcp://$TARGET_IP:$TARGET_PORT" |sudo tee -a /usr/whatap/infra/conf/whatap.conf#以下の変数にモニタリング対象IPを指定します。
$TARGET_IP="127.0.0.1"
#以下の変数にモニタリング対象ポート番号を指定します。
$TARGET_PORT="80"
Add-Content -Path "C:\Program Files\WhatapInfra\whatap.conf" -Value "tcp.check.$TARGET_PORT=tcp://$TARGET_IP:$TARGET_PORT"
プロセスネットワークの性能測定
プロセスネットワークの性能は、サー バーリスト > サーバー 詳細画面のプロセスウィジェットで確認できます。
- Linux Shell
- Windows Powershell
echo "process.fdcheck=true" |sudo tee -a /usr/whatap/infra/conf/whatap.conf
# 管理者権限が必要です。
Add-Content -Path "C:\Program Files\WhatapInfra\whatap.conf" -Value "process.fdcheck=true"
サーバースペック収集
CPU、MEMORY、DISK、NICの仕様とインストールされたパッケージおよび仮想マシンのメタ情報を収集します。 各カテゴリで、次の内容を確認できます。
server_package
:インストールされているパッケージです。server_inventory
:CPU、MEMORY、DISK、NICの仕様です。server_pending_security_update
:Linuxのセキュリティパッチの待機リストです。
- Linux Shell
- Windows Powershell
echo "inventory.product.enabled=true" |sudo tee -a /usr/whatap/infra/conf/whatap.conf
# 管理者権限が必要です。
Add-Content -Path "C:\Program Files\WhatapInfra\whatap.conf" -Value "inventory.product.enabled=true"
Linuxコンテナの性能収集
LinuxコンテナのCPU、MEMORY、DISK、NIC性能を収集します。収集された性能情報は、カテゴリserver_container
で確認できます。
echo "container.enabled=true" |sudo tee -a /usr/whatap/infra/conf/whatap.conf
Windowsサーバーサービスの動作状態を収集する
ウィンドウサーバーサービスの運用状態を収集します。収集されたサービス運用状態はカテゴリ server_windows_service
で確認できます。
# 管理者権限が必要です。
Add-Content -Path "C:\Program Files\WhatapInfra\whatap.conf" -Value "winservice.enabled=true"
ファイルモニタリング
ファイルシステム上に存在または存在する可能性のあるファイルおよびディレクトリをモニタリングできます。
- Linux Shell
- Windows Powershell
echo "filecheck.enabled=true" |sudo tee -a /usr/whatap/infra/conf/filesystem.conf
echo "モニタリングしたいファイルまたはディレクトリの全体パス" |sudo tee -a /usr/whatap/infra/conf/filesystem.conf
Add-Content -Path "C:\Program Files\WhatapInfra\whatap.conf" -Value "filecheck.enabled=true"
Add-Content -Path "C:\Program Files\WhatapInfra\filesystem.conf" -Value "モニタリングするファイルまたはディレクトリの全体パス"
Nvidia GPUモニタリング
nvidia-smi
コマンドがマウントされている場合、GPU性能を5秒間隔で収集し、WhaTapにアップロードされます。収集された情報はメトリクスカテゴリserver_nvidiasmi
に収集されます。
- Linux Shell
- Windows Powershell
echo "nvidiasmi.enabled=true" |sudo tee -a /usr/whatap/infra/conf/whatap.conf
Add-Content -Path "C:\Program Files\WhatapInfra\whatap.conf" -Value "nvidiasmi.enabled=true"
-
category server_nvidiasmi
メトリクス 備考 DecoderUtil gauge、Decoder utilization (in %) EncoderUtil gauge、Encoder utilization (in %) FreeFbMemoryUsageGpu gauge、Framebuffer memory free (in MiB). UsedFbMemoryUsageGpu gauge、Framebuffer memory used (in MiB). GpuTemp gauge、GPU temperature (in C). GpuUtil gauge、GPU utilization (in %). MemClock gauge、Memory clock frequency (in MHz). MemoryUtil gauge、Memory utilization (in %). SmClock gauge、SM clock frequency (in MHz).
WhaTapエージェントログの場所を変更する
WhaTapエージェントログ(whatap_infrad.log
、whatap_infra.log
、whatap_infrad.fork.stdout.log
)のパスを変更します。指定パスがない場合は、WhaTapエージェントは指定パスの作成を試みます。エージェント2.0.6バージョン以降に対応されています。
- Linux Shell
- Windows Powershell
echo "agent.log.prefix=変更するディレクトリ" |sudo tee -a /usr/whatap/infra/conf/whatap.conf
Add-Content -Path "C:\Program Files\WhatapInfra\whatap.conf" -Value "agent.log.prefix=変更するディレクトリ"
Windowsの場合、パスの区切り文字を\\
と入力できます。
Netstatモニタリング
netstatコマンドが入力された場合、1分間隔で収集しカテゴリ server_netstat
(netstat connection 統計), server_netstat_s
(netstat -sコマンド実行結果)にアップロードされます。
- Linux Shell
- Windows Powershell
echo "netstats.enabled=true" |sudo tee -a /usr/whatap/infra/conf/whatap.conf
Add-Content -Path "C:\Program Files\WhatapInfra\whatap.conf" -Value "netstats.enabled=true"
ユーザースクリプトモニタリング
Linuxサーバーで実行可能なユーザースクリプトを定期的に実行して結果をアップロードします。 次の例を参考にして、ユーザースクリプトを作成してください。
-
スクリプトを次のように作成して実行してください。
Linux Shell#!/bin/bash
urls=("https://www.whatap.io" "https://blog.whatap.io" "https://service.whatap.io")
for url in ${urls[*]}; do
echo "M $url url $url"
curl -w @- -o /dev/null -s "$url" <<'EOF'
M %{url_effective} url %{url_effective}\n
H %{url_effective} time_namelookup %{time_namelookup}\n
H %{url_effective} time_connect %{time_connect}\n
H %{url_effective} time_appconnect %{time_appconnect}\n
H %{url_effective} time_pretransfer %{time_pretransfer}\n
H %{url_effective} time_redirect %{time_redirect}\n
H %{url_effective} time_starttransfer %{time_starttransfer}\n
H %{url_effective} time_total %{time_total}\n
EOF
done -
次のように出力されるか確認してください。
Linux Shell$ ./curl.sh
M https://www.whatap.io/ url https://www.whatap.io/
H https://www.whatap.io/ time_namelookup 0.007289
H https://www.whatap.io/ time_connect 0.010702
H https://www.whatap.io/ time_appconnect 0.033637
H https://www.whatap.io/ time_pretransfer 0.033831
H https://www.whatap.io/ time_redirect 0.000000
H https://www.whatap.io/ time_starttransfer 0.043230
H https://www.whatap.io/ time_total 0.043312
M https://blog.whatap.io/ url https://blog.whatap.io/
H https://blog.whatap.io/ time_namelookup 0.000000
H https://blog.whatap.io/ time_connect 0.000000
H https://blog.whatap.io/ time_appconnect 0.000000
H https://blog.whatap.io/ time_pretransfer 0.000000
H https://blog.whatap.io/ time_redirect 0.000000
H https://blog.whatap.io/ time_starttransfer 0.000000
H https://blog.whatap.io/ time_total 0.005654
M https://service.whatap.io/ url https://service.whatap.io/
H https://service.whatap.io/ time_namelookup 0.004296
H https://service.whatap.io/ time_connect 0.007282
H https://service.whatap.io/ time_appconnect 0.038404
H https://service.whatap.io/ time_pretransfer 0.038607
H https://service.whatap.io/ time_redirect 0.000000
H https://service.whatap.io/ time_starttransfer 0.055226
H https://service.whatap.io/ time_total 0.055307 -
スクリプトの正常収集を確認し、次のようにWhaTapサーバーのモニタリングエージェントにスクリプトを登録してください。
Linux Shellexport USER_SCRIPT=実行するユーザースクリプトの絶対パス
suco chmod +x $USER_SCRIPT
sudo mkdir /usr/whatap/infra/ext/
sudo cp -r $USER_SCRIPT /usr/whatap/infra/ext/
export RUNAS_USER=ユーザースクリプトを実行するアカウント。rootアカウントを除く
sudo WHATAP_HOME=/usr/whatap/infra/conf /usr/whatap/infra/whatap_infrad --user=$RUNAS_USER init-script
sudo service whatap-infra restart
収集されたデータは、分析 > メトリクスチャートのカテゴリserver_ext_フォルダ_実行スクリプト
で確認できます。
サーバー時間同期化モニタリング
事前確認
-
OS:Linux
-
WhaTapサーバーモニタリングエージェントバージョン:2.5.4以降
次のオプションを使用してサーバー時間の同期化(NTP) モニタリング機能を活性化することができます。
echo "ntpq.enabled=true" |sudo tee -a /usr/whatap/infra/conf/whatap.conf