我在运行时看到以下错误kubectl get pods:
Unable to connect to the server: dial tcp 127.0.0.1:8080: connectex: No connection could be made because the target machine actively refused it.
Run Code Online (Sandbox Code Playgroud)
当我两周前运行它时,这是有效的。我在~/.kube/config目录中的配置文件如下所示:
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://zld05687.vci.co.com
name: dev-cluster
- cluster:
insecure-skip-tls-verify: true
server: https://zlt20087.vci.co.com
name: perf-cluster
- cluster:
insecure-skip-tls-verify: true
server: https://zlt17291.vci.co.com
name: test-cluster
contexts:
- context:
cluster: dev-cluster
namespace: com-co-acp-dev
user: default-user
name: default-context
- context:
cluster: perf-cluster
namespace: com-co-acp-perf
user: default-user
name: perf-context
- context: …Run Code Online (Sandbox Code Playgroud) 计数器和仪表允许向它们添加标签。当我尝试向摘要添加标签时,出现“标签数量不正确”错误。
这就是我正在尝试的:
private static final Summary latencySummary = Summary.build()
.name("all_latencies")
.help("all latencies.")
.register();
latencySummary.labels("xyz_api_latency").observe(timer.elapsedSeconds());
Run Code Online (Sandbox Code Playgroud)
我查看了摘要 github 源代码,但找不到答案。如何将标签添加到摘要?
我看到了这个与普罗米修斯相关的奇怪错误:
RESTful call failed. Cause: Collector already registered that provides name: http_client_requests_count
Run Code Online (Sandbox Code Playgroud)
我没有在我的项目中包含 http_client_requests_count 指标——那是什么?这是从哪里来的?
我有一个 spring-boot 应用程序,我用它Prometheus来收集指标数据。Prometheus 有一些指标,例如Counter可以很好地计算某事发生的次数,Gauge它也可以保持计数,但可以减少等等。是否有一个指标可以让我跟踪某事的请求持续时间?例如,假设我想记录在进行 api 调用和 api 返回响应之间所花费的时间。我将如何跟踪进行调用和收到 api 响应之间的时间?然后,是否可以在Y坐标上创建一个图表,我可以列出响应所花费的时间长度(以秒或毫秒为单位);然后在X 轴,是否显示时间戳(收集指标的时间)?
我正在尝试破译Dockerfile的以下行:
ADD MyApplication.jar app.jar
RUN (cd app.jar/MyApplication;tar -cf - src) | (cd ../..;tar -xf -) \
&& (cd app.jar/MyApplication;tar -cf - opt/att/ajsc/lib) | (cd ../..;tar -xf -) \
&& (cd app.jar/MyApplication;tar -cf - opt/att/ajsc/config) | (cd ../..;tar -xf -)
Run Code Online (Sandbox Code Playgroud)
我认为它只是试图将一个jar文件解压缩到Docker镜像中的特定目录中,但是我想确定.
java ×3
prometheus ×3
docker ×1
dockerfile ×1
grafana ×1
kubectl ×1
kubernetes ×1
linux ×1
monitoring ×1
shell ×1
spring ×1
ssl ×1
summary ×1