diff --git a/README.md b/README.md
index b75b26c..0ab58d5 100644
--- a/README.md
+++ b/README.md
@@ -60,6 +60,21 @@ FLUSH PRIVILEGES;
If you want change password, you need to edit files ```.my.cnf``` and also in file ```bin/ss_get_mysql_stats.php```.
+Template App MySQL Slave
+=====
+Monitoring for replication in MySQL 5.5, 5.6 and 5.7. Please run SQL query:
+```
+CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'ha7jqnlacwefrs';
+GRANT REPLICATION CLIENT, SELECT, PROCESS, SHOW DATABASES ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY 'ha7jqnlacwefrs';
+FLUSH PRIVILEGES;
+```
+
+If you want change password, you need to edit files ```.my.cnf```.
+
+Template App Nginx
+======
+Monitoring for Nginx. It is using script ```nginx-check.sh``` written by Vincent Viallet.
+
Template App Brocade HBA
======
Monitoring for Network Adapters - Brocade. Template is using Discovery to create Items and Triggers. You need also add SUDO for zabbix user: ```zabbix ALL=(ALL) NOPASSWD: /usr/bin/bcu```
diff --git a/bin/nginx-check.sh b/bin/nginx-check.sh
new file mode 100644
index 0000000..03a284d
--- /dev/null
+++ b/bin/nginx-check.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+##################################
+# Zabbix monitoring script
+#
+# nginx:
+# - anything available via nginx stub-status module
+#
+##################################
+# Contact:
+# vincent.viallet@gmail.com
+##################################
+# ChangeLog:
+# 20100922 VV initial creation
+##################################
+
+# Zabbix requested parameter
+ZBX_REQ_DATA="$1"
+ZBX_REQ_DATA_URL="$2"
+
+# Nginx defaults
+NGINX_STATUS_DEFAULT_URL="http://localhost:10061/nginx_status"
+WGET_BIN="/usr/bin/wget"
+
+#
+# Error handling:
+# - need to be displayable in Zabbix (avoid NOT_SUPPORTED)
+# - items need to be of type "float" (allow negative + float)
+#
+ERROR_NO_ACCESS_FILE="-0.9900"
+ERROR_NO_ACCESS="-0.9901"
+ERROR_WRONG_PARAM="-0.9902"
+ERROR_DATA="-0.9903" # either can not connect / bad host / bad port
+
+# Handle host and port if non-default
+if [ ! -z "$ZBX_REQ_DATA_URL" ]; then
+ URL="$ZBX_REQ_DATA_URL"
+else
+ URL="$NGINX_STATUS_DEFAULT_URL"
+fi
+
+# save the nginx stats in a variable for future parsing
+NGINX_STATS=$($WGET_BIN -q $URL -O - 2> /dev/null)
+
+# error during retrieve
+if [ $? -ne 0 -o -z "$NGINX_STATS" ]; then
+ echo $ERROR_DATA
+ exit 1
+fi
+
+#
+# Extract data from nginx stats
+#
+case $ZBX_REQ_DATA in
+ active_connections) echo "$NGINX_STATS" | head -1 | cut -f3 -d' ';;
+ accepted_connections) echo "$NGINX_STATS" | grep -Ev '[a-zA-Z]' | cut -f2 -d' ';;
+ handled_connections) echo "$NGINX_STATS" | grep -Ev '[a-zA-Z]' | cut -f3 -d' ';;
+ handled_requests) echo "$NGINX_STATS" | grep -Ev '[a-zA-Z]' | cut -f4 -d' ';;
+ reading) echo "$NGINX_STATS" | tail -1 | cut -f2 -d' ';;
+ writing) echo "$NGINX_STATS" | tail -1 | cut -f4 -d' ';;
+ waiting) echo "$NGINX_STATS" | tail -1 | cut -f6 -d' ';;
+ *) echo $ERROR_WRONG_PARAM; exit 1;;
+esac
+
+exit 0
\ No newline at end of file
diff --git a/templates/Template App MySQL Slave.xml b/templates/Template App MySQL Slave.xml
new file mode 100644
index 0000000..3e76312
--- /dev/null
+++ b/templates/Template App MySQL Slave.xml
@@ -0,0 +1,402 @@
+
+
+ 2.0
+ 2015-08-12T07:18:54Z
+
+
+ Templates
+
+
+
+
+ Template App MySQL Slave
+ Template App MySQL Slave
+
+
+
+ Templates
+
+
+
+
+ Slave Database
+
+
+
+ -
+ IO Running
+ 0
+
+ 0
+
+ repIOrun
+ 30
+ 30
+ 365
+ 0
+ 3
+ localhost
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Slave Database
+
+
+
+
+
+ -
+ Seconds Behind Master
+ 0
+
+ 0
+
+ repSBM
+ 30
+ 30
+ 365
+ 0
+ 3
+ localhost
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Slave Database
+
+
+
+
+
+ -
+ SQL Delay
+ 0
+
+ 0
+
+ repSQLDelay
+ 30
+ 30
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ A nonnegative integer indicating the number of seconds that the slave must lag the master.
+ 0
+
+
+ Slave Database
+
+
+
+
+
+ -
+ SQL Remaining Delay
+ 0
+
+ 0
+
+ repSQLRemDelay
+ 30
+ 30
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ When Slave_SQL_Running_State is Waiting until MASTER_DELAY seconds after master executed event, this field contains an integer indicating the number of seconds left of the delay. At other times, this field is NULL (0 in zabbix case).
+ 0
+
+
+ Slave Database
+
+
+
+
+
+ -
+ SQL Running
+ 0
+
+ 0
+
+ repSQLrun
+ 30
+ 30
+ 365
+ 0
+ 3
+ localhost
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Slave Database
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {Template App MySQL Slave:repIOrun.last(0)}=0
+ [MySQL] IO Thread is not running
+
+ 0
+ 3
+
+ 0
+
+
+
+ {Template App MySQL Slave:repSBM.last(0)}>1800
+ [MySQL] Slave is out of sync ({ITEM.LASTVALUE} seconds of delay)
+
+ 0
+ 2
+
+ 0
+
+
+
+ {Template App MySQL Slave:repSQLrun.last(0)}=0
+ [MySQL] SQL Thread is not running
+
+ 0
+ 3
+
+ 0
+
+
+
+
+
+ [MySQL] Replication Thread Status
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ 009900
+ 0
+ 7
+ 0
+ -
+ Template App MySQL Slave
+ repSQLrun
+
+
+
+ 1
+ 0
+ DD0000
+ 0
+ 7
+ 0
+ -
+ Template App MySQL Slave
+ repIOrun
+
+
+
+
+
+ [MySQL] Seconds Behind Master
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ 009900
+ 0
+ 7
+ 0
+ -
+ Template App MySQL Slave
+ repSBM
+
+
+
+
+
+ [MySQL] SQL Delay
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 5
+ 0000BB
+ 0
+ 2
+ 0
+ -
+ Template App MySQL Slave
+ repSQLDelay
+
+
+
+ 1
+ 5
+ AA00AA
+ 0
+ 2
+ 0
+ -
+ Template App MySQL Slave
+ repSQLRemDelay
+
+
+
+
+
+
diff --git a/templates/Template App Nginx.xml b/templates/Template App Nginx.xml
new file mode 100644
index 0000000..a38b543
--- /dev/null
+++ b/templates/Template App Nginx.xml
@@ -0,0 +1,568 @@
+
+
+ 2.0
+ 2015-08-12T07:20:46Z
+
+
+ Templates
+
+
+
+
+ Template App Nginx
+ Template App Nginx
+
+
+
+ Templates
+
+
+
+
+ Nginx
+
+
+
+ -
+ Nginx $1
+ 0
+
+ 0
+
+ nginx[waiting]
+ 60
+ 30
+ 365
+ 0
+ 0
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Nginx
+
+
+
+
+
+ -
+ Nginx $1
+ 0
+
+ 0
+
+ nginx[active_connections]
+ 60
+ 30
+ 365
+ 0
+ 0
+
+
+ 0
+
+
+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+ -
+ Number of $1 process
+ 0
+
+ 0
+
+ proc.num[nginx]
+ 60
+ 30
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Nginx
+
+
+
+
+
+
+
+
+
+ {$NGINX_STATUS_URL}
+ http://127.0.0.1:10061/nginx_status
+
+
+
+
+
+
+
+
+ {Template App Nginx:chkconfig[nginx].last(0)}=0
+ Nginx is not enabled in autostart
+
+ 0
+ 2
+
+ 0
+
+
+
+ {Template App Nginx:proc.num[nginx].last(0)}=0
+ Nginx is not running
+
+ 0
+ 4
+ Nginx is not running.
+
+ It has been stopped / shutdown or has crashed.
+ Check on the server for more details:
+ - w / last
+ - dmesg logs
+ - /var/log/messages
+ - nginx error logs
+ 0
+
+
+
+
+
+ Nginx - Connections and Requests status
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 1
+ FF9999
+ 0
+ 4
+ 0
+ -
+ Template App Nginx
+ nginx[accepted_connections]
+
+
+
+ 1
+ 2
+ 990000
+ 0
+ 4
+ 0
+ -
+ Template App Nginx
+ nginx[handled_connections]
+
+
+
+ 2
+ 0
+ 009900
+ 0
+ 4
+ 0
+ -
+ Template App Nginx
+ nginx[handled_requests]
+
+
+
+
+
+ Nginx - Threads status
+ 900
+ 200
+ 0.0000
+ 100.0000
+ 0
+ 0
+ 1
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 1
+ 990000
+ 0
+ 4
+ 0
+ -
+ Template App Nginx
+ nginx[writing]
+
+
+
+ 1
+ 1
+ 999900
+ 0
+ 4
+ 0
+ -
+ Template App Nginx
+ nginx[reading]
+
+
+
+ 2
+ 1
+ 009900
+ 0
+ 4
+ 0
+ -
+ Template App Nginx
+ nginx[waiting]
+
+
+
+
+
+
diff --git a/templates/Template_App_Amavisd.xml b/templates/Template_App_Amavisd.xml
deleted file mode 100644
index cc2a7a5..0000000
--- a/templates/Template_App_Amavisd.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
- 2.0
- 2015-08-12T06:52:13Z
-
-
- Templates
-
-
-
-
- Template App Amavisd
- Template App Amavisd
-
-
-
- Templates
-
-
-
-
- -
- Amavis service is running
- 0
-
- 0
-
- proc.num[amavisd]
- 90
- 7
- 365
- 0
- 3
-
-
- 0
-
-
- 0
- 0
-
- 0
-
- 1
-
-
-
- 0
- 0
-
-
-
-
-
-
- 0
-
-
- Service state
-
-
-
-
-
-
-
-
-
-
-
-
- {Template App Amavisd:proc.num[amavisd].last(0)}=0
- Service amavis is not running
-
- 0
- 3
-
- 0
-
-
-
-
diff --git a/zabbix_agentd.conf.d/mysql-slave.conf b/zabbix_agentd.conf.d/mysql-slave.conf
new file mode 100644
index 0000000..1ddb18c
--- /dev/null
+++ b/zabbix_agentd.conf.d/mysql-slave.conf
@@ -0,0 +1,3 @@
+UserParameter=repSBM,echo "show slave status\G;" | HOME=/etc/zabbix mysql | grep 'Seconds_Behind_Master' | awk '{print $2}'
+UserParameter=repIOrun,echo "show slave status\G;" | HOME=/etc/zabbix mysql | grep -c 'Slave_IO_Running: Yes'
+UserParameter=repSQLrun,echo "show slave status\G;" | HOME=/etc/zabbix mysql | grep -c 'Slave_SQL_Running: Yes'
\ No newline at end of file
diff --git a/zabbix_agentd.conf.d/nginx.conf b/zabbix_agentd.conf.d/nginx.conf
new file mode 100644
index 0000000..9a19d4f
--- /dev/null
+++ b/zabbix_agentd.conf.d/nginx.conf
@@ -0,0 +1 @@
+UserParameter=nginx[*],/etc/zabbix/bin/nginx-check.sh "$1" "$2"
\ No newline at end of file