Unable to view the monitor up/down details in Kibana dashboard through docker run in multiple .js/.ts files

Title:-Unable to view the monitor up/down details in Kibana dashboard through docker run in multiple .js/.ts files


Hi Team, we are currently run the "heartbeat.yml" file with the config of multiple .js files in the "todos" folder path and run the docker run command, so we are unable to view the up/down monitor details in the Kibana dashboard, but while we run the heartbeat file with inline scripts we able to view the up/down monitor details in Kibana dashboard through docker run command.

To check the log comparison both of inline and multiple files, observer that inline job run logs its showing line as below way:

inline job log:-


multiple .js files log


after the inline scheduler job active it showing like as below way:

2021-05-25T17:44:16.953Z INFO synthexec/synthexec.go:128 Running command: /usr/share/heartbeat/.node/node/bin/elastic-synthetics --inline --screenshots --json --network --outfd 3 in directory: ''
2021-05-25T17:44:39.690Z INFO synthexec/synthexec.go:176 Command has completed(0):

after this, we can able to view the up and down monitoring details in the Kibana dashboard through inline script run in heartbeat.yml file

But while in multiple js files run we are not able to view the log data of

"INFO synthexec/synthexec.go:128 Running command" and
"INFO synthexec/synthexec.go:176 Command has completed(0): "

details while at the time of the run, instead of this we can able to view the below details in logs:

2021-05-25T18:12:14.910Z INFO [monitoring] log/log.go:144 Non-zero metrics in the last 30s
"monitoring": {"metrics": {"beat":{"cgroup":{"cpuacct":{"total":{"ns":3856349}},"memory":{"mem":{"usage":{"bytes":90112}}}},"cpu":

Below are the files we are used for this multiple js files run:-


    - type: browser
      id: my-monitor
      name: My Monitor
      schedule: "@every 1m"
          path: "./todos"

todos/elastic.journey.js :-

import { journey, step } from '@elastic/synthetics';
import { deepStrictEqual } from 'assert';

journey("Ensure elastic home page is correct", async ({page}) => {
   step("Go to elastic.co", async () => {
      await page.goto('https://www.elastic.co');

docker run command:-

    sudo docker run \
      --rm \
      --name=heartbeat \
      --user=heartbeat \
      --volume="$PWD/heartbeat.yml:/usr/share/heartbeat/heartbeat.yml:ro" \
      --volume="$PWD/todos:/usr/share/heartbeat/todos:ro" \
      docker.elastic.co/beats/heartbeat:7.12.0 heartbeat -e \
      -E cloud.id=
      -E cloud.auth=

Please suggest what could be the root cause and probable fix for this issue.

Thanks in advance.

I'm not exactly sure what's going on here but I suspect it's related to the somewhat tricky folder option in heartbeat. Can you try running the newest instructions in our synthetics quickstart. We now have a new option called zip_url which lets you specify get repo is the source for the Todos example.

That may not resolve your issues getting your own examples to work. If that's the case what would be the most helpful would be to a link to a github repo or zip file containing your project. Obviously with any proprietary or confidential information removed.