10:00 PM
32

Introduction

Soon I will start my internship and I received the question if I knew something about this topic. Since I do not have any experience with Zabbix I wanted to configure this server in my test lab. In this post I will configure a CentOS 6.6 machine as Zabbix Server to monitor some Windows machines. To make it even more interesting for myself I used Ansible to configure it all.

What is Zabbix?


Wikipedia: "Zabbix is an enterprise open source monitoring solution for networks and applications, created by Alexei Vladishev. It is designed to monitor and track the status of various network servicesservers, and other network hardware."

Used Tools


- CentOS 7 Workstation to configure Ansible playbook's.
- CentOS 6.6 Minimal for Zabbix Server
- Hyper-V running Windows Server's / Zabbix Server

Prepare Server to accept Ansible Playbooks



Configure Ansible and run the Playbook






After these steps Ansible should be able to talk to our configured servers. We can test this with a single ping. The command used for this is "ansible all -m ping", this command pings all the servers in the hosts file from the previous step.

Ansible can communicate with our other server.
Next we need to configure the path where our Ansible roles will be located. This file can be found here: "/etc/ansible/ansible.cfg".


Now we have defined the path, lets make the necessary folders and files for Zabbix.


Here we configure the right roles for our hosts.
Now we can create the other files and folders for Zabbix.

main.yml (task folder)



MariaDB.repo (template folder)



zabbix.conf (template folder)



zabbix_server.conf (template folder)



Running the playbook



Configure Zabbix

Now open your web browser and navigate to "http://<your server ip>/zabbix".








Add Windows host






Install agent on Windows machine








Start the service

Now the only thing we need to to is to configure the firewall to allow traffic on port 10050. I created the following rule for this. You might want to configure it more aggressive in a production environment.


Result


32 reacties:

  1. - name: Copy Zabbix PHP Config
    template:
    src=zabbix.conf.php
    dest= /etc/zabbix/web/zabbix.conf.php
    owner=apache
    group=apache
    mode=0644

    ... and you will save a few frontend installation UI clicks.

    ReplyDelete
  2. Hi,
    The playbook is working fine, but after installation I am not able to login to the zabbix login page getting invalid user id and password.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete

Note: Only a member of this blog may post a comment.