[英]Is it possible/fine to run Prometheus, Loki, Grafana outside of Kubernetes?
In some project there are scaling and orchestration implemented using technologies of a local cloud provider, with no Docker & Kubernetes.在一些项目中,使用本地云提供商的技术实现了扩展和编排,没有 Docker 和 Kubernetes。 But the project has poor logging and monitoring, I'd like to instal Prometheus, Loki, and Grafana for metrics, logs, and visualisation respectively.
但是该项目的日志记录和监控很差,我想分别安装 Prometheus、Loki 和 Grafana 用于指标、日志和可视化。 Unfortunately, I've found no articles with instructions about using Prometheus without K8s.
不幸的是,我没有找到关于在没有 K8s 的情况下使用 Prometheus 的说明的文章。
But is it possible?但有可能吗? If so, is it a good way?
如果是这样,这是一个好方法吗? And how to do this?
以及如何做到这一点? I also know that Prometheus & Loki can automatically detect services in the K8s to extract metrics and logs, but will the same work for a custom orchestration system?
我也知道 Prometheus & Loki 可以自动检测 K8s 中的服务以提取指标和日志,但是对于自定义编排系统是否同样适用?
Can't comment about Loki, but Prometheus is definitely doable.无法评论 Loki,但 Prometheus 绝对可行。 Prometheus supports a number of service discovery mechanisms, k8s being just on of them.
Prometheus 支持多种服务发现机制,k8s 就是其中之一。 If you look at the list of options (the ones ending with _sd_config) you can see if your provider is there.
如果您查看选项列表(以 _sd_config 结尾的选项),您可以查看您的提供商是否在那里。 If it is not then a generic service discovery can be used.
如果不是,则可以使用通用服务发现。 Maybe DNS-based discovery will work with your custom system?
也许基于 DNS 的发现适用于您的自定义系统? If not then with some glue code a file based service discovery will almost certainly work.
如果没有,那么使用一些胶水代码,基于文件的服务发现几乎肯定会起作用。
Yes, I'm running Prometheus, Loki etc. just fine in a AWS ECS cluster.是的,我在 AWS ECS 集群中运行 Prometheus、Loki 等就好了。 It just requires a bit more configuration especially regarding service discovery (if you are not already using something like ECS Service Disovery or Hashicorp Consul)
它只需要更多的配置,特别是关于服务发现(如果你还没有使用像 ECS Service Disovery 或 Hashicorp Consul 这样的东西)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.