Hello everybody,
Il use heartbeat to check some web site with check.request.
For example :
- type: http
urls: [http://localhost:5050/myweb/app]
schedule: '@every 1m'
response.include_body_max_bytes: 10240
check.request:
method: POST
headers:
'Content-Type': 'application/x-www-form-urlencoded'
# urlencode the body:
body: 'log=LOGIN&pwd=XXXXXXXX&component=$Form&page=Login&service=direct&If=F&submitmode=&submitname='
check.response:
status: 200
body:
- ControlText
This is work fine but it's not too secure to save login and password in config file.
So I store them in keystore file.
But, when I try to update my config file to use variables instead of login/password, I have error message.
New config with variable
- type: http
urls: [http://localhost:5050/myweb/app]
schedule: '@every 1m'
response.include_body_max_bytes: 10240
check.request:
method: POST
headers:
'Content-Type': 'application/x-www-form-urlencoded'
# urlencode the body:
body: 'log=${LOGIN}&pwd=${PWD}&component=$Form&page=Login&service=direct&If=F&submitmode=&submitname='
check.response:
status: 200
body:
- ControlText
Error message :
Error creating runner from config: job err can not convert 'object' into 'string' accessing 'check.request.body'
I try multiple configuration to solve this problem without any success.
If someone could help me ...
Samuel