From 712d9e044dc090114b540c4fe849e7ef64c5ecdc Mon Sep 17 00:00:00 2001 From: Yutsuo Date: Fri, 18 Jan 2019 13:12:22 -0200 Subject: [PATCH] Phase III Task 9 --- README.md | 8 +++- View Results Tree.jmx | 92 ++++++++++++++++++++++++++++++++++++------- prometheus.yml | 8 +++- 3 files changed, 92 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 532a2e9..fc851e9 100755 --- a/README.md +++ b/README.md @@ -28,4 +28,10 @@ Levante a página e o serviço REST em Swarm Mode. Escale o container do NodeJS Sétima tarefa: -Faça um teste de escala de 6 threads em paralelo no serviço /restricted usando JMeter, validando se o retorno do servidor está conforme esperado. Mande um print de 'docker stats' enquanto o teste roda para demonstrar a distribuição de gasto de CPU entre as instâncias do container de NodeJS e um print dos resultados do JMeter. \ No newline at end of file +Faça um teste de escala de 6 threads em paralelo no serviço /restricted usando JMeter, validando se o retorno do servidor está conforme esperado. Mande um print de 'docker stats' enquanto o teste roda para demonstrar a distribuição de gasto de CPU entre as instâncias do container de NodeJS e um print dos resultados do JMeter. + +Nona tarefa: + +Rode o mesmo teste anterior, mas agora monitore o andamento do teste do JMeter pelo Grafana por meio do Prometheus. Monte um painel Grafana com a qtde de requisições cujo assert JMeter foi OK, qtos foi com erro e a qtde de requisições por segundo que o JMeter está lançando. + +**Dica:** https://github.com/johrstrom/jmeter-prometheus-plugin \ No newline at end of file diff --git a/View Results Tree.jmx b/View Results Tree.jmx index 07f4d99..2aaaaf3 100644 --- a/View Results Tree.jmx +++ b/View Results Tree.jmx @@ -19,13 +19,52 @@ false -1 - 48 + 6 0 false + + + + + localhost + 3001 + + + /restricted + GET + true + false + true + false + true + + + + + + + 0 + 0 + + + + + + Content-Type + application/json + + + token + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InVzZXIxIiwicGFzc3dvcmQiOiJwYXNzMSIsInN1YmplY3QiOiJub3JtYWxfdXNlciIsImlzc3VlciI6Imh0dHA6Ly95b3VjYW50cnVzdG1lLmlvIiwic2NvcGUiOiJ1c2VyIiwiaWF0IjoxNTQ3NDcxMTMxfQ.cGSFZW5F5-R-eJgrawZOYC5I_35ZUxEbzIUM3rk5OWI + + + + + @@ -82,6 +121,7 @@ true true true + true true true @@ -89,20 +129,44 @@ + + + johrstrom.save_config + + + false + false + true + true + 9027 + io.prometheus.client.Counter + + + + + + + 200 + + + Assertion.response_code + false + 8 + code + + + + + 500 + + + Assertion.response_code + false + 8 + code + + - - - - Content-Type - application/json - - - token - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InVzZXIxIiwicGFzc3dvcmQiOiJwYXNzMSIsInN1YmplY3QiOiJub3JtYWxfdXNlciIsImlzc3VlciI6Imh0dHA6Ly95b3VjYW50cnVzdG1lLmlvIiwic2NvcGUiOiJ1c2VyIiwiaWF0IjoxNTQ3NDcxMTMxfQ.cGSFZW5F5-R-eJgrawZOYC5I_35ZUxEbzIUM3rk5OWI - - - - diff --git a/prometheus.yml b/prometheus.yml index 71bd209..2ab061c 100755 --- a/prometheus.yml +++ b/prometheus.yml @@ -12,4 +12,10 @@ scrape_configs: static_configs: - targets: ['app:3001'] # mysqld_exporter address and port labels: - alias: 'app1-02' # alias name given to this instance \ No newline at end of file + alias: 'app1-02' # alias name given to this instance + - job_name: 'jmeter' # Job name + metrics_path: /metrics + static_configs: + - targets: ['192.168.5.1:9027'] # address and port + labels: + alias: 'jmeter' # alias name given to this instance \ No newline at end of file