Configuring Alerts for a Particular Host Group
Home > Zabbix > Configuring Alerts for a Particular Host Group
NOTE: Before configuring alerts, the host group should be present and must contain some hosts with Zabbix agents installed on them.
Configuring Media Type
If you are already using a media type, you can use the same. Otherwise, you can create a media type exclusively to send emails to external domains (for example, Gmail, Outlook).
- Login as Admin to Zabbix web UI
- Navigate to Alerts > Media Types
- Select Create Media Type
- Provide the following details:
Name: <name> Type: Email Email provider: Generic SMTP SMTP server: <server IP or Domain> SMTP server port: <port> Email: <email> Authentication: Username and Password Username: <username> Password: <password> Message format: Plain Text
- After creating the new media type, click on Test, which is on the far right
- Test the new media type by providing the required details (Send to, Subject, etc.)
- If the test is successful, you will see the Media type test successful. prompt
User Group Permission
To send alerts to a particular user, the user must be created and a media type must be assigned. The user must also be part of a user group.
To give host permissions to a user group, follow the steps below:
- Navigate to Users > User Groups
- Select the Group where the user is present
- Select Host permissions tab
- In the Permissions section, add the required host group and click Update to finalize the changes
Trigger Actions
- Navigate to Alerts > Actions > Trigger Actions
- Select Create Action
- Provide the following details:
Name: <name>
Type of calculation: And/Or
Conditions:
condition1: Trigger severity is greater than or equals Average
Condition2: Host group equals <host group>
- Navigate to Operations tab
- in Operations section, select Add
- The Operation details box opens, Select the Send to users and Send to media type as per requirement.
- In Recovery options Click Add and select Notify all involved and click OK
- click on OK/Update to finalize the changes
Testing the Alerts
To test the alerts, create a test host in the host group. After a few minutes, the test host will generate an error stating Zabbix agent is not available. Follow the steps below to verify whether the alert is sent:
- Navigate to Reports > Action log
- Select Last 5 Minutes on the top right corner to view the logs easily
- View the action logs, the logs should contain the correct recipient and message.