Skip to content

Commit

Permalink
add Memory advanced items
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrik Majer committed Oct 21, 2014
1 parent e985b39 commit 0f55e33
Show file tree
Hide file tree
Showing 4 changed files with 367 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -38,6 +38,20 @@ through Discovery:

* Memory Usage Max. of "{#NAME}"

Memory advanced items:

* Memory cache

* Memory swap

* Memory rss

* Memory mapped_file

* Memory pgfault

* Memory pgmajfault


D. License
--
Expand Down
328 changes: 327 additions & 1 deletion Template_Linux_LXC.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2014-10-21T11:28:59Z</date>
<date>2014-10-21T12:36:42Z</date>
<groups>
<group>
<name>Templates</name>
Expand Down Expand Up @@ -55,6 +55,240 @@
<lifetime>7</lifetime>
<description/>
<item_prototypes>
<item_prototype>
<name>Memory Usage: cache of &quot;{#NAME}&quot;</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>custom.lxc.memory.cache[&quot;{#NAME}&quot;]</key>
<delay>120</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>LXC - Memory</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>Memory Usage: mapped_file of &quot;{#NAME}&quot;</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>custom.lxc.memory.mapped_file[&quot;{#NAME}&quot;]</key>
<delay>120</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>LXC - Memory</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>Memory Usage: pgfault of &quot;{#NAME}&quot;</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>custom.lxc.memory.pgfault[&quot;{#NAME}&quot;]</key>
<delay>120</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>LXC - Memory</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>Memory Usage: pgmajfault of &quot;{#NAME}&quot;</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>custom.lxc.memory.pgmajfault[&quot;{#NAME}&quot;]</key>
<delay>120</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>LXC - Memory</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>Memory Usage: rss of &quot;{#NAME}&quot;</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>custom.lxc.memory.rss[&quot;{#NAME}&quot;]</key>
<delay>120</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>LXC - Memory</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>Memory Usage: swap of &quot;{#NAME}&quot;</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>custom.lxc.memory.swap[&quot;{#NAME}&quot;]</key>
<delay>120</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>LXC - Memory</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>CPU acct USAGE - system - &quot;{#NAME}&quot;</name>
<type>0</type>
Expand Down Expand Up @@ -311,6 +545,98 @@
</trigger_prototype>
</trigger_prototypes>
<graph_prototypes>
<graph_prototype>
<name>LXC - Memory Adv. Usage of &quot;{#NAME}&quot;</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>1</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_Linux_LXC</host>
<key>custom.lxc.memory.cache[&quot;{#NAME}&quot;]</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_Linux_LXC</host>
<key>custom.lxc.memory.mapped_file[&quot;{#NAME}&quot;]</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_Linux_LXC</host>
<key>custom.lxc.memory.rss[&quot;{#NAME}&quot;]</key>
</item>
</graph_item>
<graph_item>
<sortorder>3</sortorder>
<drawtype>0</drawtype>
<color>C800C8</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template_Linux_LXC</host>
<key>custom.lxc.memory.swap[&quot;{#NAME}&quot;]</key>
</item>
</graph_item>
<graph_item>
<sortorder>4</sortorder>
<drawtype>0</drawtype>
<color>00C8C8</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template_Linux_LXC</host>
<key>custom.lxc.memory.pgfault[&quot;{#NAME}&quot;]</key>
</item>
</graph_item>
<graph_item>
<sortorder>5</sortorder>
<drawtype>0</drawtype>
<color>C8C800</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template_Linux_LXC</host>
<key>custom.lxc.memory.pgmajfault[&quot;{#NAME}&quot;]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
<graph_prototype>
<name>LXC - CPU acct USAGE of &quot;{#NAME}&quot;</name>
<width>900</width>
Expand Down
8 changes: 8 additions & 0 deletions conf/zabbix-lxc.conf
Expand Up @@ -13,3 +13,11 @@ UserParameter=custom.lxc.cpuacct.user[*],sudo /etc/zabbix/scripts/lxc.handler.pl
#MEMORY
UserParameter=custom.lxc.memory.usage[*],sudo /etc/zabbix/scripts/lxc.handler.pl MEM-usage $1
UserParameter=custom.lxc.memory.maxusage[*],sudo /etc/zabbix/scripts/lxc.handler.pl MEM-max-usage $1
#MEMORY advanced
UserParameter=custom.lxc.memory.cache[*],sudo /etc/zabbix/scripts/lxc.handler.pl MEM-cache $1
UserParameter=custom.lxc.memory.rss[*],sudo /etc/zabbix/scripts/lxc.handler.pl MEM-rss $1
UserParameter=custom.lxc.memory.mapped_file[*],sudo /etc/zabbix/scripts/lxc.handler.pl MEM-mapped_file $1
UserParameter=custom.lxc.memory.swap[*],sudo /etc/zabbix/scripts/lxc.handler.pl MEM-swap $1
UserParameter=custom.lxc.memory.pgfault[*],sudo /etc/zabbix/scripts/lxc.handler.pl MEM-pgfault $1
UserParameter=custom.lxc.memory.pgmajfault[*],sudo /etc/zabbix/scripts/lxc.handler.pl MEM-pgmajfault $1

0 comments on commit 0f55e33

Please sign in to comment.