Skip to content

Commit

Permalink
added zabbix 3 installation guide.
Browse files Browse the repository at this point in the history
TODO: remember to change links to the zabbix additional file/scripts currently linking to the juju-charm repo. Those files should be moved in the zabbix plugin folder
  • Loading branch information
gc4rella committed Feb 28, 2017
1 parent 049a744 commit 541a4f2
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 10 deletions.
5 changes: 3 additions & 2 deletions docs/nfvo-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ Please bare in mind that if the property is modified via APIs/dashboard, the cha

#### parameters related with the monitoring system

**MONITORING:** Open Baton allows the monitoring of the VMs on top of which the VNFs are executing via an external monitoring system. At the moment Zabbix is the monitoring system supported. If you want to enable it, you need first to install and configure Zabbix server following the guide at this page [Zabbix server configuration][zabbix-server-configuration].
**MONITORING:** Open Baton allows the monitoring of the VMs on top of which the VNFs are executing via an external monitoring system. At the moment Zabbix is the monitoring system supported.
If you want to enable it, you need first to install and configure Zabbix server following the guide at this page [Zabbix server configuration][zabbix-server-configuration-3.0].
Once the Zabbix server is correctly configured and running, you only need to add following property:

```properties
Expand Down Expand Up @@ -282,4 +283,4 @@ spring.rabbitmq.requested-heartbeat=60
[use-openbaton]:use.md
[dummy-NSR]:dummy-NSR.md
[reference-to-rabbit-site]:https://www.rabbitmq.com/
[zabbix-server-configuration]:zabbix-server-configuration.md
[zabbix-server-configuration-3.0]:zabbix-server-configuration-3.0.md
1 change: 0 additions & 1 deletion docs/nfvo-installation-deb.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ For specific configuration refer to the [configuration]
[dummy-NSR]:dummy-NSR.md
[reference-to-rabbit-site]:https://www.rabbitmq.com/
[reference-to-mysql]:https://www.mysql.com/
[zabbix-server-configuration]:zabbix-server-configuration.md

<!---
Script for open external links in a new tab
Expand Down
1 change: 0 additions & 1 deletion docs/nfvo-installation-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ sudo docker rm openbaton
[use-openbaton]:use.md
[dummy-NSR]:dummy-NSR.md
[reference-to-rabbit-site]:https://www.rabbitmq.com/
[zabbix-server-configuration]:zabbix-server-configuration.md
[reference-to-op-repo-on-public-docker-hub]:https://hub.docker.com/r/openbaton/standalone/tags/

<!---
Expand Down
1 change: 0 additions & 1 deletion docs/nfvo-installation-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ brew remove openbaton-nfvo
[use-openbaton]:use.md
[dummy-NSR]:dummy-NSR.md
[reference-to-rabbit-site]:https://www.rabbitmq.com/
[zabbix-server-configuration]:zabbix-server-configuration.md
[homebrew-website]:http://brew.sh
[rabbitmq-website]:https://www.rabbitmq.com
[nfvo-configuration]:nfvo-configuration.md
Expand Down
1 change: 0 additions & 1 deletion docs/nfvo-installation-src.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ For specific configuration refer to the [configuration]
[use-openbaton]:use.md
[reference-to-rabbit-site]:https://www.rabbitmq.com/
[reference-to-mysql]:https://www.mysql.com/
[zabbix-server-configuration]:zabbix-server-configuration.md
[bootstrap]:https://github.com/openbaton/bootstrap

<!---
Expand Down
1 change: 0 additions & 1 deletion docs/nfvo-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Once you have done with the installation, you can decide either to fine tune you
[use-openbaton]:use.md
[reference-to-rabbit-site]:https://www.rabbitmq.com/
[vagrant]: nfvo-installation-vagrant.md
[zabbix-server-configuration]:zabbix-server-configuration.md

<!---
Script for open external links in a new tab
Expand Down
5 changes: 3 additions & 2 deletions docs/zabbix-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Some of the benefits introduced by the usage of such plugin:

The prerequisites are:

- Zabbix server (2.2 or 3.0) installed and running. See [how to configure Zabbix server 2.2][zabbix-server-configuration].
- Zabbix server (2.2 or 3.0) installed and running. See [how to configure Zabbix server 2.2][zabbix-server-configuration-2.2] or [Zabbix server 3.0]zabbix-server-configuration-3.0].
- RabbitMQ server installed and running
- Git installed
- Gradle installed
Expand Down Expand Up @@ -401,4 +401,5 @@ it creates an alarm (mapping zabbix notification into standard Alarm) and notify
[openbaton-website]:http://openbaton.github.io
[custom-alertscripts]:https://www.zabbix.com/documentation/2.2/manual/config/notifications/media/script
[action-zabbix]:https://www.zabbix.com/documentation/2.2/manual/config/notifications/action
[zabbix-server-configuration]:zabbix-server-configuration.md
[zabbix-server-configuration-2.2]:zabbix-server-configuration-2.2.md
[zabbix-server-configuration-3.0]:zabbix-server-configuration-3.0.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Zabbix server installation and configuration
# Zabbix server (2.2) installation and configuration

## On Ubuntu 14.04

Expand Down
68 changes: 68 additions & 0 deletions docs/zabbix-server-configuration-3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Zabbix server 3.0 installation and configuration

## On Ubuntu 14.04

While performing the installation on the same host where the NFVO was installed, remember that both systems are heavily consuming CPU and Memory resources, therefore you'll need a powerful machine in order to have proper performances results.

During the installation the installer will request to put a password for the user root of the mysql server. You can choose the password you like (we'll refer from now on to this password as MYSQL_USER_PASSWORD_DEFAULT variable), however make sure you use the same password while configuring zabbix components later on.
```sh
sudo su
ZABBIX_PACKAGE="zabbix-release_3.0-1+trusty_all.deb"
ZABBIX_REPO="http://repo.zabbix.com/zabbix/3.0/ubuntu/pool/main/z/zabbix-release/${ZABBIX_PACKAGE}"
wget "${ZABBIX_REPO}"
dpkg -i "${ZABBIX_PACKAGE}"
rm "${ZABBIX_PACKAGE}"
apt-get update && apt-get -y install mysql-server zabbix-server-mysql zabbix-frontend-php
```

Once done, you should configure the file /etc/php5/apache2/php.ini file with the following commands:

```
# choose the timezone you prefer
sed -i 's/;date.timezone =/date.timezone = "Europe\/Berlin"/' /etc/php5/apache2/php.ini
sed -i 's/# DBPassword=/DBPassword=/' /etc/zabbix/zabbix_server.conf
wget https://raw.githubusercontent.com/openbaton/juju-charm/develop/hooks/zabbix.conf.php
cp zabbix.conf.php /etc/zabbix/web/zabbix.conf.php
rm zabbix.conf.php
```

Import all the related database tables:

```
export MYSQL_USER_PASSWORD_DEFAULT=<put-your-root-mysql-password-here>
mysql -uroot -e "create database zabbix character set utf8 collate utf8_bin;" -p"${MYSQL_USER_PASSWORD_DEFAULT}"
mysql -uroot -e "grant all privileges on zabbix.* to zabbix@localhost identified by '';" -p"${MYSQL_USER_PASSWORD_DEFAULT}"
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uroot -p"${MYSQL_USER_PASSWORD_DEFAULT}" zabbix
```

Restart services and you are almost done:

```sh
service apache2 reload
service zabbix-server restart
```

At this point the Zabbix frontend should be available at http://your-ip/zabbix in the browser. Default username/password is Admin/zabbix. It will pop up a wizard window which will guide you through the final configuration of the server.

Additionally, you need to configure the auto registration action so that VNFs hosts are added automatically into zabbix db when they are started.
For doing it you can either do it via the zabbix dashboard reachable at http://your-ip/zabbix/actionconf.php or using the provided python script. Follow the below guidelines to understand this process.

## Configure the auto registration using the provided helper script

In order to facilitate the configuration of the Zabbix Server, we also provide a zbx_helper.py script which executes all actions in once.
You should run the following command into the host:

```sh
wget https://raw.githubusercontent.com/openbaton/juju-charm/develop/hooks/zbx_helper.py
# modify any parameters like Zabbix username and password in the main function at the bottom of the script and execute the following:
python zbx_helper.py -a
```

After that, the zabbix server is ready to monitor your VNFs!


[zabbix-create-action-1]:images/zabbix-add-action-1.png
[zabbix-create-action-2]:images/zabbix-add-action-2.png
[zabbix-create-action-3]:images/zabbix-add-action-3.png


0 comments on commit 541a4f2

Please sign in to comment.