zabbix监控netscaler9/10模板

zabbix监控Netscaler采用snmp方式,所以需要在监控主机中定义宏{$SNMP_COMMUNITY}

模板如下:

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
    <version>2.0</version>
    <date>2016-04-21T08:37:25Z</date>
    <groups>
        <group>
            <name>Templates</name>
        </group>
    </groups>
    <templates>
        <template>
            <template>Template_NetScaler_9</template>
            <name>Template_NetScaler_9</name>
            <description/>
            <groups>
                <group>
                    <name>Templates</name>
                </group>
            </groups>
            <applications>
                <application>
                    <name>NetScaler_interfaces</name>
                </application>
                <application>
                    <name>NetScaler_main</name>
                </application>
                <application>
                    <name>NetScaler_services</name>
                </application>
                <application>
                    <name>NetScaler_vservers</name>
                </application>
            </applications>
            <items>
                <item>
                    <name>haPeerState</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.23.3.0</snmp_oid>
                    <key>haPeerState.ns</key>
                    <delay>600</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>httpTot11Requests</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.48.68.0</snmp_oid>
                    <key>httpTot11Requests</key>
                    <delay>60</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>1</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>httpTot11Responses</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.48.69.0</snmp_oid>
                    <key>httpTot11Responses</key>
                    <delay>60</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>1</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>httpTotRequests</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.48.67.0</snmp_oid>
                    <key>httpTotRequests</key>
                    <delay>60</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>1</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>memSizeMB</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.41.4.0</snmp_oid>
                    <key>memSizeMB</key>
                    <delay>3600</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units>Mb</units>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>numCPUs</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.41.3.0</snmp_oid>
                    <key>numCPUs</key>
                    <delay>3600</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>resCpuUsage</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.41.1.0</snmp_oid>
                    <key>resCpuUsage</key>
                    <delay>60</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units>%</units>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>resMemUsage</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.41.2.0</snmp_oid>
                    <key>resMemUsage.ns</key>
                    <delay>60</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units>%</units>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>tcpActiveServerConn</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.46.8.0</snmp_oid>
                    <key>tcpActiveServerConn</key>
                    <delay>60</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>tcpCurClientConn</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.46.2.0</snmp_oid>
                    <key>tcpCurClientConn.ns</key>
                    <delay>60</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>tcpCurServerConn</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>0</multiplier>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.46.1.0</snmp_oid>
                    <key>tcpCurServerConn.ns</key>
                    <delay>60</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>UpTime</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <multiplier>1</multiplier>
                    <snmp_oid>.1.3.6.1.2.1.1.3.0</snmp_oid>
                    <key>sysUpTime</key>
                    <delay>600</delay>
                    <history>60</history>
                    <trends>180</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units>uptime</units>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <formula>0.01</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>NetScaler_main</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
            </items>
            <discovery_rules>
                <discovery_rule>
                    <name>Interfaces</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.54.1.1</snmp_oid>
                    <key>snmp.interfaces.discovery</key>
                    <delay>60</delay>
                    <status>0</status>
                    <allowed_hosts/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port>161</port>
                    <filter>
                        <evaltype>0</evaltype>
                        <formula/>
                        <conditions/>
                    </filter>
                    <lifetime>30</lifetime>
                    <description/>
                    <item_prototypes>
                        <item_prototype>
                            <name>Interface {#SNMPVALUE} received bits</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.54.1.19.{#SNMPINDEX}</snmp_oid>
                            <key>r_bits.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>Mbps</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_interfaces</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Interface {#SNMPVALUE} received bytes</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.54.1.3.{#SNMPINDEX}</snmp_oid>
                            <key>r_bytes.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>bps</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_interfaces</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Interface {#SNMPVALUE} received packets</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.54.1.5.{#SNMPINDEX}</snmp_oid>
                            <key>r_pks.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>1</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>pps</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_interfaces</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Interface {#SNMPVALUE} transmitted bits</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.54.1.20.{#SNMPINDEX}</snmp_oid>
                            <key>t_bits.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>Mbps</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_interfaces</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Interface {#SNMPVALUE} transmitted bytes</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.54.1.7.{#SNMPINDEX}</snmp_oid>
                            <key>t_bytes.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>bps</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_interfaces</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Interface {#SNMPVALUE} transmitted packets</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.54.1.9.{#SNMPINDEX}</snmp_oid>
                            <key>t_pks.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>1</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>pps</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_interfaces</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Interface {#SNMPVALUE} type</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.1.54.1.2.{#SNMPINDEX}</snmp_oid>
                            <key>type.[{#SNMPVALUE}]</key>
                            <delay>3600</delay>
                            <history>30</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>1</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_interfaces</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                    </item_prototypes>
                    <trigger_prototypes/>
                    <graph_prototypes>
                        <graph_prototype>
                            <name>Interface {#SNMPVALUE} bits</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>0000C8</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>r_bits.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                                <graph_item>
                                    <sortorder>1</sortorder>
                                    <drawtype>0</drawtype>
                                    <color>C800C8</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>t_bits.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                            </graph_items>
                        </graph_prototype>
                        <graph_prototype>
                            <name>Interface {#SNMPVALUE} bytes</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>1</drawtype>
                                    <color>00CC00</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>r_bytes.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                                <graph_item>
                                    <sortorder>1</sortorder>
                                    <drawtype>2</drawtype>
                                    <color>0000CC</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>t_bytes.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                            </graph_items>
                        </graph_prototype>
                        <graph_prototype>
                            <name>Interface {#SNMPVALUE} packets</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>1</drawtype>
                                    <color>00CC00</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>r_pks.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                                <graph_item>
                                    <sortorder>1</sortorder>
                                    <drawtype>2</drawtype>
                                    <color>0000CC</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>t_pks.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                            </graph_items>
                        </graph_prototype>
                    </graph_prototypes>
                    <host_prototypes/>
                </discovery_rule>
                <discovery_rule>
                    <name>Services</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.1</snmp_oid>
                    <key>snmp.services.discovery</key>
                    <delay>60</delay>
                    <status>0</status>
                    <allowed_hosts/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port>161</port>
                    <filter>
                        <evaltype>0</evaltype>
                        <formula/>
                        <conditions/>
                    </filter>
                    <lifetime>30</lifetime>
                    <description/>
                    <item_prototypes>
                        <item_prototype>
                            <name>Service {#SNMPVALUE} Act conn</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.9.{#SNMPINDEX}</snmp_oid>
                            <key>service.actconn.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_services</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Service {#SNMPVALUE} Est conn</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.8.{#SNMPINDEX}</snmp_oid>
                            <key>service.estconn.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_services</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Service {#SNMPVALUE} IP</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.2.{#SNMPINDEX}</snmp_oid>
                            <key>service.ip.[{#SNMPVALUE}]</key>
                            <delay>3600</delay>
                            <history>30</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>1</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_services</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Service {#SNMPVALUE} port</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.3.{#SNMPINDEX}</snmp_oid>
                            <key>service.port.[{#SNMPVALUE}]</key>
                            <delay>3600</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_services</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Service {#SNMPVALUE} Total recvd pkts</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.34.{#SNMPINDEX}</snmp_oid>
                            <key>service.totresvdpkts.[{#SNMPVALUE}]</key>
                            <delay>120</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>1</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>pps</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_services</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Service {#SNMPVALUE} Total req</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.30.{#SNMPINDEX}</snmp_oid>
                            <key>service.totreq.[{#SNMPVALUE}]</key>
                            <delay>120</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_services</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Service {#SNMPVALUE} Total req bytes</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.31.{#SNMPINDEX}</snmp_oid>
                            <key>service.totreqb.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>bps</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_services</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Service {#SNMPVALUE} Total resp</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.32.{#SNMPINDEX}</snmp_oid>
                            <key>service.totresp.[{#SNMPVALUE}]</key>
                            <delay>120</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_services</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Service {#SNMPVALUE} Total resp bytes</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.33.{#SNMPINDEX}</snmp_oid>
                            <key>service.totrespb.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>bps</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_services</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Service {#SNMPVALUE} Total sent pkts</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.2.1.1.35.{#SNMPINDEX}</snmp_oid>
                            <key>service.totrsentpkts.[{#SNMPVALUE}]</key>
                            <delay>120</delay>
                            <history>30</history>
                            <trends>180</trends>
                            <status>1</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>pps</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_services</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                    </item_prototypes>
                    <trigger_prototypes/>
                    <graph_prototypes>
                        <graph_prototype>
                            <name>Service {#SNMPVALUE} bytes</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>1</drawtype>
                                    <color>00CC00</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>service.totreqb.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                                <graph_item>
                                    <sortorder>1</sortorder>
                                    <drawtype>2</drawtype>
                                    <color>0000BB</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>service.totrespb.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                            </graph_items>
                        </graph_prototype>
                        <graph_prototype>
                            <name>Service {#SNMPVALUE} packets</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>1</drawtype>
                                    <color>00BB00</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>service.totresvdpkts.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                                <graph_item>
                                    <sortorder>1</sortorder>
                                    <drawtype>2</drawtype>
                                    <color>0000BB</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>service.totrsentpkts.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                            </graph_items>
                        </graph_prototype>
                        <graph_prototype>
                            <name>Service {#SNMPVALUE} Requests - Responses</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>00BB00</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>service.totreq.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                                <graph_item>
                                    <sortorder>1</sortorder>
                                    <drawtype>0</drawtype>
                                    <color>0000CC</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>service.totresp.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                            </graph_items>
                        </graph_prototype>
                    </graph_prototypes>
                    <host_prototypes/>
                </discovery_rule>
                <discovery_rule>
                    <name>Vservers</name>
                    <type>4</type>
                    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                    <snmp_oid>.1.3.6.1.4.1.5951.4.1.3.1.1.1</snmp_oid>
                    <key>snmp.vservers.discovery</key>
                    <delay>60</delay>
                    <status>0</status>
                    <allowed_hosts/>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port>161</port>
                    <filter>
                        <evaltype>0</evaltype>
                        <formula/>
                        <conditions/>
                    </filter>
                    <lifetime>30</lifetime>
                    <description/>
                    <item_prototypes>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE}</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.3.1.1.1.{#SNMPINDEX}</snmp_oid>
                            <key>name.[{#SNMPVALUE}]</key>
                            <delay>3600</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>1</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} Client Conn</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.3.1.1.7.{#SNMPINDEX}</snmp_oid>
                            <key>cl_conn.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} IP</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.3.1.1.2.{#SNMPINDEX}</snmp_oid>
                            <key>ip.[{#SNMPVALUE}]</key>
                            <delay>3600</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>1</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} port</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.3.1.1.3.{#SNMPINDEX}</snmp_oid>
                            <key>port.[{#SNMPVALUE}]</key>
                            <delay>3600</delay>
                            <history>90</history>
                            <trends>180</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} Server Conn</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.3.1.1.8.{#SNMPINDEX}</snmp_oid>
                            <key>sr_conn.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} Total Requests</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.3.1.1.30.{#SNMPINDEX}</snmp_oid>
                            <key>req_tot.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} Total Respones</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>.1.3.6.1.4.1.5951.4.1.3.1.1.32.{#SNMPINDEX}</snmp_oid>
                            <key>res_tot.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} vsvrHealth</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>1.3.6.1.4.1.5951.4.1.3.1.1.62.{#SNMPINDEX}</snmp_oid>
                            <key>vsvr_Health.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>1</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>%</units>
                            <delta>0</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} vsvrRequestRate</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>1.3.6.1.4.1.5951.4.1.3.1.1.43.{#SNMPINDEX}</snmp_oid>
                            <key>vsvrRequest_Rate.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units/>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} vsvrRxBytesRate</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>1.3.6.1.4.1.5951.4.1.3.1.1.44.{#SNMPINDEX}</snmp_oid>
                            <key>vsvrRxBytesRate.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>B/s</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} vsvrTotalRequestBytes</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>1.3.6.1.4.1.5951.4.1.3.1.1.31.{#SNMPINDEX}</snmp_oid>
                            <key>vsvrTotalRequestBytes.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>B/s</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} vsvrTotalResponseBytes</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>1.3.6.1.4.1.5951.4.1.3.1.1.33.{#SNMPINDEX}</snmp_oid>
                            <key>vsvrTotalResponseBytes.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>B/s</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                        <item_prototype>
                            <name>Vserver {#SNMPVALUE} vsvrTxBytesRate</name>
                            <type>4</type>
                            <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
                            <multiplier>0</multiplier>
                            <snmp_oid>1.3.6.1.4.1.5951.4.1.3.1.1.45.{#SNMPINDEX}</snmp_oid>
                            <key>vsvrTxBytesRate.[{#SNMPVALUE}]</key>
                            <delay>60</delay>
                            <history>90</history>
                            <trends>365</trends>
                            <status>0</status>
                            <value_type>3</value_type>
                            <allowed_hosts/>
                            <units>B/s</units>
                            <delta>1</delta>
                            <snmpv3_contextname/>
                            <snmpv3_securityname/>
                            <snmpv3_securitylevel>0</snmpv3_securitylevel>
                            <snmpv3_authprotocol>0</snmpv3_authprotocol>
                            <snmpv3_authpassphrase/>
                            <snmpv3_privprotocol>0</snmpv3_privprotocol>
                            <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>NetScaler_vservers</name>
                                </application>
                            </applications>
                            <valuemap/>
                            <logtimefmt/>
                        </item_prototype>
                    </item_prototypes>
                    <trigger_prototypes/>
                    <graph_prototypes>
                        <graph_prototype>
                            <name>Vserver {#SNMPVALUE} requests and responses</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>Template_NetScaler_9</host>
                                        <key>req_tot.[{#SNMPVALUE}]</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>Template_NetScaler_9</host>
                                        <key>cl_conn.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                                <graph_item>
                                    <sortorder>2</sortorder>
                                    <drawtype>0</drawtype>
                                    <color>0000C8</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>sr_conn.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                                <graph_item>
                                    <sortorder>3</sortorder>
                                    <drawtype>0</drawtype>
                                    <color>FFFF33</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>res_tot.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                            </graph_items>
                        </graph_prototype>
                        <graph_prototype>
                            <name>Vserver {#SNMPVALUE} requests and responses Bytes</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>00C8C8</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>vsvrTotalRequestBytes.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                                <graph_item>
                                    <sortorder>1</sortorder>
                                    <drawtype>0</drawtype>
                                    <color>C8C800</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>vsvrTotalResponseBytes.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                            </graph_items>
                        </graph_prototype>
                        <graph_prototype>
                            <name>Vserver {#SNMPVALUE} vsvr Tx  Rx Bytes Rate</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>0000C8</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>vsvrRxBytesRate.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                                <graph_item>
                                    <sortorder>1</sortorder>
                                    <drawtype>0</drawtype>
                                    <color>C800C8</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>vsvrTxBytesRate.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                            </graph_items>
                        </graph_prototype>
                        <graph_prototype>
                            <name>vsvrHealth {#SNMPVALUE} 百分比</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>00C800</color>
                                    <yaxisside>0</yaxisside>
                                    <calc_fnc>2</calc_fnc>
                                    <type>0</type>
                                    <item>
                                        <host>Template_NetScaler_9</host>
                                        <key>vsvr_Health.[{#SNMPVALUE}]</key>
                                    </item>
                                </graph_item>
                            </graph_items>
                        </graph_prototype>
                    </graph_prototypes>
                    <host_prototypes/>
                </discovery_rule>
            </discovery_rules>
            <macros>
                <macro>
                    <macro>{$SNMP_COMMUNITY}</macro>
                    <value>public</value>
                </macro>
            </macros>
            <templates/>
            <screens/>
        </template>
    </templates>
    <triggers>
        <trigger>
            <expression>{Template_NetScaler_9:sysUpTime.change(0)}&lt;0</expression>
            <name>{HOST.NAME} has just been restarted</name>
            <url/>
            <status>0</status>
            <priority>4</priority>
            <description/>
            <type>0</type>
            <dependencies/>
        </trigger>
    </triggers>
    <graphs>
        <graph>
            <name>NetScaler Connection</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>Template_NetScaler_9</host>
                        <key>tcpActiveServerConn</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>Template_NetScaler_9</host>
                        <key>tcpCurClientConn.ns</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>2</sortorder>
                    <drawtype>0</drawtype>
                    <color>0000C8</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template_NetScaler_9</host>
                        <key>tcpCurServerConn.ns</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>NetScaler CPU Usage</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>1</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>00C800</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template_NetScaler_9</host>
                        <key>resCpuUsage</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>NetScaler Memory Usage</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>1</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>00BB00</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template_NetScaler_9</host>
                        <key>resMemUsage.ns</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
        <graph>
            <name>NetScaler Requests</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>1</sortorder>
                    <drawtype>0</drawtype>
                    <color>0000CC</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template_NetScaler_9</host>
                        <key>httpTot11Requests</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>2</sortorder>
                    <drawtype>0</drawtype>
                    <color>00C800</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template_NetScaler_9</host>
                        <key>httpTot11Responses</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>0</sortorder>
                    <drawtype>2</drawtype>
                    <color>CC0000</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template_NetScaler_9</host>
                        <key>httpTotRequests</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
    </graphs>
</zabbix_export>

Zabbix监控ntp时间

zabbix监控时间服务

[root@localhost htdocs]# cd /etc/zabbix/
[root@localhost zabbix]# ls
scripts  zabbix_agentd.conf  zabbix_agentd.conf.bak  zabbix_agentd.conf.rpmnew  zabbix_agentd.d
[root@localhost zabbix]# cd scripts/
[root@localhost scripts]# ls
ntpcheck.sh
[root@localhost scripts]# cat ntpcheck.sh 
#!/bin/bash
VERSION="1.0"
function usage()
{
        echo "ntpcheck version: $VERSION"
        echo "usage:"
        echo " $0 jitter - Check ntp jitter delay"
        echo " $0 offset - Check ntp offset"
        echo " $0 delay - Check ntp delay"
} ########
# Main #
########
if [[ $# != 1 ]];then
        #No Parameter
        usage
        exit 0
fi

case "$1" in
'jitter')
        value=`ntpq -pn 127.0.0.1 | /usr/bin/awk 'BEGIN { jitter=0 } $1 ~/\*/ { jitter=$10 } END { print jitter }'`
        rval=$?;;
'offset')
        value=`ntpq -pn 127.0.0.1 | /usr/bin/awk 'BEGIN { offset=0 } $1 ~/\*/ { offset=$9 } END { print offset }'`
        rval=$?;;
'delay')
        value=`ntpq -pn 127.0.0.1 | /usr/bin/awk 'BEGIN { delay=0 } $1 ~/\*/ { delay=$8 } END { print delay }'`
        rval=$?;;
*)
        usage
        exit 1;;
esac
if [ "$rval" -eq 0 -a -z "$value" ]; then
        rval=1
fi

if [ "$rval" -ne 0 ]; then
        echo "ZBX_NOTSUPPORTED"
fi

echo $value

[root@localhost scripts]# cd ../
[root@localhost zabbix]# ls
scripts  zabbix_agentd.conf  zabbix_agentd.conf.bak  zabbix_agentd.conf.rpmnew  zabbix_agentd.d
[root@localhost zabbix]# cd zabbix_agentd.d/
[root@localhost zabbix_agentd.d]# ls
userparameter_mysql.conf userparameter_ntpd.conf
[root@localhost zabbix_agentd.d]# cat userparameter_ntpd.conf 
UserParameter=ntp[*],/etc/zabbix/scripts/ntpcheck.sh $1
[root@localhost zabbix_agentd.d]#

ntp模板


<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
    <version>3.0</version>
    <date>2016-07-01T08:53:17Z</date>
    <groups>
        <group>
            <name>Templates</name>
        </group>
    </groups>
    <templates>
        <template>
            <template>Template App NTP Service</template>
            <name>Template App NTP Service</name>
            <description/>
            <groups>
                <group>
                    <name>Templates</name>
                </group>
            </groups>
            <applications>
                <application>
                    <name>NTP service</name>
                </application>
            </applications>
            <items>
                <item>
                    <name>NTP RUN</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>net.udp.listen[123]</key>
                    <delay>30</delay>
                    <history>90</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NTP service</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>NTP service is running</name>
                    <type>3</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>net.udp.service[ntp]</key>
                    <delay>60</delay>
                    <history>7</history>
                    <trends>365</trends>
                    <status>1</status>
                    <value_type>3</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NTP service</name>
                        </application>
                    </applications>
                    <valuemap>
                        <name>Service state</name>
                    </valuemap>
                    <logtimefmt/>
                </item>
                <item>
                    <name>NTP-delay</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>ntp[delay]</key>
                    <delay>30</delay>
                    <history>90</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>0</value_type>
                    <allowed_hosts/>
                    <units>ms</units>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NTP service</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>NTP-jitter</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>ntp[jitter]</key>
                    <delay>30</delay>
                    <history>90</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>0</value_type>
                    <allowed_hosts/>
                    <units>ms</units>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NTP service</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
                <item>
                    <name>NTP-offset</name>
                    <type>0</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>ntp[offset]</key>
                    <delay>30</delay>
                    <history>90</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>0</value_type>
                    <allowed_hosts/>
                    <units>ms</units>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <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>NTP service</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
            </items>
            <discovery_rules/>
            <macros/>
            <templates/>
            <screens/>
        </template>
    </templates>
    <triggers>
        <trigger>
            <expression>{Template App NTP Service:net.udp.listen[123].max(#3)}=0</expression>
            <name>NTP service is down on {HOST.NAME}</name>
            <url/>
            <status>0</status>
            <priority>3</priority>
            <description/>
            <type>0</type>
            <dependencies/>
        </trigger>
        <trigger>
            <expression>{Template App NTP Service:ntp[offset].last(30)}&gt;10</expression>
            <name>时钟误差10毫秒 {HOST.NAME}</name>
            <url/>
            <status>0</status>
            <priority>3</priority>
            <description/>
            <type>0</type>
            <dependencies/>
        </trigger>
    </triggers>
    <graphs>
        <graph>
            <name>NTP-Detail</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>00C800</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template App NTP Service</host>
                        <key>ntp[delay]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>1</sortorder>
                    <drawtype>0</drawtype>
                    <color>C80000</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template App NTP Service</host>
                        <key>ntp[jitter]</key>
                    </item>
                </graph_item>
                <graph_item>
                    <sortorder>2</sortorder>
                    <drawtype>0</drawtype>
                    <color>0000C8</color>
                    <yaxisside>0</yaxisside>
                    <calc_fnc>2</calc_fnc>
                    <type>0</type>
                    <item>
                        <host>Template App NTP Service</host>
                        <key>ntp[offset]</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
    </graphs>
    <value_maps>
        <value_map>
            <name>Service state</name>
            <mappings>
                <mapping>
                    <value>0</value>
                    <newvalue>Down</newvalue>
                </mapping>
                <mapping>
                    <value>1</value>
                    <newvalue>Up</newvalue>
                </mapping>
            </mappings>
        </value_map>
    </value_maps>
</zabbix_export>


Zabbix数据库表分区优化

按照官方的方法执行,请浏览页面https://www.zabbix.org/wiki/Docs/howto/mysql_partition

为了快速操作,我将原有数据清空了(清空表操作);

mysql> use zabbix;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> truncate table history;
Query OK, 0 rows affected (0.82 sec)

mysql> optimize  table history;
+----------------+----------+----------+-------------------------------------------------------------------+
| Table          | Op       | Msg_type | Msg_text                                                          |
+----------------+----------+----------+-------------------------------------------------------------------+
| zabbix.history | optimize | note     | Table does not support optimize, doing recreate + analyze instead |
| zabbix.history | optimize | status   | OK                                                                |
+----------------+----------+----------+-------------------------------------------------------------------+
2 rows in set (0.30 sec)

mysql> truncate table history_str;
Query OK, 0 rows affected (0.25 sec)

mysql> truncate table history_uint;
Query OK, 0 rows affected (1.48 sec)

mysql> Alter table history_text drop primary key, add index (id), drop index history_text_2, add index history_text_2 (itemid, id);
Query OK, 2183087 rows affected (57.73 sec)
Records: 2183087  Duplicates: 0  Warnings: 0

mysql> Alter table history_log drop primary key, add index (id), drop index history_log_2, add index history_log_2 (itemid, id);
Query OK, 0 rows affected (0.93 sec)
Records: 0  Duplicates: 0  Warnings: 0

将官方的四个分散代码拷贝至一个文件保存为sql,导入数据库;

[root@localhost ~]# cat zabbix-partition.sql 
DELIMITER $$
CREATE PROCEDURE `partition_create`(SCHEMANAME varchar(64), TABLENAME varchar(64), PARTITIONNAME varchar(64), CLOCK int)
BEGIN
        /*
           SCHEMANAME = The DB schema in which to make changes
           TABLENAME = The table with partitions to potentially delete
           PARTITIONNAME = The name of the partition to create
        */
        /*
           Verify that the partition does not already exist
        */

        DECLARE RETROWS INT;
        SELECT COUNT(1) INTO RETROWS
        FROM information_schema.partitions
        WHERE table_schema = SCHEMANAME AND table_name = TABLENAME AND partition_description >= CLOCK;

        IF RETROWS = 0 THEN
                /*
                   1. Print a message indicating that a partition was created.
                   2. Create the SQL to create the partition.
                   3. Execute the SQL from #2.
                */
                SELECT CONCAT( "partition_create(", SCHEMANAME, ",", TABLENAME, ",", PARTITIONNAME, ",", CLOCK, ")" ) AS msg;
                SET @sql = CONCAT( 'ALTER TABLE ', SCHEMANAME, '.', TABLENAME, ' ADD PARTITION (PARTITION ', PARTITIONNAME, ' VALUES LESS THAN (', CLOCK, '));' );
                PREPARE STMT FROM @sql;
                EXECUTE STMT;
                DEALLOCATE PREPARE STMT;
        END IF;
END$$
DELIMITER ;

DELIMITER $$
CREATE PROCEDURE `partition_drop`(SCHEMANAME VARCHAR(64), TABLENAME VARCHAR(64), DELETE_BELOW_PARTITION_DATE BIGINT)
BEGIN
        /*
           SCHEMANAME = The DB schema in which to make changes
           TABLENAME = The table with partitions to potentially delete
           DELETE_BELOW_PARTITION_DATE = Delete any partitions with names that are dates older than this one (yyyy-mm-dd)
        */
        DECLARE done INT DEFAULT FALSE;
        DECLARE drop_part_name VARCHAR(16);

        /*
           Get a list of all the partitions that are older than the date
           in DELETE_BELOW_PARTITION_DATE.  All partitions are prefixed with
           a "p", so use SUBSTRING TO get rid of that character.
        */
        DECLARE myCursor CURSOR FOR
                SELECT partition_name
                FROM information_schema.partitions
                WHERE table_schema = SCHEMANAME AND table_name = TABLENAME AND CAST(SUBSTRING(partition_name FROM 2) AS UNSIGNED) < DELETE_BELOW_PARTITION_DATE;
        DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;

        /*
           Create the basics for when we need to drop the partition.  Also, create
           @drop_partitions to hold a comma-delimited list of all partitions that
           should be deleted.
        */
        SET @alter_header = CONCAT("ALTER TABLE ", SCHEMANAME, ".", TABLENAME, " DROP PARTITION ");
        SET @drop_partitions = "";

        /*
           Start looping through all the partitions that are too old.
        */
        OPEN myCursor;
        read_loop: LOOP
                FETCH myCursor INTO drop_part_name;
                IF done THEN
                        LEAVE read_loop;
                END IF;
                SET @drop_partitions = IF(@drop_partitions = "", drop_part_name, CONCAT(@drop_partitions, ",", drop_part_name));
        END LOOP;
        IF @drop_partitions != "" THEN
                /*
                   1. Build the SQL to drop all the necessary partitions.
                   2. Run the SQL to drop the partitions.
                   3. Print out the table partitions that were deleted.
                */
                SET @full_sql = CONCAT(@alter_header, @drop_partitions, ";");
                PREPARE STMT FROM @full_sql;
                EXECUTE STMT;
                DEALLOCATE PREPARE STMT;

                SELECT CONCAT(SCHEMANAME, ".", TABLENAME) AS `table`, @drop_partitions AS `partitions_deleted`;
        ELSE
                /*
                   No partitions are being deleted, so print out "N/A" (Not applicable) to indicate
                   that no changes were made.
                */
                SELECT CONCAT(SCHEMANAME, ".", TABLENAME) AS `table`, "N/A" AS `partitions_deleted`;
        END IF;
END$$
DELIMITER ;

DELIMITER $$
CREATE PROCEDURE `partition_maintenance`(SCHEMA_NAME VARCHAR(32), TABLE_NAME VARCHAR(32), KEEP_DATA_DAYS INT, HOURLY_INTERVAL INT, CREATE_NEXT_INTERVALS INT)
BEGIN
        DECLARE OLDER_THAN_PARTITION_DATE VARCHAR(16);
        DECLARE PARTITION_NAME VARCHAR(16);
        DECLARE OLD_PARTITION_NAME VARCHAR(16);
        DECLARE LESS_THAN_TIMESTAMP INT;
        DECLARE CUR_TIME INT;

        CALL partition_verify(SCHEMA_NAME, TABLE_NAME, HOURLY_INTERVAL);
        SET CUR_TIME = UNIX_TIMESTAMP(DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00'));

        SET @__interval = 1;
        create_loop: LOOP
                IF @__interval > CREATE_NEXT_INTERVALS THEN
                        LEAVE create_loop;
                END IF;

                SET LESS_THAN_TIMESTAMP = CUR_TIME + (HOURLY_INTERVAL * @__interval * 3600);
                SET PARTITION_NAME = FROM_UNIXTIME(CUR_TIME + HOURLY_INTERVAL * (@__interval - 1) * 3600, 'p%Y%m%d%H00');
                IF(PARTITION_NAME != OLD_PARTITION_NAME) THEN
      CALL partition_create(SCHEMA_NAME, TABLE_NAME, PARTITION_NAME, LESS_THAN_TIMESTAMP);
    END IF;
                SET @__interval=@__interval+1;
                SET OLD_PARTITION_NAME = PARTITION_NAME;
        END LOOP;

        SET OLDER_THAN_PARTITION_DATE=DATE_FORMAT(DATE_SUB(NOW(), INTERVAL KEEP_DATA_DAYS DAY), '%Y%m%d0000');
        CALL partition_drop(SCHEMA_NAME, TABLE_NAME, OLDER_THAN_PARTITION_DATE);

END$$
DELIMITER ;

DELIMITER $$
CREATE PROCEDURE `partition_verify`(SCHEMANAME VARCHAR(64), TABLENAME VARCHAR(64), HOURLYINTERVAL INT(11))
BEGIN
        DECLARE PARTITION_NAME VARCHAR(16);
        DECLARE RETROWS INT(11);
        DECLARE FUTURE_TIMESTAMP TIMESTAMP;

        /*
         * Check if any partitions exist for the given SCHEMANAME.TABLENAME.
         */
        SELECT COUNT(1) INTO RETROWS
        FROM information_schema.partitions
        WHERE table_schema = SCHEMANAME AND table_name = TABLENAME AND partition_name IS NULL;

        /*
         * If partitions do not exist, go ahead and partition the table
         */
        IF RETROWS = 1 THEN
                /*
                 * Take the current date at 00:00:00 and add HOURLYINTERVAL to it.  This is the timestamp below which we will store values.
                 * We begin partitioning based on the beginning of a day.  This is because we don't want to generate a random partition
                 * that won't necessarily fall in line with the desired partition naming (ie: if the hour interval is 24 hours, we could
                 * end up creating a partition now named "p201403270600" when all other partitions will be like "p201403280000").
                 */
                SET FUTURE_TIMESTAMP = TIMESTAMPADD(HOUR, HOURLYINTERVAL, CONCAT(CURDATE(), " ", '00:00:00'));
                SET PARTITION_NAME = DATE_FORMAT(CURDATE(), 'p%Y%m%d%H00');

                -- Create the partitioning query
                SET @__PARTITION_SQL = CONCAT("ALTER TABLE ", SCHEMANAME, ".", TABLENAME, " PARTITION BY RANGE(`clock`)");
                SET @__PARTITION_SQL = CONCAT(@__PARTITION_SQL, "(PARTITION ", PARTITION_NAME, " VALUES LESS THAN (", UNIX_TIMESTAMP(FUTURE_TIMESTAMP), "));");

                -- Run the partitioning query
                PREPARE STMT FROM @__PARTITION_SQL;
                EXECUTE STMT;
                DEALLOCATE PREPARE STMT;
        END IF;
END$$
DELIMITER ;


[root@localhost ~]# 

##请登录mysql,切换到zabbix的数据库下执行

mysql> source /root/zabbix-partition.sql;
Query OK, 0 rows affected (0.00 sec)
mysql> CALL partition_maintenance('zabbix', 'history_log', 28, 24, 14);
+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607020000,1467475200) |
+---------------------------------------------------------------+
1 row in set (0.69 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607030000,1467561600) |
+---------------------------------------------------------------+
1 row in set (1.94 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607040000,1467648000) |
+---------------------------------------------------------------+
1 row in set (3.48 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607050000,1467734400) |
+---------------------------------------------------------------+
1 row in set (4.22 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607060000,1467820800) |
+---------------------------------------------------------------+
1 row in set (4.94 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607070000,1467907200) |
+---------------------------------------------------------------+
1 row in set (5.70 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607080000,1467993600) |
+---------------------------------------------------------------+
1 row in set (6.49 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607090000,1468080000) |
+---------------------------------------------------------------+
1 row in set (7.23 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607100000,1468166400) |
+---------------------------------------------------------------+
1 row in set (7.91 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607110000,1468252800) |
+---------------------------------------------------------------+
1 row in set (8.71 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607120000,1468339200) |
+---------------------------------------------------------------+
1 row in set (10.26 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607130000,1468425600) |
+---------------------------------------------------------------+
1 row in set (11.52 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_log,p201607140000,1468512000) |
+---------------------------------------------------------------+
1 row in set (12.37 sec)

+--------------------+--------------------+
| table              | partitions_deleted |
+--------------------+--------------------+
| zabbix.history_log | N/A                |
+--------------------+--------------------+
1 row in set (13.21 sec)

Query OK, 0 rows affected (13.21 sec)

[root@localhost ~]# cat partition_maintenance_all.sql 
DELIMITER $$
CREATE PROCEDURE `partition_maintenance_all`(SCHEMA_NAME VARCHAR(32))
BEGIN
                CALL partition_maintenance(SCHEMA_NAME, 'history', 28, 24, 14);
                CALL partition_maintenance(SCHEMA_NAME, 'history_log', 28, 24, 14);
                CALL partition_maintenance(SCHEMA_NAME, 'history_str', 28, 24, 14);
                CALL partition_maintenance(SCHEMA_NAME, 'history_text', 28, 24, 14);
                CALL partition_maintenance(SCHEMA_NAME, 'history_uint', 28, 24, 14);
                CALL partition_maintenance(SCHEMA_NAME, 'trends', 730, 24, 14);
                CALL partition_maintenance(SCHEMA_NAME, 'trends_uint', 730, 24, 14);
END$$
DELIMITER ;

[root@localhost ~]#

以上代码部分的含义为(库名,表名,保存多少天的数据,每隔多久生成一个分区,本次生成多少分区)

mysql> source /root/partition_maintenance_all.sql;
Query OK, 0 rows affected (0.00 sec)

mysql> CALL partition_maintenance_all('zabbix');
+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607020000,1467475200) |
+-----------------------------------------------------------+
1 row in set (3.83 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607030000,1467561600) |
+-----------------------------------------------------------+
1 row in set (4.49 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607040000,1467648000) |
+-----------------------------------------------------------+
1 row in set (5.18 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607050000,1467734400) |
+-----------------------------------------------------------+
1 row in set (5.83 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607060000,1467820800) |
+-----------------------------------------------------------+
1 row in set (6.43 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607070000,1467907200) |
+-----------------------------------------------------------+
1 row in set (7.15 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607080000,1467993600) |
+-----------------------------------------------------------+
1 row in set (7.85 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607090000,1468080000) |
+-----------------------------------------------------------+
1 row in set (8.47 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607100000,1468166400) |
+-----------------------------------------------------------+
1 row in set (9.09 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607110000,1468252800) |
+-----------------------------------------------------------+
1 row in set (9.70 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607120000,1468339200) |
+-----------------------------------------------------------+
1 row in set (10.40 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607130000,1468425600) |
+-----------------------------------------------------------+
1 row in set (11.06 sec)

+-----------------------------------------------------------+
| msg                                                       |
+-----------------------------------------------------------+
| partition_create(zabbix,history,p201607140000,1468512000) |
+-----------------------------------------------------------+
1 row in set (11.68 sec)

+----------------+--------------------+
| table          | partitions_deleted |
+----------------+--------------------+
| zabbix.history | N/A                |
+----------------+--------------------+
1 row in set (12.34 sec)

+--------------------+--------------------+
| table              | partitions_deleted |
+--------------------+--------------------+
| zabbix.history_log | N/A                |
+--------------------+--------------------+
1 row in set (12.35 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607020000,1467475200) |
+---------------------------------------------------------------+
1 row in set (13.11 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607030000,1467561600) |
+---------------------------------------------------------------+
1 row in set (13.76 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607040000,1467648000) |
+---------------------------------------------------------------+
1 row in set (14.47 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607050000,1467734400) |
+---------------------------------------------------------------+
1 row in set (15.11 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607060000,1467820800) |
+---------------------------------------------------------------+
1 row in set (15.75 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607070000,1467907200) |
+---------------------------------------------------------------+
1 row in set (16.32 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607080000,1467993600) |
+---------------------------------------------------------------+
1 row in set (17.00 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607090000,1468080000) |
+---------------------------------------------------------------+
1 row in set (17.70 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607100000,1468166400) |
+---------------------------------------------------------------+
1 row in set (18.34 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607110000,1468252800) |
+---------------------------------------------------------------+
1 row in set (18.98 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607120000,1468339200) |
+---------------------------------------------------------------+
1 row in set (19.58 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607130000,1468425600) |
+---------------------------------------------------------------+
1 row in set (20.23 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,history_str,p201607140000,1468512000) |
+---------------------------------------------------------------+
1 row in set (20.89 sec)

+--------------------+--------------------+
| table              | partitions_deleted |
+--------------------+--------------------+
| zabbix.history_str | N/A                |
+--------------------+--------------------+
1 row in set (21.46 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607020000,1467475200) |
+----------------------------------------------------------------+
1 row in set (1 min 18.71 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607030000,1467561600) |
+----------------------------------------------------------------+
1 row in set (1 min 19.79 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607040000,1467648000) |
+----------------------------------------------------------------+
1 row in set (1 min 20.55 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607050000,1467734400) |
+----------------------------------------------------------------+
1 row in set (1 min 21.45 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607060000,1467820800) |
+----------------------------------------------------------------+
1 row in set (1 min 22.79 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607070000,1467907200) |
+----------------------------------------------------------------+
1 row in set (1 min 23.62 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607080000,1467993600) |
+----------------------------------------------------------------+
1 row in set (1 min 24.46 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607090000,1468080000) |
+----------------------------------------------------------------+
1 row in set (1 min 25.47 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607100000,1468166400) |
+----------------------------------------------------------------+
1 row in set (1 min 26.69 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607110000,1468252800) |
+----------------------------------------------------------------+
1 row in set (1 min 27.87 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607120000,1468339200) |
+----------------------------------------------------------------+
1 row in set (1 min 29.12 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607130000,1468425600) |
+----------------------------------------------------------------+
1 row in set (1 min 30.24 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_text,p201607140000,1468512000) |
+----------------------------------------------------------------+
1 row in set (1 min 31.29 sec)

+---------------------+--------------------+
| table               | partitions_deleted |
+---------------------+--------------------+
| zabbix.history_text | N/A                |
+---------------------+--------------------+
1 row in set (1 min 32.63 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607020000,1467475200) |
+----------------------------------------------------------------+
1 row in set (1 min 40.29 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607030000,1467561600) |
+----------------------------------------------------------------+
1 row in set (1 min 41.40 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607040000,1467648000) |
+----------------------------------------------------------------+
1 row in set (1 min 42.28 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607050000,1467734400) |
+----------------------------------------------------------------+
1 row in set (1 min 43.24 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607060000,1467820800) |
+----------------------------------------------------------------+
1 row in set (1 min 44.65 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607070000,1467907200) |
+----------------------------------------------------------------+
1 row in set (1 min 45.73 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607080000,1467993600) |
+----------------------------------------------------------------+
1 row in set (1 min 46.76 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607090000,1468080000) |
+----------------------------------------------------------------+
1 row in set (1 min 47.60 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607100000,1468166400) |
+----------------------------------------------------------------+
1 row in set (1 min 48.65 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607110000,1468252800) |
+----------------------------------------------------------------+
1 row in set (1 min 49.80 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607120000,1468339200) |
+----------------------------------------------------------------+
1 row in set (1 min 50.83 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607130000,1468425600) |
+----------------------------------------------------------------+
1 row in set (1 min 51.62 sec)

+----------------------------------------------------------------+
| msg                                                            |
+----------------------------------------------------------------+
| partition_create(zabbix,history_uint,p201607140000,1468512000) |
+----------------------------------------------------------------+
1 row in set (1 min 52.79 sec)

+---------------------+--------------------+
| table               | partitions_deleted |
+---------------------+--------------------+
| zabbix.history_uint | N/A                |
+---------------------+--------------------+
1 row in set (1 min 53.63 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607020000,1467475200) |
+----------------------------------------------------------+
1 row in set (2 min 4.97 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607030000,1467561600) |
+----------------------------------------------------------+
1 row in set (2 min 6.04 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607040000,1467648000) |
+----------------------------------------------------------+
1 row in set (2 min 6.69 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607050000,1467734400) |
+----------------------------------------------------------+
1 row in set (2 min 7.52 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607060000,1467820800) |
+----------------------------------------------------------+
1 row in set (2 min 8.28 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607070000,1467907200) |
+----------------------------------------------------------+
1 row in set (2 min 9.05 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607080000,1467993600) |
+----------------------------------------------------------+
1 row in set (2 min 9.64 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607090000,1468080000) |
+----------------------------------------------------------+
1 row in set (2 min 10.35 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607100000,1468166400) |
+----------------------------------------------------------+
1 row in set (2 min 11.09 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607110000,1468252800) |
+----------------------------------------------------------+
1 row in set (2 min 11.73 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607120000,1468339200) |
+----------------------------------------------------------+
1 row in set (2 min 12.53 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607130000,1468425600) |
+----------------------------------------------------------+
1 row in set (2 min 13.26 sec)

+----------------------------------------------------------+
| msg                                                      |
+----------------------------------------------------------+
| partition_create(zabbix,trends,p201607140000,1468512000) |
+----------------------------------------------------------+
1 row in set (2 min 14.34 sec)

+---------------+--------------------+
| table         | partitions_deleted |
+---------------+--------------------+
| zabbix.trends | N/A                |
+---------------+--------------------+
1 row in set (2 min 15.33 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607020000,1467475200) |
+---------------------------------------------------------------+
1 row in set (2 min 43.90 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607030000,1467561600) |
+---------------------------------------------------------------+
1 row in set (2 min 44.79 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607040000,1467648000) |
+---------------------------------------------------------------+
1 row in set (2 min 45.53 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607050000,1467734400) |
+---------------------------------------------------------------+
1 row in set (2 min 46.19 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607060000,1467820800) |
+---------------------------------------------------------------+
1 row in set (2 min 46.95 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607070000,1467907200) |
+---------------------------------------------------------------+
1 row in set (2 min 47.83 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607080000,1467993600) |
+---------------------------------------------------------------+
1 row in set (2 min 49.15 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607090000,1468080000) |
+---------------------------------------------------------------+
1 row in set (2 min 50.01 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607100000,1468166400) |
+---------------------------------------------------------------+
1 row in set (2 min 50.86 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607110000,1468252800) |
+---------------------------------------------------------------+
1 row in set (2 min 51.67 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607120000,1468339200) |
+---------------------------------------------------------------+
1 row in set (2 min 52.33 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607130000,1468425600) |
+---------------------------------------------------------------+
1 row in set (2 min 52.98 sec)

+---------------------------------------------------------------+
| msg                                                           |
+---------------------------------------------------------------+
| partition_create(zabbix,trends_uint,p201607140000,1468512000) |
+---------------------------------------------------------------+
1 row in set (2 min 53.82 sec)

+--------------------+--------------------+
| table              | partitions_deleted |
+--------------------+--------------------+
| zabbix.trends_uint | N/A                |
+--------------------+--------------------+
1 row in set (2 min 54.70 sec)

Query OK, 0 rows affected (2 min 54.70 sec)

mysql> 

可以加入计划任务每天执行一次


11 11 * * * mysql -uzabbix -pzabbix zabbix -e "CALL partition_maintenance_all('zabbix');"

如果想改变数据保存的天数,可以修改上面的28或者最后的14,周期24小时,不要调整;
另外按照官方所述,应取消历史记录和趋势的内部管家,并且选中覆盖监控项历史期间,按照文章所述默认天数分别为历史记录28天和趋势730天。

YUM方式安装Zabbix

YUM方式安装Zabbix

1、选择适用的源扩展
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/5/x86_64/zabbix-release-2.4-1.el5.noarch.rpm

# yum groupinstall “Development Tools” -y
# yum groupinstall “Development Libraries” -y
# yum install zlib libpng libjpeg fontconfig gd libxml2 libgd-devel libpng-devel libjpeg-devel zlib-devel gd-devel freetype freetype-devel libxml libxml-devel -y
# yum install cmake -y
# yum install ncurses ncurses-devel -y
# yum install libxml2 libxml2-devel -y
# yum install openssl openssl-devel -y
# yum install curl curl-devel -y
# yum install libevent libevent-devel -y
# yum -y install net-tools lrzsz gcc gcc-c++ make cmake libxml2-devel openssl-devel curl curl-devel unzip sudo ntp libaio-devel wget vim ncurses-devel autoconf automake zlib* fiex* libxml* libmcrypt* libtool-ltdl-devel* python-devel -y

# yum install httpd php mysql mysql-server php-mysql

2、在监控端安装zabbix server和zabbix agent,再被监控端安装zabbix agent

# yum install zabbix-server-mysql zabbix-web-mysql zabbix-get zabbix-sender

# yum install zabbix-agent zabbix-sender

3、监控端数据库导入
mysql> create database zabbix character set utf8;

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix’;

mysql> flush privileges;

# cd /usr/share/doc/zabbix-server-mysql-2.4.0/create
# mysql -uroot zabbix < schema.sql # mysql -uroot zabbix < images.sql # mysql -uroot zabbix < data.sql 4、配置数据库信息 # vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix Start Zabbix server process. # service zabbix-server start 5、PHP参数值建议 max_execution_time 300 memory_limit 128M post_max_size 16M upload_max_filesize 2M max_input_time 300 6、启动服务 # service httpd restart # service mysqld restart # service zabbix-server restart # service zabbix-agent restart

Zabbix监控Key相关

1、监控进程
/usr/local/zabbix/bin/zabbix_get -s 127.0.0.1 -k “net.tcp.service[http]”

2、监控端口
/usr/local/zabbix/bin/zabbix_get -s 127.0.0.1 -k “net.tcp.port[,80]” 结果:1存在,0不存在;

3、进程数量
/usr/local/zabbix/bin/zabbix_get -s 127.0.0.1 -k “proc.num[]”
/usr/local/zabbix/bin/zabbix_get -s 127.0.0.1 -k “proc.num[httpd]”

4、其他
vm.memory.size[available]
vfs.file.cksum[/etc/passwd]
system.cpu.switches
system.cpu.num
system.cpu.util[,user]
system.cpu.util[,nice]
system.cpu.util[,system]
system.cpu.util[,iowait]
system.cpu.util[,idle]
system.cpu.util[,interrupt]
system.cpu.util[,steal]
system.cpu.util[,softirq]
system.swap.size[,free]
system.swap.size[,pfree]
system.boottime
system.localtime
system.hostname
system.cpu.intr
kernel.maxfiles
kernel.maxproc
system.users.num
proc.num[]
proc.num[,,run]
system.cpu.load[percpu,avg1]
system.cpu.load[percpu,avg5]
system.cpu.load[percpu,avg15]
system.uname
system.uptime
vm.memory.size[total]
system.swap.size[,total]
net.tcp.service[ftp,,155]
net.tcp.service[http]
net.tcp.service.perf[http,,8080]
net.tcp.service[service,, ]

zabbix Item Key

NetBSD
                                                            OpenBSD ▼▼
                                                        Mac OS X ▼▼
                                                        Tru64 ▼▼
                                                       AIX ▼▼
                                                  HP-UX ▼▼
                                             Solaris ▼▼
                                          FreeBSD ▼▼
                                     Linux 2.6 ▼▼
                                  Linux 2.4 ▼▼
                                 Windows ▼▼
                 Parameter / system ▼▼
        ▼▼   1   2   3   4   5   6   7   8   9   10   11
agent.hostname X X X X X X X X X X X
agent.ping X X X X X X X X X X X
agent.version X X X X X X X X X X X
kernel.maxfiles X X X ? X X X
kernel.maxproc X X X ? X X X
log[file,<regexp>,<encoding>,<maxlines>] X X X X X X X X X X X
logrt[file_format,<regexp>,<encoding>,<maxlines>] X X X X X X X X X X X
eventlog[name,<regexp>,<severity>,<source>,<eventid>,
<maxlines>]
X
net.if.collisions[if] X X X X X X r
net.if.in[if,<mode>] X X X X X X X r
  mode bytes (default) X X X X X X X r
packets X X X X X X X r
errors X X X X X X X r
dropped X X X X X r
net.if.list X
net.if.out[if,<mode>] X X X X X X X r
  mode bytes (default) X X X X X X X r
packets X X X X X X X r
errors X X X X X X X r
dropped X X X
net.if.total[if,<mode>] X X X X X X X r
  mode bytes (default) X X X X X X X r
packets X X X X X X X r
errors X X X X X X X r
dropped X X X
net.tcp.dns[<ip>,zone] X X X X X X X X X X
net.tcp.dns.query[<ip>,zone,<type>] X X X X X X X X X X
net.tcp.listen[port] X X X X X
net.tcp.port[<ip>,port] X X X X X X X X X X X
net.tcp.service[service,<ip>,<port>] X X X X X X X X X X
net.tcp.service.perf[service,<ip>,<port>] X X X X X X X X X X
net.udp.listen[port] X X
  1   2   3   4   5   6   7   8   9   10   11
proc.mem[<name>,<user>,<mode>,<cmdline>] X X X X X X ? X X
  mode sum (default) X X X X X X ? X X
avg X X X X X X ? X X
max X X X X X X ? X X
min X X X X X X ? X X
proc.num[<name>,<user>,<state>,<cmdline>] X X X X X X X ? X X
  state all (default) X X X X X X ? X X
sleep X X X X X X ? X X
zomb X X X X X X ? X X
run X X X X X X ? X X
sensor[device,sensor,<mode>] X X
services[<type>,<state>,<exclude>] X
system.boottime X X X X X X
system.cpu.intr X X X X X X X
system.cpu.load[<cpu>,<mode>] X X X X X X X ? X X
  mode avg1 (default) X X X X X X X ? X X
avg5 X X X X X X X ? X X
avg15 X X X X X X X ? X X
system.cpu.num[<type>] X X X X X X X X X
  type online (default) X X X X X X X X X
max X X X X
system.cpu.switches X X X X X X X
system.cpu.util[<cpu>,<type>,<mode>] X X X X X X X X ? X X
  type user (default) X X X X X X X ? X X
nice X X X X X ? X X
idle X X X X X X X ? X X
system X X X X X X X ? X X
kernel X
iowait X X
wait X
interrupt X X X
softirq X
steal X
  mode avg1 (default) X X X X X X X ? X
avg5 X X X X X X ? X
avg15 X X X X X X ? X
  1   2   3   4   5   6   7   8   9   10   11
system.hostname[<type>] X X X X X X X X X X X
system.localtime X X X X X X X X X X X
  type utc (default) X X X X X X X X X X X
local X X X X X X X X X X X
system.run[command,<mode>] X X X X X X X X X X X
  mode wait (default) X X X X X X X X X X X
nowait X X X X X X X X X X X
system.stat[resource,<type>] X
system.swap.in[<device>,<type>] (specifying a device is only supported under Linux) X X X X
  type
(pages will only work if
device was not specified)
count (default under all except Linux) X X X X
sectors X X
pages (default under Linux) X X X X
system.swap.out[<device>,<type>] (specifying a device is only supported under Linux) X X X X
  type
(pages will only work if
device was not specified)
count (default under all except Linux) X X X X
sectors X X
pages (default under Linux) X X X X
system.swap.size[<device>,<type>] X X X X X X ? X
  type free (default) X X X X X X ? X
total X X X X X X ? X
used X X X X
pfree X X X X ? X
pused X X X X ? X
system.uname X X X X X X X X X X
system.uptime X X X X X X ? ? X X
system.users.num X X X X X X X X X
  1   2   3   4   5   6   7   8   9   10   11
vfs.dev.read[<device>,<type>,<mode>] X X X X X
  type

(defaults are different
under various OSes)

sectors X X
operations X X X X X
bytes X X X
sps X X
ops X X X
bps X
  mode
(compatible only with
type in: sps, ops, bps)
avg1 (default) X X X i
avg5 X X X i
avg15 X X X i
vfs.dev.write[<device>,<type>,<mode>] X X X X X
  type

(defaults are different
under various OSes)

sectors X X
operations X X X X X
bytes X X X
sps X X
ops X X X
bps X
  mode
(compatible only with
type in: sps, ops, bps)
avg1 (default) X X X i
avg5 X X X i
avg15 X X X i
vfs.file.cksum[file] X X X X X X X X X X
vfs.file.exists[file] X X X X X X X X X X X
vfs.file.md5sum[file] X X X X X X X X X X
vfs.file.regexp[file,regexp,<encoding>] X X X X X X X X X X
vfs.file.regmatch[file,regexp,<encoding>] X X X X X X X X X X
vfs.file.size[file] X X X X X X X X X X
  1   2   3   4   5   6   7   8   9   10   11
vfs.file.time[file,<mode>] X X X X X X X X X X
  mode modify (default) X X X X X X X X X X
access X X X X X X X X X X
change X X X X X X X X X X
vfs.fs.inode[fs,<mode>] X X X X X X X ? X X
  mode total (default) X X X X X X X ? X X
free X X X X X X X ? X X
used X X X X X X X ? X X
pfree X X X X X X X ? X X
pused X X X X X X X ? X X
vfs.fs.size[fs,<mode>] X X X X X X X X ? X X
  mode total (default) X X X X X X X X ? X X
free X X X X X X X X ? X X
used X X X X X X X X ? X X
pfree X X X X X X X X ? X X
pused X X X X X X X X ? X X
vm.memory.size[<mode>] X X X X X X X X ? X X
  mode total (default) X X X X X X X X ? X X
free X X X X X X X X ? X X
used X X X
shared X X X ? X X
buffers X X ? X X
cached X X X X X ? X X
pfree X X X X X X
pused X X X
available X X
web.page.get[host,<path>,<port>] X X X X X X X X X X X
web.page.perf[host,<path>,<port>] X X X X X X X X X X X
web.page.regexp[host,<path>,<port>,<regexp>,<length>] X X X X X X X X X X X
  1   2   3   4   5   6   7   8   9   10   11

4 Zabbix Agent

List of supported parameters

  Key
  Description   Return value   Parameters   Comments
agent.hostname
Returns agent host name. String value Returns the actual value of the agent hostname from a configuration file.
This item is supported starting from version 1.8.13.
agent.ping
Check the agent availability. Returns ‘1’ if agent is available, nothing if unavailable. Use function nodata() to check for host unavailability.
agent.version
Version of Zabbix Agent. String Example of returned value: 1.8.2
kernel.maxfiles
Maximum number of opened files supported by OS. Number of files. Integer.
kernel.maxproc
Maximum number of processes supported by OS. Number of processes.
Integer.
log[file,<regexp>,<encoding>,<maxlines>]
Monitoring of log file. Log. file  – full file name
regexp  – regular expression for pattern
encoding – Code Page identifier
maxlines – Maximum number of new lines per second the agent will send to Zabbix Server or Proxy. This parameter overrides the ‘MaxLinesPerSecond’ option in zabbix_agentd.conf
Must be configured as an Active Check.
Example:
log[/home/zabbix/logs/logfile,,,100]
See detailed description.
logrt[file_format,<regexp>,<encoding>,<maxlines>]
Monitoring of log file with log rotation support. Log. file_format  – full file name in format [absolute path][filename format as regexp]
regexp  – regular expression for pattern
encoding – Code Page identifier
maxlines – Maximum number of new lines per second the agent will send to Zabbix Server or Proxy. This parameter overrides the ‘MaxLinesPerSecond’ option in zabbix_agentd.conf
Must be configured as an Active Check.
Example:
logrt[”/home/zabbix/logs/^logfile[0-9]{1,3}$”,,,100]
Log rotation is based on last modification times of files.
See detailed description.
eventlog[name,<regexp>,<severity>,<source>,<eventid>,<maxlines>]
Monitoring of event logs. Log. name  – event log name
regexp  – regular expression
severity  – regular expression
The parameter accepts the following values: “Information”, “Warning”, “Error”, “Failure Audit”, “Success Audit”
source – Source identifier
eventid – regular expression
maxlines – Maximum number of new lines per second the agent will send to Zabbix Server or Proxy. This parameter overrides the ‘MaxLinesPerSecond’ option in zabbix_agentd.conf
Must be configured as an Active Check.

Examples:

eventlog[Application]

eventlog[Security,,”Failure Audit”,,529|680]

eventlog[System,,”Warning|Error”]

eventlog[System,,,,^1$]

eventlog[System,,,,@TWOSHORT] – here custom regular expression TWOSHORT is defined as type Result is TRUE and expression itself is ^1$|^70$.

net.if.collisions[if]
Out-of-window collision. Number of collisions.
Integer.
if  – interface
net.if.in[if,<mode>]
Network interface incoming statistic. Integer. if  – interface
mode  –
bytes  number of bytes (default)
packets  number of packets
errors  number of errors
dropped  number of dropped packets
Multi-byte interface names on Windows supported since Zabbix agent version 1.8.6.

Examples:
net.if.in[eth0,errors]
net.if.in[eth0]
You may use this key with Delta (speed per second) in order to get bytes per second statistics.

net.if.list
List of network interfaces: Type Status IPv4 Description String Supported since Zabbix agent version 1.8.1. Multi-byte interface names supported since Zabbix agent version 1.8.6. Disabled interfaces are not listed.

Note that enabling/disabling some components may change their ordering in the Windows interface name.

net.if.out[if,<mode>]
Network interface outgoing statistic. Integer. if  – interface
mode  –
bytes  number of bytes (default)
packets  number of packets
errors  number of errors
dropped  number of dropped packets
Multi-byte interface names on Windows supported since Zabbix agent version 1.8.6.

Examples:
net.if.out[eth0,errors]
net.if.out[eth0]
You may use this key with Delta (speed per second) in order to get bytes per second statistics.

net.if.total[if,<mode>]
Sum of network interface incoming and outgoing statistics. Integer. if  – interface
mode  –
bytes  number of bytes (default)
packets  number of packets
errors  number of errors
dropped  number of dropped packets
Examples:
net.if.total[eth0,errors]
net.if.total[eth0]
You may use this key with Delta (speed per second) in order to get bytes per second statistics.
Note that dropped packets are supported only if both net.if.in and net.if.out work for dropped packets on your platform.
net.tcp.dns[<ip>,zone]
Checks if DNS service is up. 0 – DNS is down
1 – DNS is up
ip  – IP address of DNS server (ignored)
zone  – zone to test the DNS
Example:
net.tcp.dns[127.0.0.1,zabbix.com]

Internationalized domain names are not supported, please use IDNA encoded names instead.

net.tcp.dns.query[<ip>,zone,<type>]
Performs a query for the supplied DNS record type. On success returns a character string with the required type of information. ip – IP address of DNS server (ignored)
zone  – zone to test the DNS
type – Record type to be queried (default is SOA)
Example:
net.tcp.dns.query[127.0.0.1,zabbix.com,MX]
type can be one of:
A, NS, CNAME, MB, MG, MR, PTR, MD, MF, MX, SOA, NULL, WKS, HINFO, MINFO, TXT, SRV

SRV record type is supported since Zabbix agent version 1.8.6.

Internationalized domain names are not supported, please use IDNA encoded names instead.

net.tcp.listen[port]
Checks if this TCP port is in LISTEN state. 0 – it is not
1 – it is in LISTEN state
portTCP port number Example:
net.tcp.listen[80]

On Linux supported since Zabbix agent version 1.8.4

net.tcp.port[<ip>,port]
Check, if it is possible to make TCP connection to port number port. 0 – cannot connect
1 – can connect
ip – IP address(default is 127.0.0.1)
port – port number
Example:
net.tcp.port[,80] can be used to test availability of WEB server running on port 80.
Old naming: check_port[*]
For simple TCP performance testing use net.tcp.service.perf[tcp,<ip>,<port>]
Note that these checks may result in additional messages in system daemon logfiles (SMTP and SSH sessions being logged usually).
net.tcp.service[service,<ip>,<port>]
Check if service is running and accepting TCP connections. 0 – service is down
1 – service is running
service – one of ssh, ntp, ldap, smtp, ftp, http, pop, nntp, imap, tcp
ip – IP address (default is 127.0.0.1)
port – port number (by default standard service port number is used)
Example:
net.tcp.service[ftp,,45] can be used to test availability of FTP server on TCP port 45.
Old naming: check_service[*]
Note that before Zabbix version 1.8.3 service.ntp should be used instead of ntp.
Note that these checks may result in additional messages in system daemon logfiles (SMTP and SSH sessions being logged usually).
Checking of encrypted protocols (like IMAP on port 993 or POP on port 995) is currently not supported. As a workaround, please use net.tcp.port for checks like these.
Checking of LDAP by Windows agent is currently not supported.
net.tcp.service.perf[service,<ip>,<port>]
Check performance of service 0 – service is down
sec – number of seconds spent while connecting to the service
service – one of ssh, ntp, ldap, smtp, ftp, http, pop, nntp, imap, tcp
ip – IP address (default is 127.0.0.1)
port – port number (by default standard service port number is used)
Example:
net.tcp.service.perf[ssh] can be used to test speed of initial response from SSH server.
Old naming: check_service_perf[*]
Note that before Zabbix version 1.8.3 service.ntp should be used instead of ntp.
Checking of encrypted protocols (like IMAP on port 993 or POP on port 995) is currently not supported. As a workaround, please use net.tcp.service.perf[tcp,<ip>,<port>] for checks like these.
Checking of LDAP by Windows agent is currently not supported.
net.udp.listen[port]
Checks if this UDP port is in LISTEN state. 0 – it is not
1 – it is in LISTEN state
portUDP port number Example:
net.udp.listen[68]

On Linux supported since Zabbix agent version 1.8.4

proc.mem[<name>,<user>,<mode>,<cmdline>]
Memory used by process name running under user user Memory used by process. name – process name
user – user name (default is all users)
mode – one of avg, max, min, sum (default)
cmdline – filter by command line
Example:
proc.mem[,root] – memory used by all processes running under user “root”.
proc.mem[zabbix_server,zabbix] – memory used by all processes zabbix_server running under user zabbix
proc.mem[,oracle,max,oracleZABBIX] – memory used by most memory hungry process running under oracle having oracleZABBIX in its command line
proc.num[<name>,<user>,<state>,<cmdline>]
Number of processes name having state running under user user Number of processes. name – process name
user – user name (default is all users)
state – one of all (default), run, sleep, zomb
cmdline – filter by command line
Example:
proc.num[,mysql] – number of processes running under user mysql
proc.num[apache2,www-data] – number of apache2 running under user www-data
proc.num[,oracle,sleep,oracleZABBIX] – number of processes in sleep state running under oracle having oracleZABBIX in its command line
On Windows, only name and user arguments are supported.
sensor[device,sensor,<mode>]
Hardware sensor reading. device – device name (if <mode> is used, it is a regular expression)
sensor – sensor name (if <mode> is used, it is a regular expression)
mode – one of avg, max, min (if omitted, device and sensor are treated verbatim).
On Linux 2.4, reads /proc/sys/dev/sensors. Example:
sensor[w83781d-i2c-0-2d,temp1]
Prior to Zabbix 1.8.4, format sensor[temp1] was used.

On OpenBSD, reads hw.sensors MIB. Example:
sensor[cpu0,temp0] – one temperature of one CPU
sensor[cpu[0-2]$,temp,avg] – average temperature of the first three CPU‘s
Supported on OpenBSD since Zabbix 1.8.4.

system.boottime
Timestamp of system boot. Integer. Time in seconds.
system.cpu.intr
Device interrupts. Integer.
system.cpu.load[<cpu>,<mode>]
CPU load. Processor load.
Float.
cpuCPU number (default is all CPUs, only default “all” is supported)
mode – one of avg1 (default),avg5 (average within 5 minutes), avg15
Example:
system.cpu.load[]
Old naming: system.cpu.loadX
system.cpu.num[<type>]
Number of CPUs. Number of available processors. type – one of online (default), max Example:
system.cpu.num
system.cpu.switches
Context switches. Switches count. Old naming: system[switches]
system.cpu.util[<cpu>,<type>,<mode>]
CPU(s) utilisation. Processor utilisation in percents cpuCPU number (default is all CPUs)
type – one of idle, nice, user (default), system, kernel, iowait, interrupt, softirq, steal
mode – one of avg1 (default),avg5 (average within 5 minutes), avg15
Old naming: system.cpu.idleX, system.cpu.niceX, system.cpu.systemX, system.cpu.userX
Example:
system.cpu.util[0,user,avg5]
system.hostname[<type>]
Returns host name. String value type (only on Windows, ignored on other systems) – netbios (default) or host On Windows the value is acquired from either GetComputerName() (for netbios) or gethostname() (for host) function and from “hostname” command on other systems.

Example of returned value
www.zabbix.com

Parameter for this item is supported starting from version 1.8.6.

system.localtime
System time. Integer or string value. utc – (default) the time since the Epoch (00:00:00 UTC, January 1, 1970), measured in seconds.
local – the time in the ‘yyyy-mm-dd,hh:mm:ss.nn,+hh:mm’ format
system.run[command,<mode>]
Run specified command on the host. Text result of the command command – command for execution
mode – one of wait (default, wait end of execution), nowait (do not wait)
Example:
system.run[ls -l /] – detailed file list of root directory.
Note:
To enable this functionality, agent configuration file must have EnableRemoteCommands=1 option.
system.stat[resource,<type>]
Virtual memory statistics Numeric value ent – number of processor units this partition is entitled to receive (float)
kthr,<type> – information about kernel thread states:
r – average number of runnable kernel threads (float)
b – average number of kernel threads placed in the Virtual Memory Manager wait queue (float)
memory,<type> – information about the usage of virtual and real memory:
avm – active virtual pages (integer)
fre – size of the free list (integer)
page,<type> – information about page faults and paging activity:
fi – file page-ins per second (float)
fo – file page-outs per second (float)
pi – pages paged in from paging space (float)
po – pages paged out to paging space (float)
fr – pages freed (page replacement) (float)
sr – pages scanned by page-replacement algorithm (float)
faults,<type> – trap and interrupt rate:
in – device interrupts (float)
sy – system calls (float)
cs – kernel thread context switches (float)
cpu,<type> – breakdown of percentage usage of processor time:
us – user time (float)
sy – system time (float)
id – idle time (float)
wa – idle time during which the system had outstanding disk/NFS I/O request(s) (float)
pc – number of physical processors consumed (float)
ec – the percentage of entitled capacity consumed (float)
lbusy – indicates the percentage of logical processor(s) utilization that occurred while executing at the user and system level (float)
app – indicates the available physical processors in the shared pool (float)
disk,<type> – disk statistics:
bps – indicates the amount of data transferred (read or written) to the drive in bytes per second (integer)
tps – indicates the number of transfers per second that were issued to the physical disk/tape (float)
This item is supported starting from version 1.8.1.
system.swap.in[<device>,<type>]
Swap in (from device, into memory) statistics Numeric value device – swap device (default is all), type – one of count (number of swapins), sectors (sectors swapped in), pages (pages swapped in). See supported by platform for details on defaults. Example: system.swap.in[,pages]
Old naming: swap[in]
system.swap.out[<device>,<type>]
Swap out (from memory, onto device) statistics Numeric value device – swap device (default is all), type – one of count (number of swapouts), sectors (sectors swapped out), pages (pages swapped out). See supported by platform for details on defaults. Example: system.swap.out[,pages]
Old naming: swap[out]
system.swap.size[<device>,<type>]
Swap space. Number of bytes or percentage device – swap device (default is all), type – one of free (default, free swap space), total (total swap space), pfree (free swap space, percentage), pused (used swap space, percentage) Example: system.swap.size[,pfree] – percentage of free swap space
Old naming: system.swap.free, system.swap.total
system.uname
Returns detailed host information. String value Example of returned value:
FreeBSD localhost 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Sep 18 11:57:08 PDT 2001 murray@builder.FreeBSD.org: /usr/src/sys/compile/GENERIC i386
system.uptime
System’s uptime in seconds. Number of seconds Use Units s or uptime to get readable values.
system.users.num
Number of users connected. Number of users Command who is used on agent side.
vfs.dev.read[<device>,<type>,<mode>]
Disk read statistics. Integer for type in: sectors, operations, bytes
Float for type in: sps, ops, bps
device – disk device (default is “all”1)
type – one of sectors, operations, bytes, sps, ops, bps (must specify exactly which parameter to use, since defaults are different under various OSes).
sps, ops, bps means: sectors, operations, bytes per second respectively
mode – one of avg1 (default),avg5 (average within 5 minutes), avg15.
Compatible only with type in: sps, ops, bps
Example: vfs.dev.read[,operations]  Old naming: io[*]

The type parameters ops, bps and sps on supported platforms are limited to 8 devices (7 individual devices and one “all”).

Supports LVM since Zabbix 1.8.6.

Until Zabbix 1.8.6, only relative device names may be used (for example, sda), since 1.8.6 optional /dev/ prefix may be used (for example, /dev/sda)

vfs.dev.write[<device>,<type>,<mode>]
Disk write statistics. Integer for type in: sectors, operations, bytes
Float for type in: sps, ops, bps
device – disk device (default is “all”1)
type – one of sectors, operations, bytes, sps, ops, bps (must specify exactly which parameter to use, since defaults are different under various OSes).
sps, ops, bps means: sectors, operations, bytes per second respectively
mode – one of avg1 (default),avg5 (average within 5 minutes), avg15.
Compatible only with type in: sps, ops, bps
Example: vfs.dev.write[,operations]  Old naming: io[*]

The type parameters ops, bps and sps on supported platforms are limited to 8 devices (7 individual devices and one “all”).

Supports LVM since Zabbix 1.8.6.

Until Zabbix 1.8.6, only relative device names may be used (for example, sda), since 1.8.6 optional /dev/ prefix may be used (for example, /dev/sda)

vfs.file.cksum[file]
Calculate file checksum File checksum, calculated by algorithm used by UNIX cksum. file – full path to file Example of returned value:
1938292000

Example:
vfs.file.cksum[/etc/passwd]

Old naming: cksum

vfs.file.exists[file]
Check if file exists 1 – regular file or a link (symbolic or hard) to regular file exists.

0 – otherwise

file – full path to file Example: vfs.file.exists[/tmp/application.pid]

The return value depends on what S_ISREG POSIX macro returns.

vfs.file.md5sum[file]
File’s MD5 checksum MD5 hash of the file. file – full path to file Example of returned value:
b5052decb577e0fffd622d6ddc017e82

Example:
vfs.file.md5sum[/etc/zabbix/zabbix_agentd.conf]

The file size limit (64 MB) for this item was removed in version 1.8.6.

vfs.file.regexp[file,regexp,<encoding>]
Find string in a file Matched string or EOF if expression not found file – full path to file
regexp – GNU regular expression
encoding – Code Page identifier
Only the first matching line is returned.
Example: vfs.file.regexp[/etc/passwd,zabbix]
vfs.file.regmatch[file,regexp,<encoding>]
Find string in a file 0 – expression not found
1 – found
file – full path to file
regexp – GNU regular expression
encoding – Code Page identifier
Example: vfs.file.regmatch[/var/log/app.log,error]
vfs.file.size[file]
File size Size in bytes. file – full path to file File must have read permissions for user zabbix

Example: vfs.file.size[/var/log/syslog]

vfs.file.time[file,<mode>]
File time information. Unix timestamp. file – full path to the file
mode – one of modify (default, modification time), access – last access time, change – last change time
Example: vfs.file.time[/etc/passwd,modify]
vfs.fs.inode[fs,<mode>]
Number of inodes Numeric value fs – filesystem
mode – one of total (default), free, used, pfree (free, percentage), pused (used, percentage)
Example: vfs.fs.inode[/,pfree]  Old naming: vfs.fs.inode.free[*], vfs.fs.inode.pfree[*], vfs.fs.inode.total[*]
vfs.fs.size[fs,<mode>]
Disk space Disk space in bytes fs – filesystem
mode – one of total (default), free, used, pfree (free, percentage), pused (used, percentage)
In case of a mounted volume, disk space for local file system is returned.   Example: vfs.fs.size[/tmp,free]  Old naming: vfs.fs.free[*], vfs.fs.total[*], vfs.fs.used[*], vfs.fs.pfree[*], vfs.fs.pused[*]
vm.memory.size[<mode>]
Memory size Memory size in bytes mode – one of total (default), shared, free, buffers, cached, pfree, available Old naming: vm.memory.buffers, vm.memory.cached, vm.memory.free, vm.memory.shared, vm.memory.total
web.page.get[host,<path>,<port>]
Get content of WEB page WEB page source as text host – hostname
path – path to HTML document (default is /)
port – port number (default is 80)
Returns EOF on fail.  Example:
web.page.get[www.zabbix.com,index.php,80]
web.page.perf[host,<path>,<port>]
Get timing of loading full WEB page Time in seconds host – hostname
path – path to HTML document (default is /)
port – port number (default is 80)
Returns 0 on fail. Example:
web.page.perf[www.zabbix.com,index.php,80]
web.page.regexp[host,<path>,<port>,<regexp>,<length>]
Get first occurrence of regexp in WEB page Matched string host – hostname
path – path to HTML document (default is /)
port – port number (default is 80)
regexp – GNU regular expression
length – maximum number of characters to return
Returns EOF in case of no match or any other failures (such as timeout, failed connection, etc). Example:
web.page.regexp[www.zabbix.com,index.php,80,OK,2]