Vih Murmann

Vinicius.murmann@unirede.net
1About me
Fifteen years of experience in IT area, specialist in opensource softwares
For more than ten years, he has been providing various training courses, including
Linux, PfSense®, Zabbix, Freebsd, Samba 4, Zimbra and ProxMox, among others.
Zabbix Certified Trainer

2How to collect data in a application level
using only frontend Zabbix features?

3

HTTP CHECKS
Before 4.0: you can use a user parameter with cURL commandcurl -s -X POST -H "Content-Type:application/json" -H "AuthToken:djA546Z@E"
https://$1/api/backups?pretty=true-d '{"status": "Failed"}'Starting from Zabbix 4.0:
you can use HTTP agent

4

HTTP CHECKS
Many applications are exposing their data via RESTful APIs
Allows data polling using HTTP/HTTPS protocol
Makes it easy to monitor applications and services
No agent is required

APIZabbix

5

Preprocessing
Preprocessing allows to define transformation rules forreceived values

One or several transformations are possible
All preprocessing is done by Zabbix serverMaster
item

Preprocessing

Dependent
items

Regularexpression

Dependent
Item 1MasterItemRegularexpression

Dependent
Item 2orRegular
expression

Dependent
Item 3

DBDependent ItemTo allow for bulk metric collection and simultaneous use in several related items, Zabbix supports
dependent items
The master item automatically populates the values of the dependent items
Zabbix preprocessing options can be used to extract the part that is needed for the dependent itemfrom the master item data
Only Zabbix server is processing dependent items

7

Discovery using dependent items
Master item data can be usedto discover entities (items, triggers, graphs)
to fill discovered items with values

Master item

Discovery data

Dependent LLD Rule
Dependent item prototype

Data entry
Data entry

Dependent item
management

Data entry
Data entry

Data values

Dependent items

Data entry

Item 1

Data entry

Item 2

Data entry

Item ...
8

scenario

Practical Scenario
The number of people to have died from Covid-19 in Brazil has passed
150,000.
Brazil has the second-highest coronavirus death toll in the world, after
the US, and the third-highest number of cases after the US and India.
The country also passed five million total infections earlier this week.

We are going to collect Brazillian Covid-19 statistics, using onlyZabbix frontend features9Brazillian Covid-19 statistics data collection using Zabbix
Source of Information
External public HTTP JSON Data
https://covid19-brazil-api.now.sh/api/report/v110

I divided the process in two Steps
Step 1 – Host called Brazil with a LLD Http agent template with a host prototype inside for the creation of the hosts
represents the information of each brazillian state.

Step 2 – The host created in the first step has a template with a dependent item low level discovery that get alldata from covid-19 for each host Brazilian state.

11Template states discovery
Http Agent item Low level discovery for the Brazilian State creation

12

Above the list of the hosts created.

Template COVID-19

13

Master http Agent Item
Master Item extracting data from http web site json format

14

Low level Discovery using dependente item
Master Item extracting data from http web site json format

15

Dependente Prototype item
Covid-19 information for each state16

Gelocalizantion Reference
Master item, and dependente item with preprocessing to colect thegeo localization, it will be use in world map Grafana plugin.

17

Lastest data
Follow the lastest data with a filter in the host Sao Paulo18

Final visualization with Grafana

19Thanks!

20