予習メモ
- Zabbix のAdd-Onだけど、Zabbixエージェントとは別にJob Arrangerエージェントのインストールが必要そう。SSHでのエージェントレスには対応してそう。
構築ログ
インストール
[root@* ~]# rpm -qa | grep -i zabbix
zabbix-release-5.0-1.el7.noarch
zabbix-web-deps-scl-5.0.16-1.el7.noarch
zabbix-get-5.0.16-1.el7.x86_64
zabbix-web-5.0.16-1.el7.noarch
zabbix-apache-conf-scl-5.0.16-1.el7.noarch
zabbix-agent-5.0.16-1.el7.x86_64
zabbix-web-mysql-scl-5.0.16-1.el7.noarch
zabbix-server-mysql-5.0.16-1.el7.x86_64
[root@* ~]#
[root@* tmp]# yum install https://www.jobarranger.info/redmine/projects/job-arranger-for-zabbix/repository/22/raw/6.0.0/Job%20Arranger%20Server/jobarranger-server-mysql-6.0.0-1.el7.x86_64.rpm
....
依存性を解決しました
=============================================================================================================================================================
Package アーキテクチャー バージョン リポジトリー 容量
=============================================================================================================================================================
インストール中:
jobarranger-server-mysql x86_64 6.0.0-1.el7 /jobarranger-server-mysql-6.0.0-1.el7.x86_64 3.3 M
依存性関連でのインストールをします:
rh-mariadb105-mariadb-common x86_64 3:10.5.9-2.el7 centos-sclo-rh 69 k
rh-mariadb105-mariadb-config x86_64 3:10.5.9-2.el7 centos-sclo-rh 43 k
rh-mariadb105-mariadb-libs x86_64 3:10.5.9-2.el7 centos-sclo-rh 158 k
rh-mariadb105-runtime x86_64 3.7-1.el7 centos-sclo-rh 1.2 M
トランザクションの要約
=============================================================================================================================================================
インストール 1 パッケージ (+4 個の依存関係のパッケージ)
合計容量: 4.7 M
総ダウンロード容量: 1.4 M
インストール容量: 3.8 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): rh-mariadb105-mariadb-common-10.5.9-2.el7.x86_64.rpm | 69 kB 00:00:00
(2/4): rh-mariadb105-mariadb-config-10.5.9-2.el7.x86_64.rpm | 43 kB 00:00:00
(3/4): rh-mariadb105-mariadb-libs-10.5.9-2.el7.x86_64.rpm | 158 kB 00:00:00
(4/4): rh-mariadb105-runtime-3.7-1.el7.x86_64.rpm | 1.2 MB 00:00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------
合計 2.8 MB/s | 1.4 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
インストール中 : rh-mariadb105-runtime-3.7-1.el7.x86_64 1/5
インストール中 : 3:rh-mariadb105-mariadb-config-10.5.9-2.el7.x86_64 2/5
インストール中 : 3:rh-mariadb105-mariadb-common-10.5.9-2.el7.x86_64 3/5
インストール中 : 3:rh-mariadb105-mariadb-libs-10.5.9-2.el7.x86_64 4/5
インストール中 : jobarranger-server-mysql-6.0.0-1.el7.x86_64 5/5
検証中 : rh-mariadb105-runtime-3.7-1.el7.x86_64 1/5
検証中 : 3:rh-mariadb105-mariadb-common-10.5.9-2.el7.x86_64 2/5
検証中 : 3:rh-mariadb105-mariadb-libs-10.5.9-2.el7.x86_64 3/5
検証中 : jobarranger-server-mysql-6.0.0-1.el7.x86_64 4/5
検証中 : 3:rh-mariadb105-mariadb-config-10.5.9-2.el7.x86_64 5/5
インストール:
jobarranger-server-mysql.x86_64 0:6.0.0-1.el7
依存性関連をインストールしました:
rh-mariadb105-mariadb-common.x86_64 3:10.5.9-2.el7 rh-mariadb105-mariadb-config.x86_64 3:10.5.9-2.el7 rh-mariadb105-mariadb-libs.x86_64 3:10.5.9-2.el7
rh-mariadb105-runtime.x86_64 0:3.7-1.el7
完了しました!
初期データ登録
[root@atlas tmp]# ls -l /usr/share/doc/jobarranger-server-mysql-*.*.*/database/mysql
合計 76
-rwxr-xr-x 1 root root 68359 2月 25 14:31 MySQL_JA_CREATE_TABLE.sql
-rwxr-xr-x 1 root root 7328 2月 25 14:31 MySQL_JA_DROP_TABLE.sql
[root@atlas tmp]#
[root@atlas tmp]# cd /usr/share/doc/jobarranger-server-mysql-*.*.*/database/mysql
[root@atlas mysql]#
[root@atlas mysql]# mysql -u zabbix -p${password} zabbix < MySQL_JA_CREATE_TABLE.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
[root@atlas mysql]#
[root@atlas mysql]# cd /usr/share/doc/jobarranger-server-mysql-*.*.*/database/data
[root@atlas data]#
[root@atlas data]# ls -l
合計 16
-rwxr-xr-x 1 root root 15959 2月 25 14:31 JA_INSERT_TABLE.sql
[root@atlas data]#
[root@atlas data]# mysql -u zabbix -p${password} < JA_INSERT_TABLE.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
[root@atlas data]#
Configuration
[root@* ~]# diff -s /etc/jobarranger/jobarg_server.conf /etc/jobarranger/jobarg_server.conf~org
31c31
< DBName=zabbix
---
> DBName=
39c39
< DBUser=zabbix
---
> DBUser=
48c48
< DBPassword=****
---
> DBPassword=
[root@* ~]#
Configuration(monitor)
とりあえず早く動かしたいのでデフォルトのまま
自動起動設定
[root@* ~]# cat <<EOF > /etc/init.d/jobarg-server
> JOBARG=/usr/sbin/jobarg_server
> CONF=/etc/jobarranger/jobarg_server.conf
> PIDFILE= /var/run/jobarranger/jobarg_server.pid
> EOF
[root@* ~]#
[root@* ~]# cat /etc/init.d/jobarg-server
JOBARG=/usr/sbin/jobarg_server
CONF=/etc/jobarranger/jobarg_server.conf
PIDFILE= /var/run/jobarranger/jobarg_server.pid
[root@* ~]#
[root@* ~]# cat <<EOF > /etc/init.d/jobarg-monitor
> JOBARG=/usr/sbin/jobarg_monitor
> CONF=/etc/Jjobarranger/jobarg_monitor.conf
> PIDFILE= /var/run/jobarranger/jobarg_monitor.pid
> EOF
[root@* ~]# cat /etc/init.d/jobarg-monitor
JOBARG=/usr/sbin/jobarg_monitor
CONF=/etc/Jjobarranger/jobarg_monitor.conf
PIDFILE= /var/run/jobarranger/jobarg_monitor.pid
[root@* ~]#
[root@* ~]# systemctl start jobarg-server.service
Job for jobarg-server.service failed because the control process exited with error code. See "systemctl status jobarg-server.service" and "journalctl -xe" for details.
[root@* ~]#
手順通りのはずだが、起動せず
[root@* ~]# grep jobarg /var/log/messages* | tail
/var/log/messages:Aug 10 14:21:19 * systemd: jobarg-server.service holdoff time over, scheduling restart.
/var/log/messages:Aug 10 14:21:19 * jobarg_server: /usr/sbin/jobarg_server: error while loading shared libraries: libmariadb.so.3: cannot open shared object file: No such file or directory
/var/log/messages:Aug 10 14:21:19 * systemd: jobarg-server.service: control process exited, code=exited status=127
/var/log/messages:Aug 10 14:21:19 * systemd: Unit jobarg-server.service entered failed state.
/var/log/messages:Aug 10 14:21:19 * systemd: jobarg-server.service failed.
[root@* ~]#
「libmariadb.so.3」が無いせい?
[root@* ~]# find / -name libmariadb.so.3
/opt/rh/rh-mariadb105/root/usr/lib64/libmariadb.so.3
[root@* ~]#
findでは見つかった。yumでインストールされたっぽい
ls.so.confに追加
[root@* ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
[root@* ~]#
[root@* ~]# ls /etc/ld.so.conf.d/*conf
/etc/ld.so.conf.d/dyninst-x86_64.conf /etc/ld.so.conf.d/kernel-3.10.0-957.10.1.el7.x86_64.conf /etc/ld.so.conf.d/mysql-x86_64.conf
/etc/ld.so.conf.d/kernel-3.10.0-229.el7.x86_64.conf /etc/ld.so.conf.d/libiscsi-x86_64.conf
[root@* ~]#
[root@* ~]# more /etc/ld.so.conf.d/*conf
::::::::::::::
/etc/ld.so.conf.d/dyninst-x86_64.conf
::::::::::::::
/usr/lib64/dyninst
::::::::::::::
/etc/ld.so.conf.d/kernel-3.10.0-229.el7.x86_64.conf
::::::::::::::
# Placeholder file, no vDSO hwcap entries used in this kernel.
::::::::::::::
/etc/ld.so.conf.d/kernel-3.10.0-957.10.1.el7.x86_64.conf
::::::::::::::
# Placeholder file, no vDSO hwcap entries used in this kernel.
::::::::::::::
/etc/ld.so.conf.d/libiscsi-x86_64.conf
::::::::::::::
/usr/lib64/iscsi
::::::::::::::
/etc/ld.so.conf.d/mysql-x86_64.conf
::::::::::::::
/usr/lib64/mysql
[root@* ~]#
[root@* ~]# echo /opt/rh/rh-mariadb105/root/usr/lib64 >> /etc/ld.so.conf.d/rh-mariadb105.conf
[root@* ~]#
[root@* ~]# cat /etc/ld.so.conf.d/rh-mariadb105.conf
/opt/rh/rh-mariadb105/root/usr/lib64
[root@* ~]#
[root@* ~]# ldconfig # ld.so.confの変更を反映させる
[root@* ~]#
[root@* ~]# systemctl start jobarg-server.service
[root@* ~]#
[root@* ~]# systemctl status jobarg-server.service
● jobarg-server.service - Jobarranger Server
Loaded: loaded (/usr/lib/systemd/system/jobarg-server.service; disabled; vendor preset: disabled)
Active: active (running) since 水 2022-08-10 14:28:42 JST; 3s ago
Process: 14645 ExecStart=/usr/sbin/jobarg_server -c $CONFFILE (code=exited, status=0/SUCCESS)
Main PID: 14647 (jobarg_server)
Tasks: 13
CGroup: /system.slice/jobarg-server.service
tq14647 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14648 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14649 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14650 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14651 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14652 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14653 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14655 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14656 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14657 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14658 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
tq14659 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
mq14660 /usr/sbin/jobarg_server -c /etc/jobarranger/jobarg_server.conf
8月 10 14:28:42 ** systemd[1]: Starting Jobarranger Server...
8月 10 14:28:42 ** systemd[1]: Started Jobarranger Server.
[root@* ~]#
[root@* ~]# systemctl status jobarg-monitor.service
● jobarg-monitor.service - Jobarranger Monitor
Loaded: loaded (/usr/lib/systemd/system/jobarg-monitor.service; disabled; vendor preset: disabled)
Active: inactive (dead)
[root@* ~]#
[root@* ~]# systemctl start jobarg-monitor.service
[root@* ~]#
[root@* ~]#
[root@* ~]# systemctl status jobarg-monitor.service
● jobarg-monitor.service - Jobarranger Monitor
Loaded: loaded (/usr/lib/systemd/system/jobarg-monitor.service; disabled; vendor preset: disabled)
Active: active (running) since 水 2022-08-10 14:29:13 JST; 1s ago
Process: 14833 ExecStart=/usr/sbin/jobarg_monitor -c $CONFFILE (code=exited, status=0/SUCCESS)
Main PID: 14837 (jobarg_monitor)
Tasks: 2
CGroup: /system.slice/jobarg-monitor.service
tq14837 /usr/sbin/jobarg_monitor -c /etc/jobarranger/jobarg_monitor.conf
mq14838 /usr/sbin/jobarg_monitor -c /etc/jobarranger/jobarg_monitor.conf
8月 10 14:29:13 ** systemd[1]: Starting Jobarranger Monitor...
8月 10 14:29:13 ** systemd[1]: PID file /run/jobarranger/jobarg_monitor.pid not readable (yet?) after start.
8月 10 14:29:13 ** systemd[1]: Started Jobarranger Monitor.
[root@* ~]#
[root@* ~]#
[root@* ~]# systemctl enable jobarg-{server,monitor}
Created symlink from /etc/systemd/system/multi-user.target.wants/jobarg-server.service to /usr/lib/systemd/system/jobarg-server.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/jobarg-monitor.service to /usr/lib/systemd/system/jobarg-monitor.service.
[root@* ~]#
無事起動