Contents
- Open Source Integrated Monitoring Software "MIRACLE ZBX"
- 1. Register dnf repository for MIRACLE ZBX 7.0
- 2. Configure firewall for MIRACLE ZBX
- 3. Installation of MIRACLE ZBX Server and Web Front End
- 4. Monitor the MIRACLE ZBX server itself
- 5. Run the MIRACLE ZBX Web Installer
- 6. Various settings for MIRACLE ZBX
- 7.Confirmation of MIRACLE ZBX startup
- 8. Add monitored hosts
- 9.Add items to be monitored
Open Source Integrated Monitoring Software "MIRACLE ZBX"
MIRACLE ZBX, enterprise-oriented integrated system monitoring software based on the open source Zabbix, with enhancements and modifications provided by Cybertrust. It implements security enhancements that comply with some requirements of the National Institute of Standards and Technology (NIST) security guidelines "NIST SP800-171" and "NIST SP800-53", which are becoming an international standard for security standards.
SELinux must be set to permissive (enable if SELinux is disabled)
1 2 3 4 5 6 |
# setenforce 0 && sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config # cat /etc/selinux/config | grep SELINUX= # SELINUX= can take one of these three values: # NOTE: In earlier Fedora kernel builds, SELINUX=disabled would also SELINUX=permissive |
1. Register dnf repository for MIRACLE ZBX 7.0
Install Repository
1 |
# dnf install https://ftp.miraclelinux.com/zbx/7.0/miracle-zbx-release-7.0-1.noarch.rpm |
2. Configure firewall for MIRACLE ZBX
The ports used by MIRACLE ZBX components are as follows
MIRACLE ZBX Web Front End : 80/tcp
MIRACLE ZBX Agent/Agent 2 : 10050/tcp
MIRACLE ZBX Server/Proxy : 10051/tcp
MIRACLE ZBX Java Gateway : 10052/tcp
This time, only "MIRACLE ZBX Web Front End", "MIRACLE ZBX Agent2" and "MIRACLE ZBX Server" will be installed, so allow the following ports.
1 2 |
# firewall-cmd --add-port={80,10050,10051,10052,10053}/tcp --permanent # firewall-cmd --reload |
3. Installation of MIRACLE ZBX Server and Web Front End
The installation environment is as follows
Apache/2.4.57
Mysql Ver 8.0.36
PHP 8.0.30 (cli)
PHP 8.0.30 (fpm-fcgi)
①Install MIRACLE ZBX package for MariaDB/MySQL
1 |
# dnf install miracle-zbx-server-mysql miracle-zbx-sql-scripts |
②Create database and users for MIRACLE ZBX server
Create database schema for Zabbix server.
Login to the MySQL server as root account and create a MySQL database (e.g. zabbix), user (e.g. zabbix) and password (e.g. ?Wabcd123).
1 2 3 4 5 6 7 |
# mysql -u root -p Password: > create database zabbix character set utf8mb4 collate utf8mb4_bin; > create user zabbix@localhost identified by '?Wabcd123'; > grant all privileges on zabbix.* to zabbix@localhost; > set global log_bin_trust_function_creators = ON; > exit; |
③Import initial data from MIRACLE ZBX
Import the initial database schema and data from MIRACLE ZBX into the newly created database.
1 2 |
# zcat /usr/share/miracle-zbx-sql-scripts/mysql/create.sql.gz | mysql zabbix -uzabbix -p Entter password ←Password for user zabbix |
④Edit MIRACLE ZBX server configuration file
Edit the MIRACLE ZBX server configuration file and update the database settings in order for the MIRACLE ZBX server to connect to the database
1 2 3 |
# vi /etc/zabbix/zabbix_server.conf Line 141 : Uncomment and fill in password DBPassword=[password of user zabbix when creating database] |
⑤Start service zabbix-server
1 2 |
# systemctl enable --now zabbix-server # systemctl start zabbix-server |
⑥Install packages for web front-end and Apache (if using MySQL/MariaDB)
1 |
# dnf install miracle-zbx-web miracle-zbx-web-mysql miracle-zbx-web-japanese miracle-zbx-apache-conf miracle-zbx-web-deps |
⑦Start httpd and php-fpm
1 2 |
# systemctl enable --now httpd php-fpm # systemctl restart --now httpd php-fpm |
4. Monitor the MIRACLE ZBX server itself
①Install MIRACLE ZBX Agent 2 package on this server to monitor the server itself
1 |
# dnf install miracle-zbx-agent2 |
➁Start zabbix-agent2
1 2 3 |
# systemctl enable --now zabbix-agent2 Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-agent2.service → /usr/lib/systemd/system/zabbix-agent2.service. # systemctl start zabbix-agent2 |
5. Run the MIRACLE ZBX Web Installer
MIRACLE ZBX Web Installer can be accessed via "server IP/zabbix" or "domain/zabbix".
Open a web browser and enter "http: //[your-server-IP_Address]/zabbix".
The following screen will appear. Click [Next step].
![](https://korodes.com/wp-content/uploads/2024/07/22a6c6e3daa9bc5ecb752727cc57cea3.jpg)
After confirming that all requirements are OK, click [ Next step]
Enter the information you have set in the "Database name", "User", and "Password" fields, and click [ Next step ].
![](https://korodes.com/wp-content/uploads/2024/07/4eabb9a4569f86483fa579787783a3cf.jpg)
Enter any name for "Zabbix server names" and select Asia/Tokyo for time zone.
After confirming that you are in your own time zone, click [ Next step ].
![](https://korodes.com/wp-content/uploads/2024/07/5f70c9cd1af56357e7934fb17ce8231d.jpg)
Reconfirm settings If information is correct, click [Next step]
When the installation is successfully completed, the following page will appear. Click [Finish]
You will be redirected to Zabbix login page
"Sign in" using the following credentials。
Username: Admin
Password: zabbix
![](https://korodes.com/wp-content/uploads/2024/07/b42dd112974402121292ad720e06f38d.jpg)
After successful login you will see the following screen (Zabbix Dashboard).
![](https://korodes.com/wp-content/uploads/2024/07/345065952b5513968b15638f3bb91c83.jpg)
6. Various settings for MIRACLE ZBX
6.1 Change Admin Password
Change the default administrator password for security purposes.
Also, set the administrator's email address.
Once the above dashboard is displayed
①Select [Users] - [Users] in the left pane and click [Admin] in the right pane
![](https://korodes.com/wp-content/uploads/2024/07/3a2ea590c0e855039b7e2f16f201aa58.jpg)
②Click [Change paddword]
③Enter "zabbix" in Current password field, enter the password you want to change twice and click [Update]
Click "OK" when the following screen appears
![](https://korodes.com/wp-content/uploads/2024/07/283ee96eb6eaa79156f422bab41c48a2.jpg)
④Redirected to the login screen again.
User name: Admin
Password: Changed password
Enter
![](https://korodes.com/wp-content/uploads/2024/07/366d0a0425679531c7c0f9d3e980928f.jpg)
6.2Email notification settings
Set up notifications so that you can receive various information, etc. by e-mail.
It is assumed that an SMTP server such as postfix is installed on the server.
①When the dashboard appears, select "Alerts" - "Media Types" in the left pane and click "Email" in the right pane.
![](https://korodes.com/wp-content/uploads/2024/07/70ed76c93c2c0b7fd0762eebd2af34e4.jpg)
➁Configure the mail server settings as shown below, check the [Enabled] checkbox, and click the [Update] button.
![](https://korodes.com/wp-content/uploads/2024/07/9fe93f9a5fa9138d8429236ac58ef125.jpg)
➂[Email] becomes [Enabled]
④Select [Users] - [Users] in the left pane and click [Admin] in the right pane
![](https://korodes.com/wp-content/uploads/2024/07/5b24095d86752fc617fc4b2650efa857.jpg)
⑤Go to the "Media" tab and click [Add]
⑥Select "Email" for "Type," enter the administrator's email address in the "Send to" field, and click [Add]
⑦Click the "Update" button.
![](https://korodes.com/wp-content/uploads/2024/07/f7e6ab44e10aaaf1cf29c7201202e4b6.jpg)
⑧In the left pane, click [Alerts] - [Actions] - [Trigger actions]
⑨In the right pane, click on [Report problems to Zabbix administrators]
⑩Check [Enabled] and click [Update] button.
Various failure notifications are then sent to the email address you set.
![](https://korodes.com/wp-content/uploads/2024/07/b2913959f25d825e22d81cd906aaa27e.jpg)
7.Confirmation of MIRACLE ZBX startup
①Clicking on [Monitoring] [Hosts] in the left pane currently shows only [Zabbix server]
➁Click on "Zabbix server" and then on "Graphs" to see the basic monitoring status of Zabbix server itself, as shown in the figure below
![](https://korodes.com/wp-content/uploads/2024/07/df1530cc5accc5ac36f26198987d2465.jpg)
![](https://korodes.com/wp-content/uploads/2024/07/e47be43664e11264b47dd2a4efdf18e5.jpg)
![](https://korodes.com/wp-content/uploads/2024/07/95684c7432351a669039f52c19cfea02.jpg)
![](https://korodes.com/wp-content/uploads/2024/07/47d6fa168b1b5b81cff6db615bd1cbf4.jpg)
8. Add monitored hosts
8.1.Configuration on the server you want to monitor
Added the following servers as targets
OS : Ubuntu22.04
IP Address : 192.168.11.200
Host name : Lion
①Registering an apt repository
Register apt repository for MIRACLE ZBX 7.0
1 |
# curl -fsSL https://ftp.miraclelinux.com/pub/zbx/RPM-GPG-KEY-MIRACLE-4096 | gpg --dearmor -o /etc/apt/keyrings/miracle-zbx.gpg |
Add MIRACLE ZBX repository file to /etc/apt/sources.list.d
Create /etc/apt/sources.list.d/miracle-zbx.list with the following contents
1 2 3 |
# vi /etc/apt/sources.list.d/miracle-zbx.list deb [arch=amd64 signed-by=/etc/apt/keyrings/miracle-zbx.gpg] https://ftp.miraclelinux.com/pub/zbx/7.0/ubuntu/amd64 jammy main |
Update repository and install MIRACLE ZBX agent package
1 |
# apt update |
➁ Install MIRACLE ZBX Agent 2 on the server you want to monitor
1 |
# apt install miracle-zbx-agent2 |
➂Edit configuration file /etc/zabbix/zabbix_agent2.conf
1 2 3 4 5 6 7 8 |
# vi /etc/zabbix/zabbix_agent2.conf # Line 84 : Specify Zabbix server (in this case 192.168.11.83) Server=192.168.11.83 # Line 137 : Specify Zabbix server (in this case 192.168.11.83) ServerActive=192.168.11.83 # Line 148 : Change to your own host name (Lion in this case) Hostname=Lion |
1 2 |
# systemctl enable zabbix-agent2 # systemctl restart zabbix-agent2 |
④Configure firewall on Zabbix-agent side
Zabbix ports 10050 (on Zabbix server side) and 10051 (on zabbix agent side) must be allowed.
1 2 |
# ufw allow 10050:10051/tcp # ufw reload |
8.2. Configuration in Zabbix WEB UI
Log in to the Zabbix administration site, select [Datacollection] - [Hosts] in the left pane and click the [Create Host] button at the top of the right pane.
![](https://korodes.com/wp-content/uploads/2024/07/65d723b9b66c8cbc13165a179ffc0651.jpg)
Enter a hostname in the [Hostname] field (in this case, Lion).
For [Templates], click the [Select] button, click the [Select] button next to [Template group], and then click [Templates/Operating systems].
![](https://korodes.com/wp-content/uploads/2024/07/b7c946eec45cb1ce68af12e3efde8d2f.jpg)
Select [Linux by Zabbix agent] from the list of monitoring templates if you want to monitor general items such as CPU on Linux OS, and click [Select] button.
![](https://korodes.com/wp-content/uploads/2024/07/2eb0a72c3a79d290fb25503a2ee48839.jpg)
Click the [Select] button under [Host groups], select [Linux servers], and click the [Select] button.
![](https://korodes.com/wp-content/uploads/2024/07/38cb44fae3a3c7fc09944ad1b3ecdab4.jpg)
In [Interfaces], click [Add] under Interfaces, select [Agent], enter the IP address to be monitored, and then click [Add] at the bottom.
![](https://korodes.com/wp-content/uploads/2024/07/f8472e937007fc7d057194b29f82ba55.jpg)
![](https://korodes.com/wp-content/uploads/2024/07/256e597d83ee22d90b88fe56d8c2eec9.jpg)
New monitored servers are registered.
![](https://korodes.com/wp-content/uploads/2024/07/500e53ed607b3da6a99456f7c3e2cd09.jpg)
Click [Monitoring][Hostd][Lion] in the left pane and select [Graphs].
After a while, the data of the added target hosts will be displayed.
![](https://korodes.com/wp-content/uploads/2024/07/f7202588cdc6e75835688552761a28d5.jpg)
![](https://korodes.com/wp-content/uploads/2024/07/a0e5137fe0fde789a8b4ad34e0e0a745.jpg)
![](https://korodes.com/wp-content/uploads/2024/07/564261ac21453659b08107915eb73133.jpg)
9.Add items to be monitored
This time we will add Apache httpd service on Zabbix server to be monitored
① Enable server-status in Apache httpd on monitored Zabbix server
1 2 3 4 5 6 7 |
Create New # vi /etc/httpd/conf.d/server-status.conf <Location /server-status> SetHandler server-status Require local </Location> |
1 |
# systemctl reload httpd |
➁Log in to Zabbix administration site, in the left pane click on [Data collection] - [Hosts], in the right pane click on the host you want to add monitoring items for (in this case Zabbix server)
![](https://korodes.com/wp-content/uploads/2024/07/8d83ee35d248bbfe8f4f1a2705a56272.jpg)
➂Click the [Select] button in the [Templates] section, then click the [Select] button again.
![](https://korodes.com/wp-content/uploads/2024/07/40efc6ad06e3c1ca4a02d530cf895daf.jpg)
④Click on [Templates/Applications]
⑤Select [Apache by HTTP], then [Select]
⑥Click [Update] button to update settings
![画像に alt 属性が指定されていません。ファイル名: 19e0737b75f7a5d0519a423e59e9de64.jpg](https://korodes.com/wp-content/uploads/2024/07/e81dead8546abf10bc297d92aeb8229a.jpeg)
⑦Click the [Apache by HTTP] link.
![](https://korodes.com/wp-content/uploads/2024/07/3863c765b2fddc5326a27b72d632d737.jpg)
⑧Open the [Macros] tab, enter [127.0.0.1] in {$APACHE.STATUS.HOST} and [Update]
After a while, data will be displayed as shown in the figure below.
![](https://korodes.com/wp-content/uploads/2024/07/59bf4e03c919a38609f872aaffb49a17.jpg)
![](https://korodes.com/wp-content/uploads/2024/07/b9b300a6c613ada6a06bdd4e6da3f819.jpg)