ヘルプ APM Goエージェントを使用した APMインサイト サービス管理
Site24x7 APMインサイトGoエージェントを管理するには、service.shスクリプトを使用します。エージェントの起動、停止、再起動、ステータスの確認、バージョンの表示、アンインストール、ヘルプ情報の表示が可能です。
サービススクリプトの場所: /opt/site24x7/apm-insight-go-agent/bin/service.sh
必要な権限を得るために、これらのコマンドをsudoで実行する必要がある場合があります。
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh
|
コマンド/オプション |
説明 |
使用例 |
|---|---|---|
|
start |
エージェントを起動します。 |
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh start |
|
stop |
エージェントを停止します。 |
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh stop |
|
restart |
エージェントを再起動します。 |
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh restart |
|
status |
現在のエージェントのステータスを表示します。 |
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh status |
|
version |
エージェントのバージョン情報を表示しまs。 |
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh version |
|
uninstall, -u |
エージェントをアンインストールします。 |
sudo
/opt/site24x7/apm-insight-go-agent/bin/service.sh uninstall |
|
help, -h |
スクリプトのヘルプ情報を表示します。 |
sudo
/opt/site24x7/apm-insight-go-agent/bin/service.sh help |
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh start
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh stop
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh restart
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh status
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh version
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh uninstall
or
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh -u
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh help
or
sudo /opt/site24x7/apm-insight-go-agent/bin/service.sh -h
(chmod +x service.sh)
service.shスクリプトに加えて、システムのinitシステムを使用してGoエージェントサービスを管理可能です。
systemctlコマンドを使用してエージェントサービスを管理します。
# Start the service
sudo systemctl start apm-insight-go-agent.service
# Stop the service
sudo systemctl stop apm-insight-go-agent.service
# Restart the service
sudo systemctl restart apm-insight-go-agent.service
# Check service status
sudo systemctl status apm-insight-go-agent.service
# Enable service to start automatically on boot
sudo systemctl enable apm-insight-go-agent.service
# Disable automatic start on boot
sudo systemctl disable apm-insight-go-agent.service
Alpine LinuxではOpenRCがinitシステムとして使用されています。rc-serviceコマンドとrc-updateコマンドを使用してエージェントサービスを管理します。
#Start the service
sudo rc-service apm-insight-go-agent start
#Stop the service sudo rc-service apm-insight-go-agent stop
#Restart the service sudo rc-service apm-insight-go-agent restart
#Check service status (may not always be available; consider inspecting logs) sudo rc-service apm-insight-go-agent status
#Enable service to start automatically on boot sudo rc-update add apm-insight-go-agent default
#Disable automatic start on boot sudo rc-update del apm-insight-go-agent default
システムがsystemdまたはOpenRCを使用していない場合は、SysVinitを使用している可能性があります。serviceコマンドとupdate-rc.dコマンドを使用してエージェントサービスを管理します。
# Start the service
sudo service apm-insight-go-agent start
# Stop the service
sudo service apm-insight-go-agent stop
# Restart the service
sudo service apm-insight-go-agent restart
# Enable service to start automatically on boot
sudo update-rc.d apm-insight-go-agent defaults