Zabbix Server
Server Config
Make a backup of the default Zabbix config.
Add the Zabbix db pwd to the Zabbix config file. DO NOT create a sed command for this. The password would be in the bash history.
Agent Config
Make a backup of the Zabbix agent config.
Make the following changes to the zabbix_agentd.conf.
Verify the changes.
Timezone Updates
PHP runs as an isolated service when you use PHP-FPM. As PHP's publication is under the PHP licence, it is incompatible with GNU General Public License because of restrictions related to the PHP term.
Add the America/Chicago timezone to the Zabbix config.
SELinux
Config
There were a lot of SELinux problems getting Zabbix to work on Rocky. Use the following SELinux commands to help. See the referances section for more background.
Install SELinux aduit tool.
Create a directory to store the SELinux changes.
Write the following file:
Now convert the 'zabbix_server_add.te' into the policy module using the checkmodule command below.
Now compile the policy module 'zabbix_server_add.mod' using the semodule_package command.
Load the compiled policy module 'zabbix_server_add.pp' to the system.
The following is recommended by Zabbix in their more detailed instructions.
These SELinux change seem to be required as well.
This SELinux change is only required if the database is located on a different server than the Zabbix server.
- sudo setsebool -P httpd_can_network_connect_db on
Troubleshooting
If after the restart zabbix-server you see "Can't open PID file /run/zabbix/zabbix_server.pid (yet?) after start: No such file or directory." Run the following commands to verify the PID is the same on both files.
To verify which modules are installed:
To further troubleshoot denies, reference this log file.
Zabbix Web Interface
Config
Give the ol' girl another reboot.
- Go to the web interface: http://zab01.domain.local/zabbix. The default credentials are:
- Username: Admin
- Password: zabbix
- Verify all of the pre-reqs are met
- Click Next.
- Leave all of the settings default except for the database password. This includes the schema text box.
- Click Next.
- Change the name to: zab01
- Click Next.
- Verify all of the settings.
- Click Next.
- Click Finish.
User Settings
Preferances
- Log into Zabbix web interface.
- Navigate to: Administration.
- Go to General.
- On the top left of the window, use the pulldown to select: Gui
- For the Default theme, select: Dark.
- Click Update.
- On the top left of the window, use the pulldown to select: Other.
- For the "Default host inventory mode" change the selection to "Automatic" and click "Update."
Configure AD Authentication
At this point, the machine should already be joined to the domain.
- Log into Zabbix web interface.
- Navigate to: Administration > Authentication > LDAP Settings and use the following settings:
- Click Update.
- Navigate to: Administration > Authentication > Authentication. Use the following settings:
- Click Update.
- Navigate to: Administration > User Groups. Use the following settings:
domain_-_admins
domain_-_read-only
All Groups
All Groups
Read-write
Read
- Click Create User. Use the following settings:
- In order to change permissions:
- Click on the Select button
- Check the top left button (to select all items)
- Click Select
- Check Include subgroups
- Click the Read button
- Click Add
- Click Add.
- Navigate to: Administration > Users. Use the following settings:
syseng
svc-Zabbix-Admin
thammond
domain_-_admins
domain_-_admins
domain_-_read-only
Zabbix super user
Zabbix super user
Zabbix user
- Click Create User. Use the following settings:
- Click Add.
If change the default login type to LDAP and cannot login after these changes, look at the troubleshooting section of this guide for a walk-through on how to set the login back to Internal.
Configure Email Alerts
- Log into Zabbix web interface.
- Navigate to: Administration > Media types.
- Click on Email from the list.
- Click the clone button.
- Enter the following values:
- Click Add.
- Navigate to: Administration > Users. Use the following settings:
- Click on: svc-Zabbix-Admin.
- Click Add.
- Navigate to: Configuration > Actions.
- On the top left of the window, use the pulldown to select: "Trigger actions."
- Click on "Report problems to Zabbix administrators"
- Click the "Clone" button.
- Use the following settings for the Action Tab:
- Use the following settings for the Operations Tab:
- Click on "Step 1 Send message to..."
- Under Send to user groups, click "Remove" to the right of Zabbix Administrators
- Under Send to users, click the "Add" button and select: svc-Zabbix-Admin
- Leave everything else default.
- Click Update.
- Click Add.
Certificate
Creation
Certificate creation is out of the scope of this document.
Install
Make a backup of the SSL config file.
Upload the cert to /tmp.
Set the permissions.
Move the cert to its proper home.
Verify that "SSLEngine" is set to "on."
Add comments to the default values:
Insert the new values below the newly commented values.
Verify the changes.
Test the Apache config file for errors.
Restart services.