Luis Manson Posted May 20, 2012 Posted May 20, 2012 this weekend i have been playing with Zabbix for do some stats/monitoring...to be honest its kinda harsh in the GUI are, but very powerfull, so after playing a bit i made this simple template to also monitor IPB along with CPU/HD/SQL... it has 3 stats: new topics, threads and members, and one graph for those stats, i had not setup any triggers, but its very easy, a good use for triggers is to have an alert if there are no new members or posts in X time Template: <?xml version="1.0" encoding="UTF-8"?> <zabbix_export version="1.0" date="20.05.12" time="17.08"> <hosts> <host name="Template_IP.Board"> <proxy_hostid>0</proxy_hostid> <useip>1</useip> <dns></dns> <ip>127.0.0.1</ip> <port>10050</port> <status>3</status> <useipmi>0</useipmi> <ipmi_ip>127.0.0.1</ipmi_ip> <ipmi_port>623</ipmi_port> <ipmi_authtype>0</ipmi_authtype> <ipmi_privilege>2</ipmi_privilege> <ipmi_username></ipmi_username> <ipmi_password></ipmi_password> <groups> <group>Templates</group> </groups> <triggers/> <items> <item type="0" key="ipbGA.members" value_type="3"> <description>New Members (1h)</description> <ipmi_sensor></ipmi_sensor> <delay>3600</delay> <history>90</history> <trends>365</trends> <status>0</status> <data_type>0</data_type> <units></units> <multiplier>0</multiplier> <delta>0</delta> <formula>1</formula> <lastlogsize>0</lastlogsize> <logtimefmt></logtimefmt> <delay_flex></delay_flex> <authtype>0</authtype> <username></username> <password></password> <publickey></publickey> <privatekey></privatekey> <params></params> <trapper_hosts></trapper_hosts> <snmp_community></snmp_community> <snmp_oid></snmp_oid> <snmp_port>161</snmp_port> <snmpv3_securityname></snmpv3_securityname> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authpassphrase></snmpv3_authpassphrase> <snmpv3_privpassphrase></snmpv3_privpassphrase> <valuemapid>0</valuemapid> <applications> <application>IP.Board</application> </applications> </item> <item type="0" key="ipbGA.posts" value_type="3"> <description>New Posts (1h)</description> <ipmi_sensor></ipmi_sensor> <delay>3600</delay> <history>90</history> <trends>365</trends> <status>0</status> <data_type>0</data_type> <units></units> <multiplier>0</multiplier> <delta>0</delta> <formula>1</formula> <lastlogsize>0</lastlogsize> <logtimefmt></logtimefmt> <delay_flex></delay_flex> <authtype>0</authtype> <username></username> <password></password> <publickey></publickey> <privatekey></privatekey> <params></params> <trapper_hosts></trapper_hosts> <snmp_community></snmp_community> <snmp_oid></snmp_oid> <snmp_port>161</snmp_port> <snmpv3_securityname></snmpv3_securityname> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authpassphrase></snmpv3_authpassphrase> <snmpv3_privpassphrase></snmpv3_privpassphrase> <valuemapid>0</valuemapid> <applications> <application>IP.Board</application> </applications> </item> <item type="0" key="ipbGA.topics" value_type="3"> <description>New Topics (1h)</description> <ipmi_sensor></ipmi_sensor> <delay>3600</delay> <history>90</history> <trends>365</trends> <status>0</status> <data_type>0</data_type> <units></units> <multiplier>0</multiplier> <delta>0</delta> <formula>1</formula> <lastlogsize>0</lastlogsize> <logtimefmt></logtimefmt> <delay_flex></delay_flex> <authtype>0</authtype> <username></username> <password></password> <publickey></publickey> <privatekey></privatekey> <params></params> <trapper_hosts></trapper_hosts> <snmp_community></snmp_community> <snmp_oid></snmp_oid> <snmp_port>161</snmp_port> <snmpv3_securityname></snmpv3_securityname> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authpassphrase></snmpv3_authpassphrase> <snmpv3_privpassphrase></snmpv3_privpassphrase> <valuemapid>0</valuemapid> <applications> <application>IP.Board</application> </applications> </item> </items> <templates/> <graphs> <graph name="IPB Global stats" width="900" height="200"> <ymin_type>0</ymin_type> <ymax_type>0</ymax_type> <ymin_item_key></ymin_item_key> <ymax_item_key></ymax_item_key> <show_work_period>0</show_work_period> <show_triggers>0</show_triggers> <graphtype>0</graphtype> <yaxismin>0.0000</yaxismin> <yaxismax>100.0000</yaxismax> <show_legend>0</show_legend> <show_3d>0</show_3d> <percent_left>0.0000</percent_left> <percent_right>0.0000</percent_right> <graph_elements> <graph_element item="Template_IP.Board:ipbGA.members"> <drawtype>0</drawtype> <sortorder>0</sortorder> <color>009900</color> <yaxisside>0</yaxisside> <calc_fnc>2</calc_fnc> <type>0</type> <periods_cnt>5</periods_cnt> </graph_element> <graph_element item="Template_IP.Board:ipbGA.topics"> <drawtype>1</drawtype> <sortorder>1</sortorder> <color>3333FF</color> <yaxisside>0</yaxisside> <calc_fnc>2</calc_fnc> <type>0</type> <periods_cnt>5</periods_cnt> </graph_element> <graph_element item="Template_IP.Board:ipbGA.posts"> <drawtype>2</drawtype> <sortorder>2</sortorder> <color>AAAA00</color> <yaxisside>0</yaxisside> <calc_fnc>2</calc_fnc> <type>0</type> <periods_cnt>5</periods_cnt> </graph_element> </graph_elements> </graph> </graphs> <macros/> </host> </hosts> <dependencies/> </zabbix_export> UserParameters (in IPB server agent config file) UserParameter=ipbGA.posts, echo 'SELECT COUNT(*) from DDBB.PREFIX_posts where post_date > UNIX_TIMESTAMP( ) -3600;'| mysql -s -r -uUSER -pPasswD UserParameter=ipbGA.topics,echo 'SELECT COUNT(*) from DDBB.PREFIX_topics where start_date > UNIX_TIMESTAMP( ) -3600;'| mysql -s -r -uUSER -pPasswD UserParameter=ipbGA.members,echo 'SELECT COUNT(*) from DDBB.PREFIX_members where joined > UNIX_TIMESTAMP( ) -3600;'| mysql -s -r -uUSER -pPasswD Also be sure to modify how often this data is polled, it can be very intensive on some boards and, on a side note im getting starting with zabbix so i do not know how to be sure if this time is respected
Recommended Posts
Archived
This topic is now archived and is closed to further replies.