Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Introduction To Zabbix

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Definition:

Zabbix is an enterprise-class open source distributed monitoring tool to


monitor IT infrastructures such as networks, servers, virtual machines &
cloud services. Zabbix collects display basic metrics.

What is Zabbix used for?


Zabbix provides monitoring metrics, such as network utliization, CPU load &
disk space consumption.

Zabbix agent:
A zabbix agent, developed in C language may run on various supported
platforms, including linux, unix, macos, windows & collect data such as CPU,
memory, disk & network interface usage from a device.

Small Footprint & low resource:


Due to its small footprint, the agent can be run on devices with limited
resources. The monitoring configuratiojns are centrealized in zabbix server,
making it easier to manage the zabbix agent, which can use a single
configuration file on all servers.

Agent functions:
The following list of checks is supported by zabbix agent out of the box.

1. Network:
a. packets/bytes transferred
b. errors/ dropped packets
c. Collisions
2. Disk:
a. Space free/used
b. Read & write I/O
3. CPU:
a. Load average
b. CPU idle/usage
c. CPU utilization data per individual process
4. Service:
a. Process status
b. Process memory usage
c. Windows service status
d. DNS resolution
e. TCP connectivity
f. TCP response time
5. Memory:
a. Free /used memory
b. swap/pagefile utilization
6. File:
a. File size/time
b. File exists
c. Checksum
d. MD5 hash
e. RegExp search
7. Logs:
a. Text log
b. Windows eventlog
8. Other:
a. System uptime
b. System time
c. Users connected
d. Performance counter (windows)

Why Zabbix?
1. Metric collection
2. Problem detection
3. Alerting
4. Data visualization
5. Business monitoring
6. Integrations
7. Security
8. Deployment
9. Scalability

ZABBIX ARCHITECTURE:
It consist of several major software components, the responsibilities of which
are outlined below..
1. SERVER:
Zabbix server is the central component to which agents report
availability and integrity information & statistics. The server is the
central repository in which all configuration, statistical & operational
data are stored.

2. DATABASE:
All configuration information as well as the data gathered by Zabbix is
stored in database.

3. WEB INTERFACE:
For an easy access to Zabbix from anywhere and from any platform,
the web-based interface is provided. The interface is part of Zabbix
server.

4. PROXY:
Zabbix proxy can collect performance and availability data on behalf of
Zabbix server. A proxy is an optional part of Zabbix deployment;
however, it may be very beneficial to distribute the load of a single
Zabbix server.
5. Agent:
Zabbix agents are deployed on monitoring targets to actively monitor local resources and
applications and report the gathered data to Zabbix server. Since Zabbix 4.4, there are two
types of agents available: the Zabbix agent (lightweight, supported on many platforms, written
in C) and the Zabbix agent 2 (extra-flexible, easily extendable with plugins, written in Go).

6. Data flow:
In addition it is important to take a step back and have a look at the overall data flow within
Zabbix. In order to create an item that gathers data you must first create a host. Moving to the
other end of the Zabbix spectrum you must first have an item to create a trigger. You must
have a trigger to create an action. Thus if you want to receive an alert that your CPU load is too
high on Server X you must first create a host entry for Server X followed by an item for
monitoring its CPU, then a trigger which activates if the CPU is too high, followed by an action
which sends you an email. While that may seem like a lot of steps, with the use of templating it
really isn't. However, due to this design it is possible to create a very flexible setup.

Installation of Zabbix on Ubuntu:


1.
2.

3.

4.
5.

Actual POC For ZABBIX SERVER:

❖ Remember, Zabbix server only supports Linux OS, not compatible


wiGoto official website of ZABBIX (link:
https://www.zabbix.com/download )
❖ Install ZABBIX repository by adding these commands mentioned
below:
➢ wget
https://repo.zabbix.com/zabbix/6.4/ubuntu/pool/main/z/zabbix-release/z
abbix-release_6.4-1+ubuntu20.04_all.deb
➢ dpkg -i zabbix-release_6.4-1+ubuntu20.04_all.deb
➢ apt update
❖ Install Zabbix server, Frontend & Agent:
➢ apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf
zabbix-sql-scripts zabbix-agent -y
❖ Create Initial Databases:
➢ First we have to install MySQL server on ubuntu server:
■ apt-get install mysql-server -y
➢ Once you are done with MySQL installation, access the mysql using the
command:
■ sudo mysql
■ create database zabbix character set utf8mb4 collate
utf8mb4_bin;
■ create user zabbix@localhost identified by 'Admin@123#@!';
■ grant all privileges on zabbix.* to zabbix@localhost;
■ set global log_bin_trust_function_creators = 1;
■ Quit;
➢ Once you are done with the above configuration for MySQL, you have
to import initial schema & data. And also you have to add your mysql
password when ask.
■ zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql
--default-character-set=utf8mb4 -uzabbix -p zabbix
➢ Once you have executed the above command, again access MySQL CLI &
use this command:
■ set global log_bin_trust_function_creators = 0;
■ Quit;
❖ Configure the database for Zabbix server:
➢ Goto this directory & edit the file using nano editor:
■ nano -l /etc/zabbix/zabbix_server.conf
➢ In this file, search the DBPassword & change the database password
where you have given it before. I.e. DBPassword=password
❖ Start Zabbix server & agent processes:
➢ systemctl restart zabbix-server zabbix-agent apache2
➢ systemctl enable zabbix-server zabbix-agent apache2
❖ Open ZABBIX UI Web Page:
➢ Access the Zabbix UI dashboard through your localhost IP & add
/zabbix with IP. for e.g. http://localhost/zabbix
❖ Once UI accessed, configure the options. In configure DB connections, give
the database credentials that you have created & saved in both mysql tables
& zabbix server conf files.
❖ Give a proper zabbix server name & then click on Install.
❖ Once installation is completed. The bydefault credentials of zabbix is:
➢ Username: Admin
➢ Password: zabbix

Actual POC For ZABBIX Agent:


● Goto that server where you want that server or machine to be
monitored through zabbix server which we have installed it earlier on
linux ubuntu server
● Goto this link & download the zabbix agent
(https://www.zabbix.com/download_agents )

● Make sure if you are downloading zabbix agent for windows, then
select windows & rest options depending upon which version you have
installed.
● Once agent is downloaded, install the agent. Select the agent with
agent daemon, server & get.

● Give a hostname, zabbix server & server or proxy for active checks:
● Make sure that the zabbix agent should be in a running state. Verify it
by checking it through services.msc
● One more thing you have to do is to goto windows defender firewall
settings option.

● Make sure that the firewall should be on / enabled.


● Goto allow an app feature option that shows in left pane option of
defender.

● You have to first choose change settings option as an administrator,


after that goto Allow another app option
● It will show the path window where you have to browse the zabbix
folder.
● Add the agent setup file as a browse. Once done, goto Add option.
● Go back to the zabbix console, then goto Data collection section &
choose Hosts option & click on create host & give a proper name for
it.

● After creating host group, goto monitoring section & select hosts.
● Give a proper name, select the host group that you have made earlier,
give the IP of the server to be monitored.
● In templates options, click on select & choose Templates/Operating
Systems.
● In the interface option, add the option of Agent, give the IP of the
zabbix server where you have already installed before & save it.
● Once done adding the agent, goto monitoring section & click on hosts
to see the added hosts .

You might also like