Skip to content

Commit 89a35c9

Browse files
committed
Merge pull request jitlogic#86 from jitlogic/dev1
Prepare 0.9.4 release.
2 parents b36c23e + f0c2569 commit 89a35c9

File tree

19 files changed

+489
-69
lines changed

19 files changed

+489
-69
lines changed

CHANGES.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Zorka 0.9.4 (2013-04-02)
2+
------------------------
3+
4+
* unify argument ordering of Spy;
5+
* sample JDBC script for PostgreSQL (long queries, trace attrs, stats);
6+
* refactor zorka-common+zorka-agent -> zorka-core+zorka-agent;
7+
* bugfixes;
8+
19
Zorka 0.9.3 (2013-03-23)
210
------------------------
311

configs/zabbix/scripts/jboss.bsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ __jboss() {
171171
} // __mbsRegister()
172172

173173
spy.add(spy.instance()
174-
.onReturn(spy.fetchArg("MBS", 0), (com.jitlogic.zorka.agent.spy.SpyProcessor)__mbsRegister())
174+
.onReturn(spy.fetchArg("MBS", 0), (com.jitlogic.zorka.core.spy.SpyProcessor)__mbsRegister())
175175
.include(spy.byMethod("org.jboss.mx.server.MBeanServerImpl", "<init>")));
176176

177177
if (zorka.boolCfg("tracer", false)) {

configs/zabbix/scripts/jboss7.bsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ __jboss7() {
140140

141141

142142
spy.add(spy.instance()
143-
.onReturn((com.jitlogic.zorka.agent.spy.SpyProcessor)__mbsRegister())
143+
.onReturn((com.jitlogic.zorka.core.spy.SpyProcessor)__mbsRegister())
144144
.include(spy.byMethod(spy.AC_STATIC, "org.jboss.modules.ModuleLoader", "installMBeanServer", "void")));
145145

146146

configs/zabbix/scripts/pgsql.bsh

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
/**
3+
* Copyright 2012 Rafal Lewczuk <[email protected]>
4+
*
5+
* ZORKA is free software. You can redistribute it and/or modify it under the
6+
* terms of the GNU General Public License as published by the Free Software
7+
* Foundation, either version 3 of the License, or (at your option) any later
8+
* version.
9+
*
10+
* ZORKA is distributed in the hope that it will be useful, but WITHOUT ANY
11+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13+
* details.
14+
*
15+
* You should have received a copy of the GNU General Public License along with
16+
* ZORKA. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
__pgsql() {
20+
21+
lq = zorka.boolCfg("jdbc.lq", false);
22+
lqt = zorka.boolCfg("jdbc.lq.trace", zorka.boolCfg("tracer", false));
23+
24+
lqtime = zorka.longCfg("jdbc.lq.time", 5000);
25+
mbean = zorka.stringCfg("jdbc.mbean", "zorka:type=ZorkaStats,name=PgsqlStats");
26+
27+
discovery() {
28+
return zabbix.discovery(zorka.query("java", mbean, "name", "type").get("stats").listAs("**", "DB"));
29+
}
30+
31+
lqTrapper = zorka.rollingFileTrapper("jdbc.lq", "INFO",
32+
zorka.stringCfg("jdbc.lq.path", zorka.path("${zorka.log.dir}", "long_query.log")),
33+
zorka.intCfg("jdbc.lq.fnum", 8), zorka.kiloCfg("jdbc.lq.size", 8*1024*1024), true);
34+
35+
spy.add(spy.instrument()
36+
.onEnter(spy.fetchArg("THIS", 0), spy.fetchArg("SQL", 1), lqt ? tracer.attr("SQL", "SQL") : null)
37+
.onError(spy.fetchError("E"))
38+
.onSubmit(spy.zorkaStats("java", mbean, "stats", "${THIS.connection.creatingURL}"),
39+
spy.longerThan(lqtime),
40+
lq ? spy.trapperCollector(lqTrapper, zorka.INFO, "${THIS.connection.creatingURL}",
41+
"OK [E] [T=${T}] SQL=${SQL}", "ERROR [E] [T=${T}] SQL=${SQL}\n${E}", "E") : null)
42+
.include(
43+
spy.byMethod(0, "org.postgresql.jdbc2.AbstractJdbc2Statement", "execute*", null, "String"),
44+
spy.byMethod(0, "org.postgresql.jdbc3.AbstractJdbc3Statement", "execute*", null, "String")));
45+
46+
47+
spy.add(spy.instrument()
48+
.onEnter(spy.fetchArg("THIS", 0), spy.format("SQL", "${THIS.preparedQuery}"), lqt ? tracer.attr("SQL", "SQL") : null)
49+
.onError(spy.fetchError("E"))
50+
.onSubmit(spy.zorkaStats("java", mbean, "stats", "${THIS.connection.creatingURL}"),
51+
spy.longerThan(lqtime),
52+
lq ? spy.trapperCollector(lqTrapper, zorka.INFO, "${THIS.connection.creatingURL}",
53+
"OK [E] [T=${T}] SQL=${SQL}", "ERROR [E] [T=${T}] SQL=${SQL}\n${E}", "E") : null)
54+
.include(
55+
spy.byMethod(0, "org.postgresql.jdbc2.AbstractJdbc2Statement", "execute*", null, spy.SM_NOARGS),
56+
spy.byMethod(0, "org.postgresql.jdbc3.AbstractJdbc3Statement", "execute*", null, spy.SM_NOARGS)
57+
));
58+
59+
return this;
60+
}
61+
62+
63+
pgsql = __pgsql();
64+

configs/zabbix/scripts/wso2.bsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ __wso2() {
3838

3939
spy.add(spy.instance()
4040
.onReturn(spy.fetchRetVal("PARAM"),
41-
(com.jitlogic.zorka.agent.spy.SpyProcessor)__carbonOSGiConfigurer())
41+
(com.jitlogic.zorka.core.spy.SpyProcessor)__carbonOSGiConfigurer())
4242
.include(spy.byMethod(spy.AC_PRIVATE, "org.wso2.carbon.server.CarbonLauncher",
4343
"buildInitialPropertyMap", "java.util.Map")));
4444

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<zabbix_export>
3+
<version>2.0</version>
4+
<date>2013-04-02T11:35:42Z</date>
5+
<groups>
6+
<group>
7+
<name>Templates</name>
8+
</group>
9+
</groups>
10+
<templates>
11+
<template>
12+
<template>Template_Zorka_PGSQL</template>
13+
<name>Template_Zorka_PGSQL</name>
14+
<groups>
15+
<group>
16+
<name>Templates</name>
17+
</group>
18+
</groups>
19+
<applications>
20+
<application>
21+
<name>SQL Stats</name>
22+
</application>
23+
</applications>
24+
<items/>
25+
<discovery_rules>
26+
<discovery_rule>
27+
<name>SQL Catalogs</name>
28+
<type>0</type>
29+
<snmp_community/>
30+
<snmp_oid/>
31+
<key>pgsql.discovery[]</key>
32+
<delay>60</delay>
33+
<status>0</status>
34+
<allowed_hosts/>
35+
<snmpv3_securityname/>
36+
<snmpv3_securitylevel>0</snmpv3_securitylevel>
37+
<snmpv3_authpassphrase/>
38+
<snmpv3_privpassphrase/>
39+
<delay_flex/>
40+
<params/>
41+
<ipmi_sensor/>
42+
<authtype>0</authtype>
43+
<username/>
44+
<password/>
45+
<publickey/>
46+
<privatekey/>
47+
<port/>
48+
<filter>:</filter>
49+
<lifetime>30</lifetime>
50+
<description/>
51+
<item_prototypes>
52+
<item_prototype>
53+
<name>{#DB} SQL calls</name>
54+
<type>0</type>
55+
<snmp_community/>
56+
<multiplier>1</multiplier>
57+
<snmp_oid/>
58+
<key>zorka.jmx[&quot;java&quot;, &quot;zorka.jdbc:name={#NAME},type={#TYPE}&quot;, &quot;stats&quot;, &quot;{#DB}&quot;, &quot;calls&quot;]</key>
59+
<delay>60</delay>
60+
<history>10</history>
61+
<trends>365</trends>
62+
<status>0</status>
63+
<value_type>0</value_type>
64+
<allowed_hosts/>
65+
<units>calls/min</units>
66+
<delta>1</delta>
67+
<snmpv3_securityname/>
68+
<snmpv3_securitylevel>0</snmpv3_securitylevel>
69+
<snmpv3_authpassphrase/>
70+
<snmpv3_privpassphrase/>
71+
<formula>60</formula>
72+
<delay_flex/>
73+
<params/>
74+
<ipmi_sensor/>
75+
<data_type>0</data_type>
76+
<authtype>0</authtype>
77+
<username/>
78+
<password/>
79+
<publickey/>
80+
<privatekey/>
81+
<port/>
82+
<description/>
83+
<inventory_link>0</inventory_link>
84+
<applications>
85+
<application>
86+
<name>SQL Stats</name>
87+
</application>
88+
</applications>
89+
<valuemap/>
90+
</item_prototype>
91+
<item_prototype>
92+
<name>{#DB} SQL errors</name>
93+
<type>0</type>
94+
<snmp_community/>
95+
<multiplier>1</multiplier>
96+
<snmp_oid/>
97+
<key>zorka.jmx[&quot;java&quot;, &quot;zorka.jdbc:name={#NAME},type={#TYPE}&quot;, &quot;stats&quot;, &quot;{#DB}&quot;, &quot;errors&quot;]</key>
98+
<delay>60</delay>
99+
<history>10</history>
100+
<trends>365</trends>
101+
<status>0</status>
102+
<value_type>0</value_type>
103+
<allowed_hosts/>
104+
<units>errors/min</units>
105+
<delta>1</delta>
106+
<snmpv3_securityname/>
107+
<snmpv3_securitylevel>0</snmpv3_securitylevel>
108+
<snmpv3_authpassphrase/>
109+
<snmpv3_privpassphrase/>
110+
<formula>60</formula>
111+
<delay_flex/>
112+
<params/>
113+
<ipmi_sensor/>
114+
<data_type>0</data_type>
115+
<authtype>0</authtype>
116+
<username/>
117+
<password/>
118+
<publickey/>
119+
<privatekey/>
120+
<port/>
121+
<description/>
122+
<inventory_link>0</inventory_link>
123+
<applications>
124+
<application>
125+
<name>SQL Stats</name>
126+
</application>
127+
</applications>
128+
<valuemap/>
129+
</item_prototype>
130+
<item_prototype>
131+
<name>{#DB} SQL execution time (AVG5)</name>
132+
<type>0</type>
133+
<snmp_community/>
134+
<multiplier>1</multiplier>
135+
<snmp_oid/>
136+
<key>zorka.rate[&quot;java&quot;, &quot;zorka.jdbc:name={#NAME},type={#TYPE}&quot;, &quot;stats&quot;, &quot;{#DB}&quot;, &quot;time&quot;, &quot;calls&quot;, &quot;AVG5&quot;]</key>
137+
<delay>55</delay>
138+
<history>10</history>
139+
<trends>365</trends>
140+
<status>0</status>
141+
<value_type>0</value_type>
142+
<allowed_hosts/>
143+
<units>s</units>
144+
<delta>0</delta>
145+
<snmpv3_securityname/>
146+
<snmpv3_securitylevel>0</snmpv3_securitylevel>
147+
<snmpv3_authpassphrase/>
148+
<snmpv3_privpassphrase/>
149+
<formula>0.001</formula>
150+
<delay_flex/>
151+
<params/>
152+
<ipmi_sensor/>
153+
<data_type>0</data_type>
154+
<authtype>0</authtype>
155+
<username/>
156+
<password/>
157+
<publickey/>
158+
<privatekey/>
159+
<port/>
160+
<description/>
161+
<inventory_link>0</inventory_link>
162+
<applications>
163+
<application>
164+
<name>SQL Stats</name>
165+
</application>
166+
</applications>
167+
<valuemap/>
168+
</item_prototype>
169+
<item_prototype>
170+
<name>{#DB} SQL execution time (AVG15)</name>
171+
<type>0</type>
172+
<snmp_community/>
173+
<multiplier>1</multiplier>
174+
<snmp_oid/>
175+
<key>zorka.rate[&quot;java&quot;, &quot;zorka.jdbc:name={#NAME},type={#TYPE}&quot;, &quot;stats&quot;, &quot;{#DB}&quot;, &quot;time&quot;, &quot;calls&quot;, &quot;AVG15&quot;]</key>
176+
<delay>160</delay>
177+
<history>10</history>
178+
<trends>365</trends>
179+
<status>0</status>
180+
<value_type>0</value_type>
181+
<allowed_hosts/>
182+
<units>s</units>
183+
<delta>0</delta>
184+
<snmpv3_securityname/>
185+
<snmpv3_securitylevel>0</snmpv3_securitylevel>
186+
<snmpv3_authpassphrase/>
187+
<snmpv3_privpassphrase/>
188+
<formula>0.001</formula>
189+
<delay_flex/>
190+
<params/>
191+
<ipmi_sensor/>
192+
<data_type>0</data_type>
193+
<authtype>0</authtype>
194+
<username/>
195+
<password/>
196+
<publickey/>
197+
<privatekey/>
198+
<port/>
199+
<description/>
200+
<inventory_link>0</inventory_link>
201+
<applications>
202+
<application>
203+
<name>SQL Stats</name>
204+
</application>
205+
</applications>
206+
<valuemap/>
207+
</item_prototype>
208+
<item_prototype>
209+
<name>{#DB} SQL peak time</name>
210+
<type>0</type>
211+
<snmp_community/>
212+
<multiplier>1</multiplier>
213+
<snmp_oid/>
214+
<key>zorka.jmx[&quot;java&quot;, &quot;zorka.jdbc:name={#NAME},type={#TYPE}&quot;, &quot;stats&quot;, &quot;{#DB}&quot;, &quot;maxTimeCLR&quot;]</key>
215+
<delay>60</delay>
216+
<history>10</history>
217+
<trends>365</trends>
218+
<status>0</status>
219+
<value_type>0</value_type>
220+
<allowed_hosts/>
221+
<units>s</units>
222+
<delta>0</delta>
223+
<snmpv3_securityname/>
224+
<snmpv3_securitylevel>0</snmpv3_securitylevel>
225+
<snmpv3_authpassphrase/>
226+
<snmpv3_privpassphrase/>
227+
<formula>0.001</formula>
228+
<delay_flex/>
229+
<params/>
230+
<ipmi_sensor/>
231+
<data_type>0</data_type>
232+
<authtype>0</authtype>
233+
<username/>
234+
<password/>
235+
<publickey/>
236+
<privatekey/>
237+
<port/>
238+
<description/>
239+
<inventory_link>0</inventory_link>
240+
<applications>
241+
<application>
242+
<name>SQL Stats</name>
243+
</application>
244+
</applications>
245+
<valuemap/>
246+
</item_prototype>
247+
</item_prototypes>
248+
<trigger_prototypes/>
249+
<graph_prototypes/>
250+
</discovery_rule>
251+
</discovery_rules>
252+
<macros/>
253+
<templates/>
254+
<screens/>
255+
</template>
256+
</templates>
257+
</zabbix_export>

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<groupId>com.jitlogic.zorka</groupId>
44
<artifactId>zorka</artifactId>
55
<packaging>pom</packaging>
6-
<version>0.9.4-SNAPSHOT</version>
6+
<version>0.9.4</version>
77
<name>zorka: parent aggregator</name>
88
<url>http://www.jitlogic.com/zorka</url>
99

zorka-agent/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>zorka</artifactId>
77
<groupId>com.jitlogic.zorka</groupId>
8-
<version>0.9.4-SNAPSHOT</version>
8+
<version>0.9.4</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

0 commit comments

Comments
 (0)