robot-piglet on arcadia
demilitarization (compare)
robot-piglet on arcadia
pandora 0.3.8 bind (compare)
robot-piglet on arcadia
Fix UpdateTest (compare)
robot-piglet on arcadia
better (compare)
robot-piglet on arcadia
Add .md extension for AUTHORS a… (compare)
robot-piglet on arcadia
YANDEXTANK-583: reincarnation o… (compare)
robot-piglet on arcadia
PR for branch feature/YANDEXTAN… (compare)
robot-piglet on arcadia
IGNIETFERRO-1816 Update Python … (compare)
robot-piglet on arcadia
YANDEXTANK-579: Single TankWork… (compare)
robot-piglet on arcadia
jmeter and base version both fi… (compare)
arcadia-devtools on arcadia
rm converter tests ref:ef1e917… (compare)
arcadia-devtools on arcadia
DTCC-910 adaptation for piglet … (compare)
arcadia-devtools on arcadia
Remove irrelevant .arcignore r… (compare)
arcadia-devtools on arcadia
Remove empty file ref:f31d8414… (compare)
arcadia-devtools on arcadia
minus Android plugin ref:34ac1… (compare)
arcadia-devtools on arcadia
Fix style ref:40a5090e43ea3f19… (compare)
arcadia-devtools on arcadia
YANDEXTANK-575: TankWorker inhe… (compare)
16:33:15 [INFO] Artifacts dir: /home/jtank/logs/2020-02-05_16-33-03.234103
16:33:27 [ERROR] Test interrupted:
<class 'influxdb.exceptions.InfluxDBClientError'>: 400: {"error":"partial write: field type conflict: input field \"custom:cpu-cpu-total_usage_iowait\" on measurement \"monitoring\" is type float, already exists as type integer dropped=1"}
File "/usr/lib/python2.7/site-packages/yandextank/core/consoleworker.py", line 386, in run
self.retcode = self.core.wait_for_finish()
File "/usr/lib/python2.7/site-packages/yandextank/core/tankcore.py", line 290, in wait_for_finish
retcode = plugin.is_test_finished()
File "/usr/lib/python2.7/site-packages/yandextank/plugins/Telegraf/plugin.py", line 227, in is_test_finished
data_len = self.monitoring.poll()
File "/usr/lib/python2.7/site-packages/yandextank/plugins/Telegraf/collector.py", line 119, in poll
self.send_collected_data()
File "/usr/lib/python2.7/site-packages/yandextank/plugins/Telegraf/collector.py", line 149, in send_collected_data
listener.monitoring_data(copy.deepcopy(data))
File "/usr/lib/python2.7/site-packages/yandextank/plugins/InfluxUploader/plugin.py", line 82, in monitoring_data
for chunk in chop(data_list, self.get_option("chunk_size"))
File "/usr/lib/python2.7/site-packages/yandextank/plugins/InfluxUploader/plugin.py", line 88, in _send_monitoring
's'
File "/usr/lib/python2.7/site-packages/influxdb/client.py", line 530, in write_points
consistency=consistency)
File "/usr/lib/python2.7/site-packages/influxdb/client.py", line 598, in _write_points
protocol=protocol
File "/usr/lib/python2.7/site-packages/influxdb/client.py", line 343, in write
headers=headers
jtank@TestingGround ~]$ yandex-tank -c ./yandex_tank_jmeter_influx.yaml
No handlers could be found for logger "netort.resource"
14:40:02 [ERROR] Config validation error:
Validation error:
influx:
grafana_dashboard:
- unknown field
grafana_root:
- unknown field
1.12.х
, то велика вероятность, что полей графаны в конфиге плагина influx уже нет из-за его переписывания в рамках этого коммита (https://github.com/yandex/yandex-tank/commit/5ff33778e930e45ca996f1f63386896fd9015e8c#diff-a206906e042101779559a43db3a6a968), что отражено в документации, которая в репозитории (https://github.com/yandex/yandex-tank/blob/develop/docs/core_and_modules.rst#influxdb ). Попробуйте, версию 1.11.x
, там эти параметры есть
Всем привет, может кто скинуть готовый-рабочий пример, хотя бы с одним запросом, без всяких мониторингов (хочу просто запустить и посмотреть, может пойму так, чем через туториал)
Что-то типа этого (пытался на juice-shop.herokuapp.com проверить)
load.yaml
phantom:
address: 52.209.151.97:443
ssl: true
load_profile:
load_type: rps
schedule: const(1, 7s)
ammofile: /var/loadtest/ammo_local.txt
ammo_type: uri
ammo_local.txt
[Host: 52.209.151.97]
[Connection: close]
[User-Agent: Tank]
/rest/products/search?q=
Я как только ни пробовал, в ответ получаю 502, 500, 404, 400, но ни как не 200
@leha0794 тут немного не верно созданы файлы. в файле ammo_local.txt не должно быть header-ов. их надо прописывать в load.yaml. сам же файл ammo_local.txt должен содержать оставшуюся часть запроса без домена.
load.yaml
phantom:
address: 52.209.151.97:443
ssl: true
load_profile:
load_type: rps
schedule: const(1, 7s)
ammofile: /var/loadtest/ammo_local.txt
ammo_type: uri
header_http: '1.1'
headers:
- "[Host: 52.209.151.97]"
- "[Connection: close]"
- "[User-Agent: Tank]"
ammo_local.tex
/rest/products/search?q= api-1
/rest/products/dashboard api-2
/rest/products/basket api-2
api-1 - это тег для конкретного запроса или может быть выставлен у группы запросов
api-2 - это тег для конкретного запроса или может быть выставлен у группы запросов
теги пишутся в конце строки запроса и отделяются символом TAB - \t = </some/api/request>\t<api-tag> (конечно без скобок < и >)
uri
и uripost
допускают наличие заголовков внутри файлов с патронами https://yandextank.readthedocs.io/en/latest/tutorial.html#uri-style-uris-in-file
answ_XXXX.log
, возможно там будет больше информации. Из приведенных вами конфигов сложно понять причину
@afilatov
@ALEXLINCHEVSKY Про заголовки в файле с патронами не совсем верная информация: форматы
uri
иuripost
допускают наличие заголовков внутри файлов с патронами https://yandextank.readthedocs.io/en/latest/tutorial.html#uri-style-uris-in-file
по этой инструкции да - но при этом это не работает. а указанные заголовки и длины строк создаются в процессе формирования ленты-патронов в файле ammo.stpd иначе не верно формируется и длина строки и строка запроса как GET так и POST типов
Коллеги, а что у меня поломалось? Работало все ок, а потом стал получать вот такое.
Удалял и ставил танr заново. Не помогает
[jtank@TestingGround home]$ yandex-tank -v
Traceback (most recent call last):
File "/usr/local/bin/yandex-tank", line 11, in <module>
load_entry_point('yandextank==1.12.8.1', 'console_scripts', 'yandex-tank')()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
return ep.load()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
return self.resolve()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python3.6/site-packages/yandextank/core/__init__.py", line 4, in <module>
from .tankcore import TankCore # noqa:F401
File "/usr/local/lib/python3.6/site-packages/yandextank/core/tankcore.py", line 25, in <module>
from yandextank.plugins.DataUploader.client import LPRequisites
File "/usr/local/lib/python3.6/site-packages/yandextank/plugins/DataUploader/__init__.py", line 1, in <module>
from .plugin import Plugin # noqa:F401
File "/usr/local/lib/python3.6/site-packages/yandextank/plugins/DataUploader/plugin.py", line 23, in <module>
from ..Autostop import Plugin as AutostopPlugin
File "/usr/local/lib/python3.6/site-packages/yandextank/plugins/Autostop/__init__.py", line 1, in <module>
from .plugin import Plugin # noqa:F401
File "/usr/local/lib/python3.6/site-packages/yandextank/plugins/Autostop/plugin.py", line 8, in <module>
from ..Console import Plugin as ConsolePlugin
File "/usr/local/lib/python3.6/site-packages/yandextank/plugins/Console/__init__.py", line 1, in <module>
from .plugin import * # noqa:F401,F403
File "/usr/local/lib/python3.6/site-packages/yandextank/plugins/Console/plugin.py", line 7, in <module>
from .screen import Screen
File "/usr/local/lib/python3.6/site-packages/yandextank/plugins/Console/screen.py", line 1018
Unable to access to JMeter executable file or it does not exist: /usr/local/apache-jmeter-5.2.1/bin/jmeter
@nettorta да, путь сходится
Пробовал сейчас вот сюда установить:
/home/tank/apache-jmeter-5.2.1/bin/jmeter
Если таким образом запускать только JMeter, то этот путь работает и JMeter стартует тест:/home/tank/apache-jmeter-5.2.1/bin/jmeter -n -t ReloadTest.jmx -l result-1.jtl -e -o ./result-1
В load.yaml прописал:
phantom:
enabled: false
jmeter:
enabled: true
jmx: ReloadTest.jmx
buffered_seconds: 10
jmeter_path: /home/tank/apache-jmeter-5.2.1/bin/jmeter
jmeter_ver: 5.2
ext_log: all
overload:
enabled: true
package: yandextank.plugins.DataUploader
token_file: "token.txt"
При запуске получаю ошибку
06:49:54 [ERROR] Test interrupted:
<type 'exceptions.RuntimeError'>: Unable to access to JMeter executable file or it does not exist: /home/tank/apache-jmeter-5.2.1/bin/jmeter
@bahodir-annaev одним из вариантов может быть нехватка instances, т.е. одновременного кол-ва соединений. По дефолту в танке оно равно 1000
https://yandextank.readthedocs.io/en/latest/config_reference.html#id20
Подскажите по образу яндекс-танка с jmeter, он почему-то подвисает при остановке и ctrl+c не помогает
docker run --rm -v $(pwd):/var/loadtest --net host -it direvius/yandex-tank:jmeter-latest
No handlers could be found for logger "netort.resource"
15:12:27 [INFO] New test id 2020-03-17_15-12-27.791237
15:12:27 [INFO] Logging handler <logging.StreamHandler object at 0x7f65fabb9850> added
15:12:27 [INFO] Logging handler <logging.StreamHandler object at 0x7f65fab5da50> added
15:12:27 [INFO] Created a folder for the test. /var/loadtest/logs/2020-03-17_15-12-27.791237
15:12:27 [INFO] Configuring plugins...
15:12:27 [INFO] Loading plugins...
15:12:27 [INFO] Preparing test...
15:12:27 [INFO] Checking tank resources...
15:12:28 [INFO] Starting test...
15:12:28 [INFO] using verbose histogram
15:12:28 [INFO] Plugin <yandextank.plugins.JsonReport.plugin.Plugin object at 0x7f65fab36e10> required 0.000272 seconds to start
15:12:28 [INFO] Plugin <yandextank.plugins.Autostop.plugin.Plugin object at 0x7f65fab71f10> required 0.000024 seconds to start
. ~~~~~~~~~~~~~~~~~~~~~~~~ JMeter Test | ~~~~~~~~~~~~~~~~~~~~~~~~
. ~~~~~~~~~~~~~~~~~~~~~~~~ JMeter Test / ~~~~~~~~~~~~~~~~~~~~~~~~
Data delay: 4s, RPS: 46 ▅▇ . Test Plan: modeus.jmx
. Duration: 0:00:11
Percentiles (all/last 1m/last), ms: . HTTP codes: . Active Threads: 2
100.0% < 1,015.0 1,015.0 171.0 . 72 +45 96.00% : 200 OK . Responses/s: 46
99.5% < 1,015.0 1,015.0 171.0 . 3 +1 4.00% : 500 Internal Server Error .
99.0% < 1,015.0 1,015.0 166.0 . .
95.0% < 177.0 177.0 103.0 . Net codes: .
90.0% < 109.0 109.0 81.5 . 72 +45 96.00% : 0 Success .
15:12:40 [INFO] Finishing test...
15:12:40 [INFO] Stopping load generator and aggregator
конфиг
phantom:
enabled: false
jmeter:
enabled: true
package: yandextank.plugins.JMeter
jmx: load.jmx
buffered_seconds: 0
ext_log: none
variables:
protocol: https
host: example.org
thread_rpm: 2
loops: 20
console:
enabled: true # enable console output
telegraf:
enabled: false # let's disable telegraf monitoring for the first time
У меня тоже тест c JMeter зависает на этапе остановки генератора:
docker run --entrypoint /bin/bash -v ${PWD}:/var/loadtest -v ${HOME}/.ssh:/root/.ssh -it direvius/yandex-tank:jmeter-latest
Yandex.Tank Docker image
[tank]root@2fb9f3d88afa: /var/loadtest # yandex-tank
.
20:24:44 [INFO] Finishing test...
20:24:44 [INFO] Stopping load generator and aggregator
При нажатии на ctrl-c появляется еще одна строчка, и более ничего20:40:54 [WARNING] Interrupting
Привет. Использую танк с пандорой. Пандора из девелоп ветки. Танк latest из docker hub. В overload почему-то что-то не доходит, в частности информация об rps(https://overload.yandex.net/260950). Но нагрузка генерируется. Вижу по логам танка и мишеней.
Танк с фантомом работает исправно.
Конфиг пандоры:
pools:
- id: Fabric Gun
gun:
type: fabric-gun
ConnProfilePath: "./connectionProfile.json"
ammo:
type: fabric-chaincode
source:
type: file
path: ./json.ammo
result:
type: phout
destination: ./phout.log
rps: {duration: 20s, type: line, from: 1, to: 10}
startup:
type: once
times: 10
log:
level: info
monitoring:
expvar:
enabled: false
port: 1234
cpuprofile:
enabled: false
memprofile:
enabled: false
Конфиг танка:
overload:
enabled: true
package: yandextank.plugins.DataUploader
token_file: "token.txt"
phantom:
enabled: false
pandora:
package: yandextank.plugins.Pandora
enabled: true
pandora_cmd: ./pandora-fabric # Pandora executable path
config_file: load.yaml # Pandora config path
Есть идеи в чем проблема? Спасибо