・AlmaLinux8.8にHinemos7.0エージェントをインストールする手順を知りたい。
・具体的な手順を分かりやすく教えてほしい。
こういった疑問に答えます。
本記事の内容
- AlmaLinux8.8にHinemos7.0エージェントをインストールする手順
この記事を書いている私は、某SIerに勤務しながら、
WEB系エンジニア・インフラエンジニアに憧れて、プログラミングおよびインフラ技術の勉強をしています。
こういった私が、解説していきます。
私が実機で試したコマンドや画像を載せて書いています。
記事の信頼性担保に繋がると思います。
AlmaLinux8.8にHinemos7.0エージェントをインストールする手順
手順① マニュアルとrpmファイルをダウンロード
手順② 必要なパッケージを事前にインストール
dnf install java-1.8.0-openjdk
dnf install net-snmp
dnf install net-snmp-libs
dnf install net-snmp-utils
dnf install libpcap
dnf install rsyslog
[root@SV-ALTAIR ~]# dnf install java-1.8.0-openjdk [root@SV-ALTAIR ~]# dnf install net-snmp [root@SV-ALTAIR ~]# dnf install net-snmp-libs [root@SV-ALTAIR ~]# dnf install net-snmp-utils [root@SV-ALTAIR ~]# dnf install libpcap
手順③ firewalldの設定
Hinemos用のゾーンを追加して、マネージャーサーバーからsnmpへの接続を許可します。
firewall-cmd --new-zone=hinemoszone --permanent
firewall-cmd --zone=hinemoszone --set-target=ACCEPT --permanent
firewall-cmd --zone=hinemoszone --add-source=[HinemosマネージャーサーバのIP] --permanent
firewall-cmd --zone=hinemoszone --add-service=snmp --permanent
firewall-cmd --reload
[root@SV-ALTAIR tmp]# firewall-cmd --new-zone=hinemoszone --permanent success [root@SV-ALTAIR tmp]# firewall-cmd --zone=hinemoszone --set-target=ACCEPT --permanent success [root@SV-ALTAIR tmp]# firewall-cmd --zone=hinemoszone --add-source=192.168.100.107/32 --permanent success [root@SV-ALTAIR tmp]# firewall-cmd --zone=hinemoszone --add-service=snmp --permanent success [root@SV-ALTAIR tmp]# firewall-cmd --reload success
hinemoszone (active) target: ACCEPT icmp-block-inversion: no interfaces: sources: 192.168.100.107/32 services: snmp ports: protocols: forward: no masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
手順⑤ Hinemosエージェントのインストール
rpmファイルを/tmpにアップロード
[root@SV-VEGA ~]# cd /tmp
インストール実行
HINEMOS_MANAGER=[HinemosマネージャーサーバーのIP] rpm -ivh hinemos-7.0-agent-7.0.1-1.el.noarch.rpm
[root@SV-ALTAIR tmp]# HINEMOS_MANAGER=192.168.100.107 rpm -ivh hinemos-7.0-agent-7.0.1-1.el.noarch.rpm Verifying... ################################# [100%] 準備しています... ################################# [100%] 更新中 / インストール中... 1:hinemos-7.0-agent-0:7.0.1-1.el ################################# [100%] Redirecting to /bin/systemctl status rsyslog.service Redirecting to /bin/systemctl restart rsyslog.service Redirecting to /bin/systemctl start snmpd.service
手順⑥ Hinemosエージェントの開始
systemctl start hinemos_agent
[root@SV-ALTAIR tmp]# systemctl start hinemos_agent [root@SV-ALTAIR tmp]# systemctl status hinemos_agent ● hinemos_agent.service - SYSV: Hinemos Agent Loaded: loaded (/etc/rc.d/init.d/hinemos_agent; generated) Active: active (running) since Tue 2023-06-20 21:12:57 JST; 4s ago Docs: man:systemd-sysv-generator(8) Process: 28865 ExecStart=/etc/rc.d/init.d/hinemos_agent start (code=exited, status=0/SUCCESS) Tasks: 23 (limit: 12340) Memory: 70.4M CGroup: /system.slice/hinemos_agent.service mq28923 /usr/bin/java -Dhostname=SV-ALTAIR -server -Xms32m -Xmx32m -Xss256k -Dhinemos.ag> 6月 20 21:12:56 SV-ALTAIR systemd[1]: Starting SYSV: Hinemos Agent... 6月 20 21:12:57 SV-ALTAIR hinemos_agent[28865]: Starting hinemos_agent : 6月 20 21:12:57 SV-ALTAIR hinemos_agent[28872]: Hinemos Agent started. 6月 20 21:12:57 SV-ALTAIR systemd[1]: Started SYSV: Hinemos Agent.
手順⑦ Hinemosマネージャーサーバー側のfirewalldの設定
Hinemosマネージャーサーバー側のfirewalldに、エージェント(監視対象サーバ)からのrsyslog (514/tcp) への接続を許可します。
firewall-cmd --zone=hinemoszone --add-source=[エージェントをインストールした監視対象サーバのIP] --permanent
[root@SV-SATURN ~]# firewall-cmd --zone=hinemoszone --add-source=192.168.1.152/32 --permanent success [root@SV-SATURN ~]# firewall-cmd --reload success
hinemoszone (active) target: ACCEPT icmp-block-inversion: no interfaces: sources: 192.168.1.152/32 services: ports: 514/tcp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
手順8 Hinemosクライアント画面からリポジトリ登録して監視設定を追加
リポジトリ追加
リソース監視
シスログ監視