2016年05月10日

Zabbix配置使用


本文介绍zabbix的安装配置

zabbix相关资料

一. 安装部署

1. 获取源码


wget http://fossies.org/linux/misc/zabbix-2.4.7.tar.gz

数据库中创建zabbix用户和zabbix数据库

tar xvz zabbix-2.4.7.tar.gz

cd zabbix-2.4.7/database/mysql

mysql -uroot -pmysql zabbix < schema.sql

mysql -uroot -pmysql zabbix < images.sql

mysql -uroot -pmysql zabbix < data.sql

yum install -y mysql-devel net-snmp net-snmp-devel net-snmp-utils libcurl-devel php-gd php-mysql php-bcmath php-mbstring php-xm

yum install -y mrtg

yum install -y libcurl-devel

./configure --with-mysql --with-net-snmp --with-libcurl --enable-server --enable-agent --enable-proxy

make

sudo make install

vim /etc/services
zabbix-agent 10050/tcp # Zabbix Agent
zabbix-agent 10050/udp # Zabbix Agent
zabbix-trapper 10051/tcp # Zabbix Trapper
zabbix-trapper 10051/udp # Zabbix Trapper

mkdir -p /etc/zabbix

cp -r conf/* /etc/zabbix/

chown -R nginx:nginx /etc/zabbix

vim /etc/zabbix/zabbix_server.conf

LogFile=/tmp/zabbix_server.log

PidFile=/tmp/zabbix_server.pid

DBName=zabbix

DBUser=zabbix_user

DBPassword=123456     #指定zabbix数据库密码

ListenIP=192.168.10.197    #服务器IP地址


vim /etc/zabbix/zabbix_agentd.conf

PidFile=/tmp/zabbix_agentd.pid #进程PID

LogFile=/tmp/zabbix_agentd.log #日志保存位置

EnableRemoteCommands=1 #允许执行远程命令

Server=192.168.10.197 #agent端的ip

Hostname=client1 #必须与zabbix创建的host name相同

2. 相关文件

配置文件:
/usr/local/etc/zabbix_server.conf
/usr/local/etc/zabbix_agentd.conf

日志文件:
/tmp/zabbix_server.log
/tmp/zabbix_agentd.log

3. 启动服务

cp zabbix-2.4.7/misc/init.d/tru64/* /etc/init.d

service zabbix_server start
service zabbix_agent start

开机自启动

1. 复制 zabbix 源程序 misc/init.d/redhat 下的启动脚本到 /etc/init.d 目录下
cp /zabbix/zabbix-1.6.6/misc/init.d/redhat/zabbix_server_ctl /etc/init.d/zabbix_server
cp /zabbix/zabbix-1.6.6/misc/init.d/redhat/zabbix_agentd_ctl /etc/init.d/zabbix_agentd

2. 修改启动脚本使其支持 redhat 的 chkconfig,分别在两个脚本的 #!/bin/sh 后加入如下两行注释,注意要行前要加“#” 哦
# chkconfig: - 95 95
# description: Zabbix Server

3. Zabbix agentd修改启动脚本中 BASEDIR 和 ZABBIX_SUCKERD ,制定到 zabbix_server 和 zabbix_agentd 的安装位置,如:
BASEDIR=/usr/local/sbin
ZABBIX_SUCKERD=$BASEDIR/zabbix_server

4. Zabbix agentd使用 chkconfig 将其加入 init 的启动服务
chkconfig --add zabbix_server
chkconfig --add zabbix_agentd
chkconfig --level 345 zabbix_server on
chkconfig --level 345 zabbix_agentd on

4. 配置网站

cp -r zabbix-2.4.7/frontends/php /home/nginx/zabbix
chown -R nginx:nginx zabbix

vi php.ini
max_execution_time = 300
max_input_time = 300
memory_limit = 128M
post_max_size = 32M
date.timezone = Asia/Shanghai
mbstring.func_overload=2

nginx配置文件中增加zabbix配置

登录网站,进行相关配置。
默认的用户名为:admin,密码为:zabbix。

mkdir /var/lib/php/session
chown zabbix:zabbix /var/lib/php/session

5. 模板管理

http://www.ttlsa.com/zabbix/zabbix-linking-unlinking-templates/

6. 监控nginx

http://www.ttlsa.com/zabbix/zabbix-monitor-nginx-performance/

userparameter_nginx.conf

UserParameter=nginx_stats.active,/usr/bin/curl -s "http://127.0.0.1:18000/ngxstatus"|grep 'Active'|awk '{print $NF}'
UserParameter=nginx_stats.reading[*],/usr/bin/curl -s "http://127.0.0.1:18000/ngxstatus"|grep 'Reading'|cut -d ' ' -f2
UserParameter=nginx_stats.writing[*],/usr/bin/curl -s "http://127.0.0.1:18000/ngxstatus"|grep 'Writing'|cut -d ' ' -f4
UserParameter=nginx_stats.waiting[*],/usr/bin/curl -s "http://127.0.0.1:18000/ngxstatus"|grep 'Waiting'|cut -d ' ' -f6
UserParameter=nginx_stats.accepts[*],/usr/bin/curl -s "http://127.0.0.1:18000/ngxstatus"|awk NR==3|cut -d ' ' -f2
UserParameter=nginx_stats.handled[*],/usr/bin/curl -s "http://127.0.0.1:18000/ngxstatus"|awk NR==3|cut -d ' ' -f3
UserParameter=nginx_stats.requests[*],curl -s "http://127.0.0.1:18000/ngxstatus"|awk NR==3|cut -d ' ' -f4

7. 监控MySQL

1. 拷贝配置文件

cp zabbix-2.4.7/conf/userparameter_mysql.conf /usr/local/etc/zabbix_agentd.conf.d/

2. 修改zabbix_agentd.conf

/usr/local/etc/zabbix_agentd.conf中增加以下内容

Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/

3. 修改userparameter_mysql.conf

/usr/local/etc/.my.cnf

# Zabbix Agent
[mysql]
host=192.168.1.5
user=zabbix
password=zabbix123
# socket=/tmp/mysql.sock
[mysqladmin]
host=192.168.1.5
user=zabbix
password=zabbix123
#socket=/tmp/mysql.sock

HOME=/usr/local/etc/

4. 重启zabbix_agentd

5. 配置mysql

mysql -uroot -p123456 -e”GRANT USAGE ON . TO ‘zabbix’@’localhost’ IDENTIFIED BY ‘zabbix'”;

8. 监控redis

1. 创建配置文件

在/usr/local/etc/zabbix_agentd.conf.d/目录下创建userparameter_redis.conf文件,内容如下:

UserParameter=redis_stats[*],/usr/local/bin/redis-cli -h 127.0.0.1 -p 6379 info|grep $1|cut -d : -f2

2. 修改zabbix_agentd.conf

增加以下配置:

UnsafeUserParameters=1

3. 重启zabbix_agentd

service zabbix_agentd restart

4. 测试获取参数

zabbix_get -s 127.0.0.1 -k redis_stats[6379,total_connections_received]

4. 在管理网站配置相应参数

9. 通用配置方法

1. zabbix-agent的配置

在zabbix-agent的配置文件中配置UserParameter
例如:UserParameter=nginx.accepts,/home/nginx/zabbixshell/nginx_status accepts
包括两部分内容,参数名和获取参数的命令

2. 配置模板

在管理界面中创建模板
模板中可以包含多个item,item与UserParameter对应

3. 把模板关联到主机

4. 为主机创建graph

graph中可以对应多个item。

5. 使用xml文件配置模板

以下为一个redis监控模板示例

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
    <version>2.0</version>
    <date>2014-02-20T12:21:39Z</date>
    <groups>
        <group>
            <name>Templates</name>
        </group>
    </groups>
    <templates>
        <template>
            <template>Templates Redis_6379</template>
            <name>Templates Redis_6379</name>
            <groups>
                <group>
                    <name>Templates</name>
                </group>
            </groups>
            <applications>
                <application>
                    <name>Redis_6379</name>
                </application>
            </applications>
            <items>
                <item>
                    <name>Blocked clients_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,blocked_clients]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Connected clients_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,connected_clients]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Connected slave_6380</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,connected_slave]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Connection rate_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,total_connections_received]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>1</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Evicted_keys_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,evicted_keys]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Expired keys_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,expired_keys]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Last save time_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,last_save_time]</key>
                    <delay>60</delay>
                    <history>3</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units>unixtime</units>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>port status_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>net.tcp.listen[6379]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Request rate_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,total_commands_processed]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>1</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Role_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,role]</key>
                    <delay>60</delay>
                    <history>3</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>1</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Uptime in seconds_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,uptime_in_seconds]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units>uptime</units>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Used memory_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,used_memory:]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
                <item>
                    <name>Used_memory_rss_6379</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>redis_stats[6379,used_memory_rss]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>Redis_6379</name>
                        </application>
                    </applications>
                    <valuemap/>
                </item>
            </items>
            <discovery_rules/>
            <macros/>
            <templates/>
            <screens/>
        </template>
    </templates>
    <triggers>
        <trigger>
            <expression>{Templates Redis_6379:net.tcp.listen[6379].count(#3,0,&quot;eq&quot;)}=3</expression>
            <name>Redis port 6379 is not running</name>
            <url/>
            <status>0</status>
            <priority>4</priority>
            <description/>
            <type>0</type>
            <dependencies/>
        </trigger>
    </triggers>
    <graphs>
        <graph>
            <name>Redis key_6379</name>
            <width>900</width>
            <height>200</height>
            <yaxismin>0.0000</yaxismin>
            <yaxismax>100.0000</yaxismax>
            <show_work_period>1</show_work_period>
            <show_triggers>1</show_triggers>
            <type>0</type>
            <show_legend>1</show_legend>
            <show_3d>0</show_3d>
            <percent_left>0.0000</percent_left>
            <percent_right>0.0000</percent_right>
            <ymin_type_1>0</ymin_type_1>
            <ymax_type_1>0</ymax_type_1>
            <ymin_item_1>0</ymin_item_1>
            <ymax_item_1>0</ymax_item_1>
            <graph_items>
                <graph_item>
                    <sortorder>0</sortorder>
                    <drawtype>0</drawtype>
                    <color>C80000</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,evicted_keys]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>1</sortorder>
                    <drawtype>0</drawtype>
                    <color>00C800</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,expired_keys]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>Redis Last_save_time_6379</name>
            <width>900</width>
            <height>200</height>
            <yaxismin>0.0000</yaxismin>
            <yaxismax>100.0000</yaxismax>
            <show_work_period>1</show_work_period>
            <show_triggers>1</show_triggers>
            <type>0</type>
            <show_legend>1</show_legend>
            <show_3d>0</show_3d>
            <percent_left>0.0000</percent_left>
            <percent_right>0.0000</percent_right>
            <ymin_type_1>0</ymin_type_1>
            <ymax_type_1>0</ymax_type_1>
            <ymin_item_1>0</ymin_item_1>
            <ymax_item_1>0</ymax_item_1>
            <graph_items>
                <graph_item>
                    <sortorder>0</sortorder>
                    <drawtype>0</drawtype>
                    <color>C80000</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,last_save_time]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>Redis Port Connections_6379</name>
            <width>900</width>
            <height>200</height>
            <yaxismin>0.0000</yaxismin>
            <yaxismax>100.0000</yaxismax>
            <show_work_period>1</show_work_period>
            <show_triggers>0</show_triggers>
            <type>0</type>
            <show_legend>1</show_legend>
            <show_3d>0</show_3d>
            <percent_left>0.0000</percent_left>
            <percent_right>0.0000</percent_right>
            <ymin_type_1>0</ymin_type_1>
            <ymax_type_1>0</ymax_type_1>
            <ymin_item_1>0</ymin_item_1>
            <ymax_item_1>0</ymax_item_1>
            <graph_items>
                <graph_item>
                    <sortorder>0</sortorder>
                    <drawtype>0</drawtype>
                    <color>EE0000</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>4</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,blocked_clients]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>1</sortorder>
                    <drawtype>0</drawtype>
                    <color>BBBB00</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>4</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,total_connections_received]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>2</sortorder>
                    <drawtype>0</drawtype>
                    <color>CC00CC</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>4</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,total_commands_processed]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>3</sortorder>
                    <drawtype>0</drawtype>
                    <color>00CCCC</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>4</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,connected_slave]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>4</sortorder>
                    <drawtype>0</drawtype>
                    <color>009900</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>4</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,connected_clients]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>Redis Port status_6379</name>
            <width>900</width>
            <height>200</height>
            <yaxismin>0.0000</yaxismin>
            <yaxismax>100.0000</yaxismax>
            <show_work_period>1</show_work_period>
            <show_triggers>1</show_triggers>
            <type>0</type>
            <show_legend>1</show_legend>
            <show_3d>0</show_3d>
            <percent_left>0.0000</percent_left>
            <percent_right>0.0000</percent_right>
            <ymin_type_1>0</ymin_type_1>
            <ymax_type_1>0</ymax_type_1>
            <ymin_item_1>0</ymin_item_1>
            <ymax_item_1>0</ymax_item_1>
            <graph_items>
                <graph_item>
                    <sortorder>0</sortorder>
                    <drawtype>0</drawtype>
                    <color>C80000</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>net.tcp.listen[6379]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>Redis Uptime_in_seconds_6379</name>
            <width>900</width>
            <height>200</height>
            <yaxismin>0.0000</yaxismin>
            <yaxismax>100.0000</yaxismax>
            <show_work_period>1</show_work_period>
            <show_triggers>1</show_triggers>
            <type>0</type>
            <show_legend>1</show_legend>
            <show_3d>0</show_3d>
            <percent_left>0.0000</percent_left>
            <percent_right>0.0000</percent_right>
            <ymin_type_1>0</ymin_type_1>
            <ymax_type_1>0</ymax_type_1>
            <ymin_item_1>0</ymin_item_1>
            <ymax_item_1>0</ymax_item_1>
            <graph_items>
                <graph_item>
                    <sortorder>0</sortorder>
                    <drawtype>0</drawtype>
                    <color>C80000</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,uptime_in_seconds]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>Redis Used memory_6379</name>
            <width>900</width>
            <height>200</height>
            <yaxismin>0.0000</yaxismin>
            <yaxismax>100.0000</yaxismax>
            <show_work_period>1</show_work_period>
            <show_triggers>1</show_triggers>
            <type>0</type>
            <show_legend>1</show_legend>
            <show_3d>0</show_3d>
            <percent_left>0.0000</percent_left>
            <percent_right>0.0000</percent_right>
            <ymin_type_1>0</ymin_type_1>
            <ymax_type_1>0</ymax_type_1>
            <ymin_item_1>0</ymin_item_1>
            <ymax_item_1>0</ymax_item_1>
            <graph_items>
                <graph_item>
                    <sortorder>0</sortorder>
                    <drawtype>0</drawtype>
                    <color>C80000</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,used_memory:]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>1</sortorder>
                    <drawtype>0</drawtype>
                    <color>00C8C8</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Templates Redis_6379</host>
                        <key>redis_stats[6379,used_memory_rss]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
    </graphs>
</zabbix_export>