YouTube2Text

Session - 8- Datadog APM Monitor Java Application using Tomcat - Part1 — Transcript

by AiOps School · 6,670 words · 1,034 segments · language en · Watch on YouTube

Full transcript

  1. 0:00foreign
  2. 0:00[Music]
  3. 0:10School in this video tutorial we are
  4. 0:13going to learn about data dog
  5. 0:15but before we begin let me inform you
  6. 0:18few things about us devops school is one
  7. 0:20of the leading platform which offers
  8. 0:22devops cloud and containers technology
  9. 0:24training and certification programs for
  10. 0:26freshers and established professionals
  11. 0:27who wish to update and consolidate their
  12. 0:29skills in the dynamic it scenario we
  13. 0:31ensure that the training Solutions are
  14. 0:33delivered by highly experienced domain
  15. 0:35experts with practical working
  16. 0:36experience in various verticals check
  17. 0:39out the dates and enroll with us for our
  18. 0:40upcoming batches for more info link and
  19. 0:43contact details are mentioned in the
  20. 0:44description below so question is how to
  21. 0:46set up APM monitoring for Java based
  22. 0:49application but inner Linux so first
  23. 0:51thing our app server will be Tomcat
  24. 0:53install Tomcat install tomcat and
  25. 0:57start talking
  26. 0:59okay that's the step number two one step
  27. 1:02number two
  28. 1:03you will do you will do install
  29. 1:08data dock
  30. 1:10APM agent
  31. 1:13okay mind it I said APM with intention
  32. 1:16this agent is different okay so now step
  33. 1:19two you will have to do this uh let's
  34. 1:22make it step one here step two
  35. 1:26and this make it step three so step two
  36. 1:29what step one what you have to do
  37. 1:30install data.g so guys there is a
  38. 1:33difference between the datadog agent and
  39. 1:36datadog APM agent so here I said very
  40. 1:39clearly APM agent will be a code
  41. 1:41actually and this agent which is nothing
  42. 1:44but the tools which is running as a
  43. 1:46demon correct now
  44. 1:48I hope you remember all of you
  45. 1:51yes yes so this is the install datadog
  46. 1:54APM agent fourth one step four uh uh
  47. 1:59install deploy deploy one app one app uh
  48. 2:05in Tomcat okay because remember that
  49. 2:09traffic will be generated against the
  50. 2:11app only right so you have to deploy one
  51. 2:13app in the Tomcat step number five
  52. 2:17generate traffic
  53. 2:19generate traffic now this is challenging
  54. 2:23because you know you know guys uh if you
  55. 2:25generate 5 20 30 traffic 30 times if you
  56. 2:28click or 100 times if you click then
  57. 2:31nothing is going to happen none of the
  58. 2:33graphs will be filled properly you will
  59. 2:35not be able to enjoy the real time
  60. 2:37experience and all so what we do in this
  61. 2:39case so in this case I am going to
  62. 2:41generate traffic using J meter
  63. 2:45okay so now this J meter is Apache
  64. 2:48product it's a free open source everyone
  65. 2:50uses for the performance testing so I'll
  66. 2:53be using J meter now we'll say Rajesh I
  67. 2:56don't know the J meter I don't have a
  68. 2:57setup this that and all and it might it
  69. 2:59might require lots of time to set up so
  70. 3:01what do we do in this case so are you
  71. 3:03going to set up a j meter yes those who
  72. 3:05are interested to set up a j meter you
  73. 3:07can do that but I can help you here
  74. 3:09because I have a j meter
  75. 3:12I have a j meter uh in my machine so I
  76. 3:16will use your IP address to generate a
  77. 3:18traffic for you because all IP address
  78. 3:19is a public IP address accessible around
  79. 3:22the globe so I can also generate a
  80. 3:24traffic for you also and for my cell
  81. 3:26phones
  82. 3:27step 5 all of you are okay with it
  83. 3:34yes
  84. 3:35okay and then finally step six and this
  85. 3:38is a major work actually learning
  86. 3:41learning APM dashboard APM dashboard
  87. 3:45this is a major work remember that what
  88. 3:48was your objective in APM discussion
  89. 3:50which request which requests the
  90. 3:54response is more than what is your
  91. 3:57threshold and you need to find out track
  92. 3:59that request and find out the reason for
  93. 4:02it why
  94. 4:04this particular response time for this
  95. 4:06particular request is taking more than
  96. 4:08this type
  97. 4:10so learning APM dashboard and that's the
  98. 4:12last one so if your pseudo code is
  99. 4:15confirmed if you understood that then I
  100. 4:17would like to set some visualization in
  101. 4:19your mind also so during the them lab
  102. 4:22you will not forget so here I am not
  103. 4:25doing anything great this is my Linux
  104. 4:28box and then I am installing Java here
  105. 4:32okay Java so here for Tomcat you need to
  106. 4:35have a Java also and then third thing
  107. 4:38I'm installing the Tomcat here
  108. 4:41so this is my Linux machine
  109. 4:45this is my Linux machine this is the
  110. 4:48Java GRE
  111. 4:49W Java runtime environment
  112. 4:51okay and this is the tomcat and my
  113. 4:54applications will be run by Tomcat now
  114. 4:57uh this is my applications I'll make it
  115. 5:01round okay and this is your applications
  116. 5:05okay so here you have to install the
  117. 5:08data doc agent so data dog agent will be
  118. 5:12installed at the Linux level which you
  119. 5:14have it you've done it and then uh APM
  120. 5:17agent I need to install at the Tomcat
  121. 5:19level so this is a tomcat level this is
  122. 5:22the APM agent I'll change the color APM
  123. 5:25agent
  124. 5:28a this is the data dog API region so now
  125. 5:31what will happen you know what this is
  126. 5:33the traffic which is coming from outside
  127. 5:35and they will hit the Tomcat at Port
  128. 5:38number so any request
  129. 5:42which is against the applications the
  130. 5:44response will be generated and this guy
  131. 5:47will be capturing everything and sending
  132. 5:50this to
  133. 5:51agent which is running in the same
  134. 5:53machine and after that this agent will
  135. 5:55set to datadog and you
  136. 5:59this is you you will analyze all the
  137. 6:02traffic and see that which is a problem
  138. 6:05where is a problem is not a problem
  139. 6:07understood this whole flow
  140. 6:13yes yeah so this is setup I am trying to
  141. 6:17do that so now that for that where is
  142. 6:20the instructions so why this pop-up is
  143. 6:22not going
  144. 6:24anyone have idea this from the top how
  145. 6:26can we move to the left or right this
  146. 6:28pop-up
  147. 6:30I'm really getting annoyed sometimes
  148. 6:34let me find out Solutions Okay small
  149. 6:37dots uh from there you can move them
  150. 6:39watch option
  151. 6:40or there will be small dots yeah I I
  152. 6:43tried many times actually let me see
  153. 6:46that just saying give me two seconds
  154. 6:47View
  155. 6:49I died option should be there
  156. 6:56okay not coming
  157. 6:58okay so yeah so it has gone now so here
  158. 7:04guys this is the tutorial so first thing
  159. 7:07how to install agent you know that
  160. 7:10how to install Jr Java so guys uh one
  161. 7:13request uh this Java I want you to stall
  162. 7:1811 okay so now what I'll I'll do I'll
  163. 7:21not ask you to change that because many
  164. 7:24of you will run the command blindly so
  165. 7:26Java install so because you are using
  166. 7:30Centos
  167. 7:32right now so I can immediately say this
  168. 7:36command will work for you
  169. 7:38and this is the command okay so now I'm
  170. 7:41not going to request namely I should
  171. 7:43change this
  172. 7:47hmm
  173. 7:49this is for send twice this will work
  174. 7:52for Centos one
  175. 7:54sentence and for
  176. 7:58Ubuntu let me let's say if you want to
  177. 8:00try in future then this command will
  178. 8:03work for Ubuntu
  179. 8:05in this command
  180. 8:09okay so I'm just changing don't run
  181. 8:11command blindly and done
  182. 8:14okay so now eight is a for the latest
  183. 8:18version of Tomcat is a problematic so I
  184. 8:21don't want to face the error for that I
  185. 8:23change the Java so okay so this is
  186. 8:25command I will install to install the
  187. 8:27Java now this command uh this section
  188. 8:30will help you to install the Tomcat okay
  189. 8:33now here is a problem
  190. 8:35this command is a problem what problem
  191. 8:37so guys this command basically you know
  192. 8:40what uh this URL of Tomcat it always
  193. 8:44changes actually because of mirror
  194. 8:46changes and all it always changes so
  195. 8:49this URL will not work I know that so
  196. 8:51what you need to do you need to go every
  197. 8:54week you have to change this URL so you
  198. 8:57have to go to this and you have to tell
  199. 8:59what is a new URL so how do you get a
  200. 9:01new URL here it is this is the one of
  201. 9:04the way to get the new URL copy and in
  202. 9:07fact I'm modifying for all of you not
  203. 9:10only guiding but modifying because
  204. 9:13you will blindly run this command and
  205. 9:15you will end up this error so here this
  206. 9:18command
  207. 9:20this changes this URL cannot be fixed so
  208. 9:23you have to have that knowledge
  209. 9:27so here this is my uo command and this
  210. 9:32is my
  211. 9:34replacement
  212. 9:35and here done
  213. 9:38now because this URL will change so this
  214. 9:41URL will also change okay so here what
  215. 9:44you are doing let me explain you the
  216. 9:46command here you are downloading the
  217. 9:49duplicate installing the wget and unzip
  218. 9:51utility after that going to the opt
  219. 9:54after the downloading the package and
  220. 9:56after that unzipping the package are you
  221. 9:59comfortable with these commands
  222. 10:02yes okay now after that you have to go
  223. 10:05to the data doc site okay and data
  224. 10:08Dockside this part I'll show you that
  225. 10:10this part I'll show the demo after that
  226. 10:13this process is basically to install the
  227. 10:16APM agent download DD Java agent so this
  228. 10:21is jar file why because I am using Java
  229. 10:24project but if you use the some other
  230. 10:25different technology you have a
  231. 10:27different different uh packages for API
  232. 10:29major so now where is storing in opt and
  233. 10:33giving her permission so this is going
  234. 10:34to opt downloading the Java APM and
  235. 10:38giving this executable permission okay
  236. 10:40so this is the step number four after
  237. 10:43that you need to inform this is a very
  238. 10:46important steps okay and these steps you
  239. 10:48can do if you know Java and Tomcat you
  240. 10:51can know you can do five different ways
  241. 10:53but this is the one of the easiest way I
  242. 10:56am writing it so what you have to do you
  243. 10:59have to go to this file
  244. 11:01now we'll say immediately you will run
  245. 11:04this command and you want to go to this
  246. 11:05file then you say Rajesh this command is
  247. 11:08not working so basically you change the
  248. 11:10directory here so you have to change
  249. 11:13everywhere
  250. 11:15you have to change everywhere so this
  251. 11:17directory will be the new directory and
  252. 11:19after that you have to modify this code
  253. 11:21and after that this command you need to
  254. 11:24run somewhere in the top of the file of
  255. 11:26that linear.sh now we say Rajesh what
  256. 11:29exactly I am adding this code so you
  257. 11:31know guys this is the real
  258. 11:34code where you are informing your Tomcat
  259. 11:37or Java saying that hey add this APM
  260. 11:42agent in the runtime because remember
  261. 11:44that if you do not add this APM in the
  262. 11:47runtime then whatever the traffic is
  263. 11:49coming to the Tomcat an application this
  264. 11:51guy will not be able to come to know
  265. 11:52this is called setting up in the class
  266. 11:53path if you know the other Java a little
  267. 11:55bit so are you comfortable with this all
  268. 11:57of you
  269. 12:03hello
  270. 12:05yeah so I am saying uh this is a IPM jar
  271. 12:09but you need to set in the Tomcat
  272. 12:11environment so that runtime it can
  273. 12:13detect your application traffic and for
  274. 12:15that this is the one of the approach
  275. 12:17modify this file put this line and it
  276. 12:20will be added now what you are adding so
  277. 12:22this is the path of the jar file which
  278. 12:24you downloaded here
  279. 12:26look at this okay so you downloaded
  280. 12:32here under opt now what you are saying
  281. 12:36profiling enabled logs enabled
  282. 12:39Trace enabled what is the name of the
  283. 12:42service service you can name it whatever
  284. 12:44you want an environment this service and
  285. 12:46environment user application name
  286. 12:48and between which environment is running
  287. 12:50after that you are going to start the
  288. 12:53Tomcat so how do we start the Tomcat so
  289. 12:56here
  290. 12:58change the path
  291. 13:00this is the location you'll go give the
  292. 13:03full permission
  293. 13:04startup.sh and validate if you are
  294. 13:07getting the the files like this digital
  295. 13:10agent in the output
  296. 13:12then go to the website which is 8080
  297. 13:14example applications and then your
  298. 13:18application up and running and finally
  299. 13:21generate a traffic
  300. 13:23so application I'll talk about the some
  301. 13:25perspective here but did you understand
  302. 13:27all these steps steps
  303. 13:32so let me do that so guys I'm doing
  304. 13:35little slow
  305. 13:36but please focus on it
  306. 13:39so let's start with it agent
  307. 13:41installation is done or not so done
  308. 13:43where is my machine by the way my
  309. 13:45machine
  310. 13:47IP address
  311. 14:01this is my machine okay
  312. 14:02so
  313. 14:05I'll write it somewhere here
  314. 14:11decision so let's log into this
  315. 14:19Earth
  316. 14:32so it starts I'm going to stops all your
  317. 14:35machine stops at 5 PM so can't we have
  318. 14:38our own machines through our AWS account
  319. 14:41and we can use our key to practice
  320. 14:43everything
  321. 14:45uh yes this is possible you can have
  322. 14:47your own account also AWS will if you
  323. 14:51create your own account then minimum
  324. 14:53configuration you can get it from them
  325. 14:55also like this some of them are free but
  326. 14:58if you by mistake if you go for a little
  327. 15:00bit higher configuration then
  328. 15:02automatically everything mentioned in
  329. 15:04there right what is chargeable and what
  330. 15:06is not chargeable so
  331. 15:09uh yes if you that's what I said if you
  332. 15:12are comfortable with it then you can go
  333. 15:15ahead and register your your own account
  334. 15:17that's not a problem
  335. 15:19thank you yeah uh you have a if if you
  336. 15:23have a new credit card and you can use a
  337. 15:25new email ID so then in that case you
  338. 15:28will get a 12 months free but but only
  339. 15:32the basic one which you can use for AWS
  340. 15:34not for running any application
  341. 15:36okay because the RAM and CPU is very
  342. 15:40less so you cannot run any application
  343. 15:41but you can learn AWS for sure so but if
  344. 15:45you go for the little higher
  345. 15:46configuration then you have to pay for
  346. 15:48it to recharge you uh on your credit
  347. 15:51card at the end of the month per hour
  348. 15:53basis they charge you
  349. 15:58okay so here
  350. 16:03uh so this is the machine so first thing
  351. 16:06did we install the datadog agent
  352. 16:10so installation done after the Tomcat so
  353. 16:13I am following the same command so that
  354. 16:15way also I'll be keeping validated all
  355. 16:18commands are working as as per the
  356. 16:22things or not and in front of you I am
  357. 16:23doing it so there should not be any
  358. 16:25problem so first thing I am going to
  359. 16:27install the because my machine is sent
  360. 16:29to us I'm going to show all the open GDP
  361. 16:31so for that
  362. 16:34because I'm a root I can install
  363. 16:35anything
  364. 17:02okay so now this is the
  365. 17:05sent to us after that this is done after
  366. 17:09that I have to download the Tomcat so
  367. 17:12let's let me install first this utility
  368. 17:14clear the screen
  369. 17:17and did I make a mistake see there is a
  370. 17:20mistake here
  371. 17:22so mistake is
  372. 17:24apt this will this command will work in
  373. 17:26the Ubuntu not incent to us so what you
  374. 17:29need to do anyone have that idea
  375. 17:34anyone have idea
  376. 17:37is it called
  377. 17:39not girl you can just change this this
  378. 17:42is in Ubuntu it will work in Ubuntu
  379. 17:45for send to us it's just young we have
  380. 17:48been doing from last two days right
  381. 17:51yum
  382. 17:54different utilities
  383. 17:56for the different operating systems this
  384. 17:59is our thanks so this is sentos I will
  385. 18:02install this command
  386. 18:05and
  387. 18:08now after that I'll go into the ctopt
  388. 18:12clear the screen
  389. 18:13now I will download this URL this URL
  390. 18:16will be active for today at least okay
  391. 18:18so that's a good thing
  392. 18:21now you see that here
  393. 18:25it's got downloaded very fast so I am
  394. 18:27not able to digest it just give me
  395. 18:29videos
  396. 18:30yeah this is good so yes I download it
  397. 18:33actually
  398. 18:34so
  399. 18:35that is done after that I am going to
  400. 18:38unzip it so this command will help me
  401. 18:41unjust and now if you see that LS see
  402. 18:44this is the zip file which I injected
  403. 18:46this one so I got this so This step is
  404. 18:49clear all of you
  405. 18:52yes okay now after this I'll go to the
  406. 18:56APM website API means
  407. 18:58um data dog website so where is the data
  408. 19:01dog website here it is
  409. 19:03login
  410. 19:07and here I have a two machines so find
  411. 19:11out this place this is for eBay Watchdog
  412. 19:14this for you friends this is for
  413. 19:16dashboard this is for infrastructure
  414. 19:19this is for alerting monitoring and all
  415. 19:21this is for Matrix exploration this for
  416. 19:24integration this is for Apu did you see
  417. 19:27after integration you have again
  418. 19:33hello yes yes yeah I'm just asking
  419. 19:37multiple times uh you some of you might
  420. 19:40get irritated but you know what uh this
  421. 19:43questions will come back to me so I'm
  422. 19:46just feeding that uh with intention
  423. 19:48saying that you see you must see that so
  424. 19:51some of you are if you are not focusing
  425. 19:52then you must see that so that's the
  426. 19:54reason so some of you if you're feeling
  427. 19:56irritation uh please forgive me for that
  428. 19:58so yeah so APM Services service map
  429. 20:03traces error tracking profiles many
  430. 20:06things are there so this is a APN so can
  431. 20:09we click on this APM service catalog or
  432. 20:12this this this has come newly actually
  433. 20:14okay so click on services
  434. 20:18and here you see that I don't have any
  435. 20:21Services right now actually if I go for
  436. 20:23the little bit more uh days and all
  437. 20:26maybe week or month I'll have some
  438. 20:28services but I don't want to show that
  439. 20:30services to you because that's a past of
  440. 20:32part of last session
  441. 20:34so there's no services
  442. 20:36so guys get comfortable
  443. 20:39now you need to when you are in the
  444. 20:42world of APM you should be very very
  445. 20:45much expert in the runtime environment
  446. 20:47okay runtime because if you cannot do in
  447. 20:51simple way you cannot do APM without
  448. 20:53knowledge of runtime environment like
  449. 20:56app server web server database server
  450. 20:58language is run and GRE jvm python
  451. 21:01virtual virtual and virtual environment
  452. 21:04and also if you think you cannot because
  453. 21:06it required because I said right it runs
  454. 21:08with a code level okay so now these are
  455. 21:11the filters actually grid filters are
  456. 21:13available if you have too many services
  457. 21:15right now I have none but in reality you
  458. 21:17know what you'll have hundreds of
  459. 21:19services hundreds I said some of them
  460. 21:22will be web services some of them will
  461. 21:24be database Services some of them will
  462. 21:26be cache like mm memcache and all some
  463. 21:28of them will be function function means
  464. 21:30anyone what what does that mean function
  465. 21:34foreign
  466. 21:41function means have you heard about this
  467. 21:43Lambda serverless
  468. 21:46anyone
  469. 21:48no we heard him AWS yes yes AWS Lambda
  470. 21:52serverless yes that's the function I am
  471. 21:54talking about and here we are talking
  472. 21:56about end custom so these are the type
  473. 21:58of applications right now my application
  474. 21:59is uh is a tomcat which is a web-based
  475. 22:03application so what to do so I'll go and
  476. 22:05right side you see there's an option
  477. 22:07called add services but you know what
  478. 22:09for you you not have this one uh you
  479. 22:12will have a get started options
  480. 22:13something like this
  481. 22:16uh get started here this option you will
  482. 22:19have it by default when you click on the
  483. 22:21services no this page you will get it
  484. 22:23this page
  485. 22:24yes so this is the starting page
  486. 22:27actually for the new account but mine is
  487. 22:29not new account few days older account
  488. 22:31so I have already used for the EPM so
  489. 22:33for me when I click on the services then
  490. 22:36I'll have this account so I can click on
  491. 22:38the add services and it will take me to
  492. 22:40the same page actually see
  493. 22:42okay so don't get confused now here
  494. 22:47now they are asking you hey your
  495. 22:50application is running on host or
  496. 22:52container or serverless so by the way
  497. 22:55can you please help me which one I
  498. 22:56should select where is my application is
  499. 22:58running
  500. 22:59post host so you may so guys steps will
  501. 23:03change for the container and serverless
  502. 23:05mind it in fact each programming
  503. 23:07language is different different steps
  504. 23:09are there so I will select the host base
  505. 23:12now they'll ask you hey have you
  506. 23:14installed the agent and all so yes we
  507. 23:16all did it so that's okay and please
  508. 23:19read it be slow don't rush step number
  509. 23:21one step number two and like that now
  510. 23:24they're asking you hey what is your
  511. 23:25programming language for which you want
  512. 23:28to set up APN of course we know that
  513. 23:30Java but here if someone is curious to
  514. 23:33know what are the support so your python
  515. 23:35Ruby go no net and PHP and custom
  516. 23:38languages are also there okay so Java
  517. 23:41now the moment you click on the Java or
  518. 23:44python or Ruby they will give you
  519. 23:46different steps of instruction so now
  520. 23:48you see that here um
  521. 23:51for Java is a jar file but if you see
  522. 23:53the python this is the paper package for
  523. 23:56the Ruby it's a gem package for the go
  524. 23:59this is the package which you have it so
  525. 24:02different different packages which we
  526. 24:03have dot net
  527. 24:06dotnet these are the package executable
  528. 24:10actually you'll get it MSI installer.no
  529. 24:13okay so different different packages so
  530. 24:15for me because it's Java
  531. 24:19jar file okay so now this command
  532. 24:23actually if you locate it in my
  533. 24:25instruction documents
  534. 24:28here
  535. 24:31CL this is the same command one command
  536. 24:34I added extra you know what because uh
  537. 24:37permission problem will be having so I'm
  538. 24:39giving the full permissions so this is a
  539. 24:41real command the logic
  540. 24:43understood so far
  541. 24:48okay so I will do my steps
  542. 24:52because here you have some additional
  543. 24:54working commands so I'll go to the opt
  544. 24:59I am in and I'll download this guy
  545. 25:02this is the APM agent
  546. 25:07and you see that download is happen now
  547. 25:09LS see this is the file now I'll set the
  548. 25:12permission
  549. 25:14for this file 75577
  550. 25:17now this file that's all so this work is
  551. 25:19done I got APM downloaded now this is
  552. 25:23called instrument in your application I
  553. 25:26hope you remember the instrumentation
  554. 25:27keyword I've been using uh in the agent
  555. 25:30discussions also so instrumentation is a
  556. 25:33process where what you do you you keep
  557. 25:35some code inside your code and that will
  558. 25:40track the entire activities and send
  559. 25:43back to their some backend
  560. 25:45so here this call instrumentation
  561. 25:47process so now am I using this
  562. 25:49instrumentation process so actually no
  563. 25:52what exactly this is then you know guys
  564. 25:55this is just for the you know hello
  565. 25:57world program
  566. 25:58real time you won't run the application
  567. 26:01like that so here they're saying hey if
  568. 26:03you want to try the EPM then do one
  569. 26:05thing run the one any application look
  570. 26:07at this very carefully run any any
  571. 26:10applications
  572. 26:11and jar file and load this jar file in
  573. 26:14the class path and create traffic and
  574. 26:17you should start APM immediately but I
  575. 26:20am not doing it I'm not doing it then
  576. 26:22what so I'm doing Tomcat I'm in
  577. 26:25production oriented oriented web Pro
  578. 26:27like Tomcat jbos web logic you know then
  579. 26:31you will say Rajesh where is the process
  580. 26:32for that there's there should be steps
  581. 26:34for that so these steps you won't get it
  582. 26:36you have to go data doc
  583. 26:40APM
  584. 26:42monitoring just click on it official
  585. 26:45documents here you have
  586. 26:48no no no
  587. 26:49this is not
  588. 26:54official documents here you are
  589. 26:57so now here you have to decide what you
  590. 27:00want Java click on it
  591. 27:03now what is your application runtime
  592. 27:05environment so select the container
  593. 27:08these all are options available Lambda
  594. 27:12Lambda is only one option and other
  595. 27:14environment you see here
  596. 27:16other environments scroll down
  597. 27:19a little bit and see are you running the
  598. 27:21Java application with springboard Tomcat
  599. 27:24JBoss Jetty Westfield so for every
  600. 27:28options you have our tutorials for us so
  601. 27:30you have to try it out right now one of
  602. 27:32which I'm showing you this is the term
  603. 27:34correct
  604. 27:36are you understanding all of you
  605. 27:40yes
  606. 27:41so remember that so here I did
  607. 27:46I need to do this installation data
  608. 27:48document how to do that so for this this
  609. 27:51page will not help
  610. 27:53this page will not help you but what you
  611. 27:55can do service now a service name you
  612. 27:57can call it so what service name you
  613. 27:59want to call it let's set above School
  614. 28:02and what is this
  615. 28:05[Music]
  616. 28:05um
  617. 28:08what app which is let's say chat app no
  618. 28:11chat I might have used it uh suggest me
  619. 28:15something some servicening
  620. 28:19chat have used it mail I have used it uh
  621. 28:24Bank
  622. 28:26correct so this is my service name
  623. 28:29okay and which environment is running
  624. 28:31production
  625. 28:33so you see that the moment I fill this
  626. 28:34one up then here you have a
  627. 28:38automatically populations but this I'm
  628. 28:40not going to use it is for the hello
  629. 28:42world program kind of thing now uh
  630. 28:45virgin and all you can feed it
  631. 28:48version and all you can feel it so this
  632. 28:51is something which you can try
  633. 28:54uh but how to feed the Virgin right now
  634. 28:57uh I want to
  635. 29:00feed manually so I'll tell you how to
  636. 29:02feed it and you know uh
  637. 29:06this is also you can enable it uh spans
  638. 29:10logs monitoring but right now not
  639. 29:12getting into that you can also do some
  640. 29:14configuration the profilers and if
  641. 29:17you're a Java programmers you'll
  642. 29:18understand the profiling and security
  643. 29:20monitoring and all this thing so right
  644. 29:22now I'm not enabling none of this
  645. 29:24so what I'm doing basically so just I
  646. 29:27showed you and that's all the journey
  647. 29:30for for for
  648. 29:32APM to understand and to know all this
  649. 29:36process step one step two step three
  650. 29:38step four but after that you'll have to
  651. 29:40go back to the my documents so here
  652. 29:44this is the method I did catalina.sh
  653. 29:47which is this file and add this one now
  654. 29:51I want you to
  655. 29:54focus on this code so what we are doing
  656. 29:57where is the agent are you having agent
  657. 29:59in the
  658. 30:01opt yes I am having it and you have
  659. 30:04given permissions and all yes so do you
  660. 30:06want the profiling to be enabled yes
  661. 30:08true false whatever it is do you want
  662. 30:10the log injection true do you want
  663. 30:12Services what is the service name so
  664. 30:14type of school we decided what was that
  665. 30:16bank
  666. 30:18that's the service name what is
  667. 30:20environment that is so environment is
  668. 30:22prod we decided right you can name it
  669. 30:24whatever these are the Tag actually
  670. 30:26right okay these are the tag so how do
  671. 30:29we feed the virgins actually which which
  672. 30:32application version you are deploying so
  673. 30:34I am deploying the DD version
  674. 30:38and 1.0
  675. 30:41okay
  676. 30:42so are you comfortable with this code
  677. 30:44all of you
  678. 30:49yes but then we'll talk about this uh
  679. 30:52devops School Bank comment that service
  680. 30:54service something that we have to
  681. 30:55mention on our own right
  682. 30:58so that's what I'm mentioning you know
  683. 31:00this is my name
  684. 31:01this software which I'm I'll be running
  685. 31:03that named with
  686. 31:05this one
  687. 31:07okay
  688. 31:10means application simple
  689. 31:13okay fair enough yeah
  690. 31:15so yeah many things you can add it but
  691. 31:18not complicating right now this is
  692. 31:20sufficient so what do we do so I'll go
  693. 31:22to my catalina.sh
  694. 31:26and
  695. 31:27where is that so okay I instead of
  696. 31:29blindly going for that I am going one by
  697. 31:32one so there is a tomcat this is the one
  698. 31:35Tomcat
  699. 31:38and where's the bin here it is
  700. 31:42and here there is a catalina.sh here
  701. 31:46so this is the file I want to modify so
  702. 31:48directly I can do it like that so
  703. 31:51now this file these are all our comments
  704. 31:54okay little bit have patience let us
  705. 31:56call down
  706. 31:57okay let us fall down
  707. 31:59and um
  708. 32:02you should read if you are in a run SRE
  709. 32:05team actually this is a almost important
  710. 32:08information you have it about the target
  711. 32:10okay so here if somewhere here somewhere
  712. 32:13maybe esack or something or maybe here
  713. 32:15also you can go insert create some space
  714. 32:19and feed this line
  715. 32:23I added a virgin I hope you'll remember
  716. 32:25that
  717. 32:26I just I did not add in the example over
  718. 32:29there
  719. 32:31that's all
  720. 32:33so this I added this line and then save
  721. 32:36it WQ that after that what you need to
  722. 32:39do after that I think this is done and
  723. 32:42after that you you are doing this one
  724. 32:45and give this permission you I'm already
  725. 32:47in this directory actually okay so I'm
  726. 32:50giving this permission
  727. 32:54done and you see that all have got a
  728. 32:57executable permissions and then finally
  729. 33:00this command I will start
  730. 33:06okay so now you know what this they are
  731. 33:09saying you have a some syntax issues in
  732. 33:12the catalan.sh now I don't know how come
  733. 33:15I introduce the issues but I will check
  734. 33:18and
  735. 33:22syntax issues where is that
  736. 33:25okay you only find out I'm not going to
  737. 33:27find out because I know that you're
  738. 33:29going to come back on to me on this
  739. 33:35where is the syntax is we have given uh
  740. 33:38environment as production there here no
  741. 33:41that's a tag no I can give it anything
  742. 33:42whatever I want I want x y g whatever
  743. 33:46is a problem then
  744. 33:55anyone noticed
  745. 34:01yeah I guess after plot there is a
  746. 34:05this one is a problem yes I copied paste
  747. 34:08it so now this is the right line so I'll
  748. 34:10just go and modify that file one more
  749. 34:13time
  750. 34:15thank you
  751. 34:23and paste it
  752. 34:25save it and finally
  753. 34:28started started how do I validate so
  754. 34:31there's a PS command Linux command you
  755. 34:33can use it this command
  756. 34:35okay so validate if it's DD agent got
  757. 34:39loaded in the environment or not so see
  758. 34:41here it's loaded so everything is okay
  759. 34:44so this step is also created done
  760. 34:47so so far so good right all of you
  761. 34:52okay now after that you know what guys
  762. 34:54you have to do see I'll just go away
  763. 34:58this is done
  764. 34:59this is also done
  765. 35:03this is also done just now I did it now
  766. 35:06I want to have one app in Tomcat
  767. 35:08actually you know in real time you will
  768. 35:10deploy the real Java applications a
  769. 35:13large one which has a database and
  770. 35:15multiple things okay but right now that
  771. 35:18process I don't want to get into that so
  772. 35:20then what is alternative how do we get
  773. 35:21app so you know what Tomcat itself offer
  774. 35:25you multiple small small app
  775. 35:29so I'm utilizing that one so Tomcat is
  776. 35:32running on 88 report remember that IP
  777. 35:34address and ET port and
  778. 35:39see here so this is your Tomcat server
  779. 35:41but they will also host some example app
  780. 35:44so you can learn the Tomcat very fast so
  781. 35:47this example all this app servlet app
  782. 35:50JSP will app web socket apps these are a
  783. 35:54lot of app by default they hosted so
  784. 35:56right now I don't have to install it yes
  785. 35:58these all apps are not a database
  786. 36:00oriented that but static file as static
  787. 36:03apps are there so we which you can use
  788. 36:05it for time being so now right now if
  789. 36:07you see that these are the execute one
  790. 36:10request
  791. 36:12click one request click one request
  792. 36:15click one request like that so one of
  793. 36:18the app or two app three app or these
  794. 36:21are app also you can use it for
  795. 36:23generating a traffic these are nothing
  796. 36:25but a simple Java applications and stuff
  797. 36:29like that
  798. 36:30Okay so
  799. 36:32all this thing so are you understanding
  800. 36:34so far
  801. 36:35where is the app
  802. 36:40okay so now after that this is the
  803. 36:44generate traffic using geometer
  804. 36:48so what to do for generating a traffic
  805. 36:51so guys for that we need to set up a j
  806. 36:54meter now they will say Rajesh how can I
  807. 36:58set up a j meter so for that
  808. 37:01I am going to share with you one of
  809. 37:03blogs
  810. 37:04I don't know how much it will help you
  811. 37:06because the gym it has a different tool
  812. 37:08but
  813. 37:11this is the J meter how to install and
  814. 37:14configure J meter so here also there is
  815. 37:17a step-by-step documents are there
  816. 37:20if he wants to set up your own J meter
  817. 37:23you can do that okay
  818. 37:26and if you want to
  819. 37:28if you want to Outsource that work
  820. 37:31creating a traffic on your application
  821. 37:33then you can ask notes I will generate
  822. 37:36traffic from my measures okay so this is
  823. 37:39the setup I have a setup already so
  824. 37:42I don't want to deviate from the datadog
  825. 37:44to generator but yes all of you
  826. 37:47understood this
  827. 37:51yeah okay so those who are finding
  828. 37:54interest uh you can do a little bit
  829. 37:56later also that's not a problem but you
  830. 37:58remember that for generating a fake
  831. 38:00traffic you need some tools like that
  832. 38:01like a rule load Runner J meter or
  833. 38:05something like that because how many
  834. 38:06times you'll click you cannot generate a
  835. 38:09right graph so that is a geometer so
  836. 38:12where's my gym meter so that is my
  837. 38:14geometer is
  838. 38:16in
  839. 38:17a C drive
  840. 38:21and tools every tools I installed in the
  841. 38:24mind
  842. 38:25dislocations and if you see that it's a
  843. 38:28latest version of jmeter Okay so
  844. 38:32click on it
  845. 38:34click on it
  846. 38:36command line
  847. 38:38and where is the jmeter.bat
  848. 38:41um
  849. 38:42this is this you can use for the Linux
  850. 38:44also okay so this is the one
  851. 38:47this is for Linux
  852. 38:48this is for Windows
  853. 38:52okay so enter drag it run it
  854. 38:57so now just wait for it my J meter
  855. 39:00consoles will be open up Geometry is a
  856. 39:02Java application basically for the
  857. 39:04network call okay Network call it's
  858. 39:08making it
  859. 39:19so guys this is my geometer
  860. 39:22okay so now what are the application I
  861. 39:25want to create a traffic
  862. 39:27so my applications let's
  863. 39:29use one of these just to get started
  864. 39:32this is my applications
  865. 39:35and this is the IP address this is the
  866. 39:37DNS name it can be protocol
  867. 39:39port number endpoint comfortable right
  868. 39:42all of you
  869. 39:48yeah okay so let's get now you'll say
  870. 39:52Rajesh you must be doing some
  871. 39:54configuration how would I do that so for
  872. 39:56that also there is one article I have
  873. 39:58written
  874. 39:59and that age this installation okay and
  875. 40:03just again
  876. 40:13just a second I'll share with you one
  877. 40:15URL so you should not struggle for for
  878. 40:19it
  879. 40:20uh after this session also so
  880. 40:24just
  881. 40:30so this is a step by step with a
  882. 40:34screenshot you have it
  883. 40:36and
  884. 40:38just
  885. 40:43recordings anyways will be there so this
  886. 40:47is the best one step by step
  887. 40:50okay uh
  888. 40:53you can use this one okay this is
  889. 40:58well defined one I had it but in this
  890. 41:01place but not able to quickly get it
  891. 41:05G meter
  892. 41:09told you
  893. 41:18okay I'll just so this is the best one
  894. 41:21okay okay so now what I'm going to do I
  895. 41:24am going to create a plan this plan is
  896. 41:28for the devops school
  897. 41:30okay now I am going to have thread
  898. 41:34thread Miss number of users for the
  899. 41:36traffic how many users I want to create
  900. 41:38per second let's say 10 because if I go
  901. 41:41for more than 20 my system will hang at
  902. 41:45you I don't want to get hands 10 is okay
  903. 41:47do you want the infinite yes and I'm
  904. 41:50going to create a listener sorry
  905. 41:54listener sampler for HTTP request and
  906. 41:58HTTP request is
  907. 42:01this is the IP address
  908. 42:05port a HTTP Port Port number 818
  909. 42:09um
  910. 42:10protocol is HTTP and the path is
  911. 42:14this
  912. 42:16done now I'll just create one listener
  913. 42:19also
  914. 42:21um
  915. 42:22summary report one more listener I need
  916. 42:25it
  917. 42:26for
  918. 42:31aggregate report one more listener and
  919. 42:34mini rate
  920. 42:36view registry
  921. 42:38so this is done so
  922. 42:43okay so this is my project I created in
  923. 42:46the simple project I created in uh J
  924. 42:48meter I saved this project and now I am
  925. 42:52creating a traffic
  926. 42:55and now traffic is going you see that
  927. 42:57200 response time
  928. 42:59listener
  929. 43:02this is going now can I go to datadog
  930. 43:06and validate
  931. 43:09so guys
  932. 43:11click on services
  933. 43:15right now nothing has come
  934. 43:18okay one thing I forgot you know what
  935. 43:21one thing I forgot and that was
  936. 43:23restarting the agent actually so system
  937. 43:25CTL
  938. 43:27or restart data log agency
  939. 43:34and
  940. 43:36just wait for few seconds then traffic
  941. 43:39is being generated I can keep cleaning
  942. 43:42it
  943. 43:43unless it's generated and also meanwhile
  944. 43:46I'll check that if all this thing is set
  945. 43:48or not so here data dog
  946. 43:51data doc uh depending agent
  947. 43:55status
  948. 43:58yes and look at the EPM section c is EPM
  949. 44:03agent
  950. 44:04agent running these all commands I
  951. 44:06taught you earlier so it's the same
  952. 44:08command no new commands
  953. 44:10here
  954. 44:11is going and sending receiving
  955. 44:14writing has not started actually so just
  956. 44:17wait for few seconds
  957. 44:19so setup seems to be okay I need to have
  958. 44:22a little patience for few seconds
  959. 44:24and
  960. 44:26you should be having it
  961. 44:28by the way what was the environment so
  962. 44:31you there is a this you know this error
  963. 44:33I faced two years before and you won't
  964. 44:37trust me I struggle a lot actually
  965. 44:40and there is one there is one problem
  966. 44:42here look at this this one and this one
  967. 44:46and tell me are we having some problem
  968. 44:48here
  969. 44:50I am not able I should see the services
  970. 44:52but in not I'm not able to see that why
  971. 44:57I remember this issues
  972. 44:59I spent so many hours for that
  973. 45:02see that Ops test here yes scope is here
  974. 45:07production here by default is a test
  975. 45:09because of my last filter so now I have
  976. 45:12to change it and because of that I
  977. 45:14struggle a lot last time now you have it
  978. 45:17understood guys
  979. 45:21all of you yes yes so now you will
  980. 45:26just have to wait for 20 30 minutes or
  981. 45:29maybe one hour because all the graph has
  982. 45:31to be populated so you want to see all
  983. 45:33the graph which I'm not going to teach
  984. 45:34you so click on it this is one service
  985. 45:36and whatever you see
  986. 45:39this all graph you need to be populated
  987. 45:41with the data so I can explain it
  988. 45:44so now all the traffic
  989. 45:47generated Here by JJ by J beta and all
  990. 45:52the response they are tracking it
  991. 45:55and now your job is to find out the
  992. 45:58response time which is creating a
  993. 46:00problem so all this graph I'll explain
  994. 46:02it to you one by one and get quick
  995. 46:06are you understanding all of you
  996. 46:11yes
  997. 46:12yes so this is the setup of APM now next
  998. 46:16phase of learning is understanding this
  999. 46:18graph and for that we need 20 minutes
  1000. 46:21because the graph will fill for at least
  1001. 46:23for one hour and all then it will be
  1002. 46:26good you you can visualize something
  1003. 46:27others blank graph you won't understand
  1004. 46:29anything so now meanwhile I am giving
  1005. 46:31this time to all of you so you can also
  1006. 46:34set up and get it done along with that
  1007. 46:38you can access our other tutorials such
  1008. 46:40as Docker ansible Jenkins terraform
  1009. 46:43Splunk AWS Azure and various other
  1010. 46:46devops related premium tutorials with
  1011. 46:48our Channel membership if you would have
  1012. 46:50any issues with our Channel membership
  1013. 46:51you can drop an email to us at contact
  1014. 46:53devopschool.com or you can also
  1015. 46:55unsubscribe from Channel membership
  1016. 46:56anytime if you don't want to continue or
  1017. 46:58did not like the video to get our
  1018. 47:00Channel membership click onto the join
  1019. 47:02button select the 399 plan and grow your
  1020. 47:04skills immensely please be kind enough
  1021. 47:06to like it and you can comment any of
  1022. 47:08your doubts and queries we will reply to
  1023. 47:10them at the earliest thanks for watching
  1024. 47:13hello everyone if you would like to
  1025. 47:16access the remaining videos of this
  1026. 47:18playlist of 50 plus more tools which are
  1027. 47:20coming under devops Dave secops SRE data
  1028. 47:24Ops get Ops Etc kindly become our
  1029. 47:27channel members by clicking on the
  1030. 47:29joining button
  1031. 47:30you would have access to one hundreds of
  1032. 47:32playlists and one thousands of videos
  1033. 47:34lifetime access with this membership
  1034. 47:36enjoy

About this transcript

This page contains the full transcript of Session - 8- Datadog APM Monitor Java Application using Tomcat - Part1 by AiOps School, generated from the public captions YouTube serves with the video. The transcript has 6,670 words across 1,034 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.