-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo.ini
273 lines (231 loc) · 6.16 KB
/
demo.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# Other config files may be included
#[import:baseconfig.ini]
[appdynamics]
app.name=eCommerce
agent.location=/appagent/javaagent.jar
# ${BASEDIR} = Environment variable BASEDIR
# classpath=${BASEDIR}/netflix.jar
classpath=./netflix.jar:./dbholder/lib/postgresql-9.4-1205.jdbc41.jar
logs.dir=./logs/agent/
#[app-agent-config]
# Update an agent config property NOTE use of colon
#service-property-change=TransactionMonitoringService:springbean.interceptors:com.appdynamics.flexibleapp.SpringServe
[generic]
# Do not generate dynamic node names use "localhost"
# if false, dynamic node names are generated using System.currentTimeMillis()
static.node.names=true
[pojo:mail]
class=javax.mail.Transport
method=send(javax.mail.Message)
params=subject
[pojo:mongofind]
class=com.mongodb.DBCollection
method=find
params=catalogue
[pojo:ehcache]
class=net.sf.ehcache.Cache
method=put
params=cname
[pojo:datacollector]
class=com.appdynamics.demo.DataCollector
method=getData
params=analyticsdata
# Registry server configuration
# Tiers and nodes will find each other using this server
# No agent runs on this server
[tier:dns]
server=localhost
port=8000
# Number of ports available
slots=900
# Starting port number
slot.start=7000
# Use static node names
node.static.name=localhost
# If the registry shuts down for some reason, restart it
restart.on.failure=true
# Important flag to recognize this tier as the "registry"
is.dns=true
# This is the tier that generates load
[tier:load]
num.of.worker.threads.per.node=2
# Have each thread do multiple calls (-1 to disable)
calls.per.worker.thread=-1
# millisec delay between load invocations
delay=200
is.load=true
wait.to.start=false
# This is my web tier
[tier:web]
# number of nodes on this tier
# nodes are accessed in a round-robin pattern
#start.with.agent=false
num.of.nodes=1
jvm.args=-Xmx512m
# this is my payment tier
[tier:pay]
num.of.nodes=1
jvm.args=-Xmx512m -Ddisable.node.debug.logs=false
# this is my order tier
[tier:order]
num.of.nodes=1
jvm.args=-Xmx512m
# this is my credit tier
[tier:credit]
num.of.nodes=1
jvm.args=-Xmx512m
# All these parameters are passed to every BT unless overridden
# & == parameter
# ! == header
[params:common]
# make real JSP for EUM
&renderjsp=true
&sleepn=50
&sleep1=10
&sleep2=10
&cname=mydata
&loglevel=info
&logmessage=authentication OK
&analyticsdata=list-file(etc/analytics-data.txt)
!myheader=MyCustomHeader
[params:normal]
# Run normal load for x minutes
#loop=1m
loop=1m
[params:slow]
# Run slow load for xx times
loop=20
&sleep1=1000
&sleep2=1000
&loglevel=error
&logmessage=Unable to authenticate, no providers
&doError=true
[params:vslow]
# Run slow load for xx times
loop=400
&sleep1=300
&sleep2=100
# second param of error may be throw or http
# error is only generated when specified param is not null
# exception param is the full class name of the exception to throw
# a message may optionally be included inside ()
# exceptions may be chained by separating them with -
# java.lang.RuntimeException-java.lang.NullPointerException
[bt:home]
http:web
busy:sleepn
ootb:mongofind
busy:sleep1
error:throw:{exception=java.lang.NumberFormatException(parsing foo888),params=doError}
[bt:catalogue]
http:web
rdb:postgres-local:{query=psql-select}
busy:sleepn
rdb:postgres-local:{query=psql-update}
busy:sleepn
ootb:ehcache
busy:sleepn
ootb:datacollector
[bt:pay]
http:web
http:pay:{method=POST}
db:sqlconfig1:{loop=5}
db:sqlconfig2
http:url1:{fake=true,sleep=sleepn}
busy:sleepn
busy:sleep1
[bt:Order]
http:web
busy:sleep1
http:order:{method=POST}
http:url2:{fake=true,sleep=350}
jms-send:OrderQ
ootb:mail
ootb:ehcache
jms-receive:OrderQ:credit
busy:sleep1
db:sqlconfig2
[bt:MyOrders]
http:web
ootb:mongofind
busy:sleep1
http:order:{method=POST}
busy:sleep2
# name is the name to log under Logger.getLogger(name)
# message is the text of the message to log
# level is the level to log at debug, error, fatal, info, trace warn
[bt:login]
http:web
db:sqlconfig1
log:mylogger:{name=com.ecommerce.login.AuthHandler,level=loglevel,message=logmessage}
[bt:logout]
http:web
busy:sleepn
# params may be evaluated $(param)
[url:url1]
url=http://www.paypal.com/$(cname)
[url:url2]
url=http://www.parcel.com/$(cname)
[jms-destination:OrderQ]
host=localhost
port=61616
# queue or topic
type=queue
[dbconfig:postgres-local]
user=stevew
password=demosim
driver=org.postgresql.Driver
url=jdbc:postgresql://localhost:5432/postcode
test.query=select 1
[query:psql-select]
type=statement
query=select xcoord, ycoord from postpntp where postcode = 'RG12 1WA'
[query:psql-update]
type=statement
query=update order_status set value = 'complete' where uuid = 1
[query:sqlconfig1]
type=statement
db.type=mysql
db.name=orderdb
query=select * from db where statement = true and something = $(exitcount) and sleep = $(sleep1)
[query:sqlconfig2]
type=prepared
db.type=mysql
db.name=orderdb
query=select * from db where a = ?, b = ?, c = ?, d = ?, e = ?, f = ?, g = ?, h = ?, i = ?, sleep = ?
params=1, 1, 1, 1, 1, 1, 1, 1, 1, $(sleep1)
#
# Logger
#
[logger:mylogger]
type=log4j
# Regular log4j config properties - PropertyConfigurator.configure()
# set root to DEBUG
log4j.rootLogger=DEBUG, A1
# A1 log to file
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.File=logs/product.log
log4j.appender.A1.MaxFileSize=500KB
log4j.appender.A1.MaxBackupIndex=1
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
# ISO 8601 format
# Add in request GUID
log4j.appender.A1.layout.ConversionPattern=%d [%t] [%X{AD.requestGUID}] %-5p %c - %m%n
# Java for MIDC for Analytics
[javasource:DataCollector:com.appdynamics.demo.DataCollector]
package com.appdynamics.demo;
public class DataCollector {
private String data;
public DataCollector() {
// System.out.println("DataCollector init");
}
// called by demosim after class init
public void appdy_init(String data) {
// System.out.println("DataCollector/appdy_init " + data);
this.data = data;
}
public String getData() {
// System.out.println("DataCollector/getData " + data);
return data;
}
}