Slackbot
07/11/2022, 1:21 PMAnkit Nayan
Ankit Nayan
Blake Romano
07/11/2022, 1:29 PMAnkit Nayan
otel metrics collector
would be a better placeAnkit Nayan
Ankit Nayan
Blake Romano
07/11/2022, 1:32 PMBlake Romano
07/11/2022, 1:33 PMotelCollectorMetrics:
config:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
# Data sources: metrics
prometheus:
config:
scrape_configs:
- job_name: otel-collector
scrape_interval: 30s
static_configs:
- targets:
- prometheus.k8s.ops.us-west-2.aws.wna.cloud:80
# the following string is replaced with OTel service name using the helper template
- $OTEL_COLLECTOR_PROMETHEUS
Ankit Nayan
kuberhealthy_check
metric is available at suggestions of query builder?Ankit Nayan
Ankit Nayan
Ankit Nayan
Blake Romano
07/11/2022, 1:36 PM2022-07-11T13:21:26.387Z warn internal/otlp_metricsbuilder.go:159 Failed to scrape Prometheus endpoint {"kind": "receiver", "name": "prometheus", "scrape_timestamp": 1657545676379, "target_labels": "map[__name__:up instance:prometheus.k8s.ops.us-west-2.aws.wna.cloud:80 job:otel-collector]"}
Ankit Nayan
Blake Romano
07/11/2022, 1:38 PMBlake Romano
07/11/2022, 1:39 PMAnkit Nayan
curl prometheus.k8s.ops.us-west-2.aws.wna.cloud:80/metrics
Ankit Nayan
curl otel-collector:8889/metrics
to confirmBlake Romano
07/11/2022, 1:45 PMkubectl exec -it signoz-otel-collector-metrics-6b8897cb8b-qz6w9 -- bash
Defaulted container "signoz-otel-collector-metrics" out of: signoz-otel-collector-metrics, signoz-otel-collector-metrics-init (init)
error: Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "3fecef848eab715e20bb6523233f610bf8a3dec3b0f0874ad17b85052586d3d6": OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "bash": executable file not found in $PATH: unknown
fyi this error has been very annoying hahaBlake Romano
07/11/2022, 1:46 PMerror: Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "15120171d65129eaa116c987781c453f52ea5171531aa4ab35f1b2e45051bdf0": OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown
Ankit Nayan
Ankit Nayan
Prashant Shahi
07/11/2022, 2:49 PMfyi this error has been very annoying hahayeah,
scratch
that... 😅Prashant Shahi
07/11/2022, 2:50 PMcurl prometheus.k8s.ops.us-west-2.aws.wna.cloud:80/metrics
Blake Romano
07/11/2022, 2:55 PMcurl prometheus.k8s.ops.us-west-2.aws.wna.cloud:80/metrics
<html>
<head><title>308 Permanent Redirect</title></head>
<body>
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx</center>
</body>
</html>
Prashant Shahi
07/11/2022, 2:55 PMkubectl -n platform run -i --tty busybox --image=busybox --restart=Never -- sh
wget -q -O- prometheus.k8s.ops.us-west-2.aws.wna.cloud:80/metrics
Blake Romano
07/11/2022, 2:57 PMPrashant Shahi
07/11/2022, 2:58 PMPrashant Shahi
07/11/2022, 2:58 PMPrashant Shahi
07/11/2022, 3:04 PMBlake Romano
07/11/2022, 3:05 PMprometheus:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 5s
static_configs:
- targets: ["prom-doolittle-dev.k8s.doolittle-nonprod.us-west-2.aws.wna.cloud:80"]
and it works finePrashant Shahi
07/11/2022, 3:07 PMhttps
redirect.
can you create another instance of prometheus receiver, and also set scheme: https
?Blake Romano
07/11/2022, 3:08 PMcurl prom-doolittle-dev.k8s.doolittle-nonprod.us-west-2.aws.wna.cloud:80
<html>
<head><title>308 Permanent Redirect</title></head>
<body>
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx</center>
</body>
</html>
Blake Romano
07/11/2022, 3:08 PMPrashant Shahi
07/11/2022, 3:08 PMPrashant Shahi
07/11/2022, 3:08 PMBlake Romano
07/11/2022, 3:09 PMcurl prom-doolittle-dev.k8s.doolittle-nonprod.us-west-2.aws.wna.cloud:80 -v
* Trying 10.200.217.61:80...
* Connected to prom-doolittle-dev.k8s.doolittle-nonprod.us-west-2.aws.wna.cloud (10.200.217.61) port 80 (#0)
> GET / HTTP/1.1
> Host: prom-doolittle-dev.k8s.doolittle-nonprod.us-west-2.aws.wna.cloud
> User-Agent: curl/7.79.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 308 Permanent Redirect
< Date: Mon, 11 Jul 2022 15:09:06 GMT
< Content-Type: text/html
< Content-Length: 164
< Connection: keep-alive
< Location: <https://prom-doolittle-dev.k8s.doolittle-nonprod.us-west-2.aws.wna.cloud/>
<
<html>
<head><title>308 Permanent Redirect</title></head>
<body>
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host prom-doolittle-dev.k8s.doolittle-nonprod.us-west-2.aws.wna.cloud left intact
Blake Romano
07/11/2022, 3:09 PMcurl prometheus.k8s.ops.us-west-2.aws.wna.cloud:80 -v
* Trying 172.16.4.164:80...
* Connected to prometheus.k8s.ops.us-west-2.aws.wna.cloud (172.16.4.164) port 80 (#0)
> GET / HTTP/1.1
> Host: prometheus.k8s.ops.us-west-2.aws.wna.cloud
> User-Agent: curl/7.79.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 308 Permanent Redirect
< Date: Mon, 11 Jul 2022 15:09:28 GMT
< Content-Type: text/html
< Content-Length: 164
< Connection: keep-alive
< Location: <https://prometheus.k8s.ops.us-west-2.aws.wna.cloud/>
<
<html>
<head><title>308 Permanent Redirect</title></head>
<body>
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host prometheus.k8s.ops.us-west-2.aws.wna.cloud left intact
Prashant Shahi
07/11/2022, 3:10 PMBlake Romano
07/11/2022, 3:12 PMPrashant Shahi
07/11/2022, 3:14 PMtargets
using [ ]
and -
with line breaks.. Or perhaps it could be double quotes.Prashant Shahi
07/11/2022, 3:14 PMBlake Romano
07/11/2022, 3:14 PMBlake Romano
07/11/2022, 3:19 PMPrashant Shahi
07/11/2022, 3:19 PMkuberhealthy
present when you tried curl?Blake Romano
07/11/2022, 3:21 PMPrashant Shahi
07/11/2022, 3:22 PMBlake Romano
07/11/2022, 3:22 PMPrashant Shahi
07/11/2022, 3:23 PMwget -q -O- prometheus.k8s.ops.us-west-2.aws.wna.cloud:80/metrics | grep "^\w*" -o | uniq | sort
Prashant Shahi
07/11/2022, 3:36 PMalso if y’all have any ideas about the kube-prom thing that’d be awesomenot sure about that..
Blake Romano
07/11/2022, 3:36 PMBlake Romano
07/11/2022, 8:24 PMPrashant Shahi
07/12/2022, 6:14 AMPrashant Shahi
07/12/2022, 7:01 AMkubernetes_sd_configs
in otelCollector prometheus receiver: refer to these links:
◦ https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md
◦ https://github.com/prometheus/prometheus/blob/main/documentation/examples/prometheus-kubernetes.ymlBlake Romano
07/12/2022, 11:08 AM