Zabbix is an open source monitoring system. With Zabbix, you can configure monitoring of the platform server and location servers.
Main components of Zabbix:
- server — the component for managing network services, storing monitoring data, alerting the administrator about problems with equipment;
- agent — the software installed on the platform and location servers. The agent collects monitoring data and transmits it to the server.
Read more about Zabbix in the official documentation.
Installing Zabbix components
Server
Use a separate physical or virtual server for installation. If you are using VMmanager, you can create a virtual machine with the Zabbix server following this instruction.
The system requirements for the server depend on the number of devices to be monitored.
Read more about installation and system requirements in the official Zabbix documentation.
Agent
We recommend installing Zabbix agents with Ansible:
- Install Ansible following the instructions of the official documentation.
-
Create the Ansible script zabbix_agent.yml:
Script content - Replace "X.X.X.X" in the zabbix_agent.yml file with the IP address of the Zabbix server.
-
Add IP addresses of the platform server and location servers to the /etc/ansible/hosts file:
Example of configurationhost1 ansible_host=192.168.2.1 ansible_user=root host2 ansible_host=192.168.2.2 ansible_user=root host3 ansible_host=192.168.2.3 ansible_user=root
Comments -
Create an SSH key and copy the public part of the key to the platform and location servers:
Example of commandssh-keygen -t rsa -b 4096 && ssh-copy-id -i ~/.ssh/id_rsa.pub root@<IP>
Comments to the command -
Run the installation:
ansible-playbook zabbix_agent.yml
-
On the platform server and location servers, allow connections to port 10050/TCP for the Zabbix agent:
firewall-cmd --add-port=10050/tcp
Zabbix server configuration
Adding a template
To add a Zabbix template:
-
Create the file dci_template.yaml:
File content -
Create a token for authorization in the platform:
curl -s -X POST -H "accept: application/json" -H "Content-Type: application/json" -d '{"email": "admin@example.com", "password": "admin_pass"}' "https://dci6.example.com/auth/v4/public/token" -k
Comments to the commandSave the token value from the reply:
Example of reply{"id":"69","token":"69-a56c5bd9-ba6b-489e-a670-c452cbdd3b70"}
- In the Zabbix interface:
- Enter Configuration → Templates → Import.
- Upload the dci_template.yaml file and press Import:
- Enter Configuration → Hosts → Create host.
- Specify the settings:
- Host name — discretionary name for designation of the server in the Zabbix database; for example, DCI6.
- Visible name — discretionary name for display of the server in the Zabbix database.
- Template — select the Template DCImanager 6 template.
- Groups — select object groups for monitoring. For example, Discovered hosts, Linux servers, Templates/Operating systems.
- Interfaces — network interfaces. Press Add → Agent.
- IP address — IP address of the server with the platform.
- DNS name — DNS server name. Leave the default value empty.
- Connect to — connection type. Select IP.
- Port — connection port. Leave the default value — 10050.
- Description — discretionary comment.
- Monitored by proxy — proxy used. Select (no proxy).
- Go to the Macros tab and add macros:
- {$DCI_TOKEN} — token for authorization in the platform
- {$DCI_URL} — URL of the platform server in the format https://dci6.example.com where dci6.example.com is the domain name or IP address of the platform server.
- Press Add.
- Enter Configuration → Templates → Import.
Changing the update interval
By default, monitoring data from locations will be updated once a day. To change the update interval in the Zabbix interface:
- Enter Configuration → Templates → select the Template DCImanager 6 template → Discovery.
- In the list that opens, press Location discovery.
- Specify the interval value under Update interval.
- Press Update.
Creating the dashboard
The Zabbix dashboard is an information panel, where you can add the graphs you need.
Example of dashboard
To create a dashboard:
- Enter Monitoring → Dashboard → Create dashboard.
- Specify a discretionary dashboard name under Name.
- Press Apply.
- To add a graph to the dashboard: