node.js - 使用 NodeJS 将灯塔指标发送到 Graphite
问题描述
我正在尝试向 Graphite 发送一些灯塔报告。我遇到了这个NodeJS项目Github 灯塔项目,它生成灯塔报告并发送到石墨。
所以我做了几件事-
- 使用此图像在我的一个 EC2 实例上启动一个石墨容器 - https://hub.docker.com/r/graphiteapp/graphite-statsd/
- 使用 Graphite 的相关细节修改 index.js 以将数据从灯塔推送到我的石墨容器。
- 运行
node index.js
也可以正常工作,没有任何错误,但我无法在 Graphite Web UI 中看到任何数据。
这些是我们需要在 index.js 中配置的东西 -
const graphitePort = '8080'; // my container is exposed to port 8080
const graphiteHost = '<mypublicip of EC2>'; // e.g. 'carbon.hostedgraphite.com'
**const graphitePath = '<<No Idea on this >>'; // e.g. 'lighthouse.performance' or 'your-api-key'**
const url = 'https://github.com/';
我不知道graphitePath 在这里是什么以及如何获得它。如果有人可以就此提出建议,那将非常有帮助
解决方案
推荐阅读
- django - 如何生成文件下载链接?
- c++ - C++ - 有没有办法只继承一些函数一次,而其他函数则多次继承?
- scala - 在 Scala 中动态创建动态函数名
- java - 在java中使用数组时出现简单的语法错误
- gremlin - Gremlin:如何克服属性空问题并编写一个更新某个顶点的所有属性的查询?
- sas - 当 &bob 不在 %marco 中时,为什么 %superq(&bob) 显示变量?
- javascript - 带有否定和求和的 Array.reduce() 的奇怪行为
- apache-kafka - 多个集群上的 Kafka 事务
- android - 关闭应用程序时执行挂起的写入
- symfony - 在表单中呈现过滤的复选框集合