Configuring Zabbix for Endpoint Monitoring on an Endpoint

February 21, 2025by Dhawal

In this blog post, I’ll walk you through the steps to set up Zabbix for endpoint monitoring. Zabbix is an open-source monitoring solution that helps in tracking network and application performance, and it’s ideal for monitoring endpoint servers. We’ll be hosting it inside an AWS EC2 instance, configuring the installation, and then setting up monitoring alerts, including sending notifications to Microsoft Teams.

Prerequisites:

Before we start, ensure you have the following:

  • An AWS account with permissions to create EC2 instances.
  • A Microsoft Teams account set up to receive alerts.
  • Basic understanding of Linux (Ubuntu/Debian) and AWS services.
Step 1: Launch an EC2 Instance
  1. Log in to your AWS account and navigate to the EC2 dashboard.
  2. Click “Launch Instance” and choose an Ubuntu AMI (Amazon Machine Image) for simplicity.
  3. Select the Instance Type (e.g., t3.medium for testing).
  4. Configure the network and security group settings. Ensure the instance has a public IP and appropriate security group rules allowing traffic on ports 22 (SSH), 80 (HTTP), and 10050 (Zabbix agent port).
  5. Launch the EC2 instance and download the SSH key pair.
Step 2: Install Zabbix Server

For the full steps on installing Zabbix, I recommend following the official Zabbix documentation, which provides the latest, detailed instructions for installation on your preferred platform.

The Zabbix documentation provides easy-to-follow steps for setting up both the Zabbix server and frontend on a variety of systems, including Ubuntu and EC2.

Step 3: Configure Zabbix for Endpoint Monitoring

Once Zabbix is installed, you can start configuring it for endpoint monitoring:

  1. Add hosts (endpoints) that you want to monitor. In Zabbix, navigate to Configuration > Hosts and click on Create Host.
    • Enter the endpoint’s name and define its IP address.
    • Choose the appropriate templates to monitor services (e.g., “Template OS Linux” for a Linux endpoint)
    1. Create a Web Scenario to Monitor Websites:
    • Go to Configuration > Hosts and select the host you wish to monitor.
    • Under Data collection > Web, click on Create Web Scenario.
    • Define the URL of the website or web application endpoint you want to monitor.
    • Add more details, like the authentication and expected response.

    Here is a screenshot of the web scenario configuration:

    • Create a Web Scenario to Monitor Websites:
    • Go to Configuration > Hosts and select the host you wish to monitor.
    • Under Data collection > Web, click on Create Web Scenario.
    • Define the URL of the website or web application endpoint you want to monitor.
    • Add more details, like the authentication and expected response.

    Here is a screenshot of the web scenario configuration:

Step 4: Set Up Alerts Media for MS Teams

To receive notifications when an endpoint goes down or has issues, we need to configure Zabbix alerts.

  1. Create a Media Type for MS Teams:
    • Navigate to Administration > Media Types in Zabbix.
    • Select Create Media Type and choose Webhook as the media type.
    • Paste the MS Teams webhook endpoint URL (which you can get by creating an incoming webhook in Teams) into the appropriate field.

Here’s how you can get the MS Teams webhook endpoint:

    • Go to Microsoft Teams.
    • Select your channel, click More Options > Connectors > Incoming Webhook.
    • Copy the Webhook URL provided.

Step 5: Create a Trigger Action for Alerts

Next, you need to set up an Action in Zabbix that triggers alerts when an endpoint is down.

  1. Create a Trigger Action:
    • Go to Configuration > Actions in Zabbix.
    • Create a new Action under Trigger Actions.
    • Under Operation, add a new operation to Send message to users. This will trigger the notification to your MS Teams channel when the endpoint goes down.
Step 6: Monitor Endpoint Downtime and Receive Alerts

Once the monitoring and alerting are configured, Zabbix will notify you when the endpoint goes down and when it comes back up.

  1. When the website endpoint goes down, Zabbix will display it as a problem in the dashboard.

 

The alert message will be sent to your Microsoft Teams channel indicating the downtime.

When the endpoint is back online, Zabbix will send another message to the Teams channel stating that the endpoint is up again.

 

Conclusion:

With Zabbix set up for endpoint monitoring, you can now effectively track the health and availability of your websites and endpoints. The integration with Microsoft Teams ensures you are promptly notified of any downtime or issues, allowing you to take immediate action. By following these steps, you can achieve proactive monitoring and ensure high availability for your critical services.