无法通过在多个 .js/.ts 文件中运行的 docker 在 Kibana 仪表板中查看监视器上/下详细信息

如何解决无法通过在多个 .js/.ts 文件中运行的 docker 在 Kibana 仪表板中查看监视器上/下详细信息

我们运行“heartbeat.yml”文件,在“todos”文件夹路径中配置了多个.js文件,并运行docker run命令,所以我们无法在Kibana仪表板中查看上/下监视器的详细信息,但是当我们使用内联脚本运行心跳文件时,我们可以通过 docker run 命令在 Kibana 仪表板中查看向上/向下监视器详细信息。

要检查内联和多个文件的日志比较,观察者内联作业运行记录其显示行如下方式:

内联作业日志:

"monitor_starts":1},"scheduler":{"jobs":{"active":1},"tasks":{"active":1}}},"libbeat":{"config":{"module":{"running:0}}

多个 .js 文件日志:

"monitor_starts":1}},"libbeat":{"config":{"module":{"running":0}}

内联调度程序作业激活后,显示如下方式:

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):

之后,我们就可以通过 heartbeat.yml 文件中运行的内联脚本在 Kibana 仪表板中查看上下监控的详细信息

但是在多个js文件中运行时我们无法查看

的日志数据
"INFO synthexec/synthexec.go:128 Running command" and
"INFO synthexec/synthexec.go:176 Command has completed(0): "

运行时的详细信息,我们可以在日志中查看以下详细信息:

"monitor_starts":1}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":1,"active":0,"batches":1,"total":1},"read":{"bytes":5097},"type":"elasticsearch","write":{"bytes":2860}},"pipeline":{"clients":1,"events":{"active":0,"published":1,"retry":1,"queue":{"acked":1}}},"system":{"cpu":{"cores":1},"load":{"1":0.05,"15":0.11,"5":0.09,"norm":{"1":0.05,"5":0.09}}}}}}
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":
{"system":{"ticks":60},"total":{"ticks":120,"time":{"ms":4},"value":120},"user":{"ticks":60,"time":{"ms":4}}},"handles":{"limit":{"hard":4096,"soft":1024},"open":9},"info":{"ephemeral_id":"607833fc-eebd-4577-8a21-ed5749a8d97a","uptime":{"ms":60056}},"memstats":{"gc_next":9914592,"memory_alloc":5992064,"memory_total":19761336,"RSS":52703232},"runtime":{"goroutines":14}},"output":{"events":{"active":0}},"events":{"active":0}}},"system":{"load":{"1":0.03,"15":0.1,"5":0.08,"norm":{"1":0.03,"5":0.08}}}}}}

以下是我们用于运行多个 js 文件文件

heartbeat.yml:

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

tod​​os/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 运行命令:

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=""

此问题的根本原因和可能的解决方法是什么?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?