Zabbix

Installing Zabbix Agent

This section walks you through installing and configuring the Zabbix Agent on CentOS and RHEL-based Linux systems so that SearchBlox can be monitored through the Zabbix monitoring platform. The Zabbix Agent runs on the SearchBlox server and sends performance and availability data back to the Zabbix Server for tracking and alerting. Follow the steps below in order to complete the installation and configuration.

Step 1 – Add Required Repository

Configure the Zabbix yum repository using the following commands:
Centos 7

# Add Zabbix 4.0 LTS repository
sudo rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

Ubuntu 18.04

# Add Zabbix 3.2 repository
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
sudo dpkg -i zabbix-release_3.2-1+xenial_all.deb

Step 2 – Install Zabbix Agent

Centos7

  yum install -y zabbix-agent

Ubuntu

apt-get install zabbix-agent -y

Step 3 – Edit Zabbix Agent Configuration

Configure zabbix agent by adding zabbix server IP in its configuration file/etc/zabbix/zabbixagentd.conf
_vi /etc/zabbix/zabbix_agentd.conf

#Server=[zabbix server ip]
#Hostname=[ Hostname of client system ]
Server=104.131.113.198
Hostname=Zabbix Server

Step 4 – Restarting Zabbix Agent

Restart agent service using the following commands.
systemctl enable zabbix-agent
systemctl start Zabbix-agent

To start and stop zabbix-agent service anytime, use the following commands.
systemctl start zabbix-agent
systemctl stop zabbix-agent

🚧

Port#10050 should be allowed in your Firewall (iptables, firewalld)

Adding JMX Monitoring to Zabbix

Step 1 – Enable jmx in jetty configuration

Open start.ini in searchblox directory (Eg: /opt/searchblox )
In line 48

-Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.ssl=false
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.port=1099

Then restart the SearchBlox service: # service searchblox restart

Confirm that it is listening using netstat –nutlp

netstat -nutpl | grep 1099
tcp6       0      0 :::1099                 :::*                    LISTEN      10419/java

Step 2 – Adding JMX monitoring in Zabbix

In Zabbix, go to Configuration -> Hosts

Adding the host into zabbix server

  1. Hostname:
  2. Visible Name: <give some name(optional) >
  3. Groups : <Template/Application>
  4. Agent Interface : and Port no is 10050
  5. JMX insterface : and port no 1099
  6. And click add to complete the host creation

Step 3 - Select the custom Template

  1. click Template
  2. click Link new template
  3. select the Template for SearchBlox
  4. click Select

Step 4 - Creating the Application:

  1. Click Configuration
  2. Click Hosts
  3. Select Application Group :<application Template>
  4. Select Host: <select created host>
  5. Click Create Application

  1. Name: <Searchblox>
  2. Click Add option.

Step 5 – Creating Web Scenario

  1. Click Configuration
  2. Click Hosts
  3. Click Web scenarios
  4. Click Scenarios
  5. Name: <give some meaning full name>
  6. Application: <select the application Name>
  7. Click Update

  1. Click Steps
  2. Name : <application name>
  3. URL: <application url>
  4. Click Follow Redirection
    Note: status code should be 200
  5. Click Add button

Step 6 – Monitoring

  1. Click Monitoring
  2. Click Web
  3. Select the server

Go to Monitoring -> Latest data