Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setting up Prometheus docs #5217

Open
DevSusu opened this issue Sep 14, 2022 · 12 comments
Open

Update setting up Prometheus docs #5217

DevSusu opened this issue Sep 14, 2022 · 12 comments
Labels
good first issue hacktoberfest Issues that can be picked up by contributors for Hacktoberfest! help wanted kind/bug Categorizes issue or PR as related to a bug. kind/good-first-issue Denotes an issue ready for a new contributor. kind/serving lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/nice-to-have triage/accepted Issues which should be fixed (post-triage)

Comments

@DevSusu
Copy link

DevSusu commented Sep 14, 2022

psschwei: originally opened in serving and moved here. updates needed for docs can be found in this comment: #5217 (comment)

/area monitoring

What version of Knative?

1.7.1 (installed with https://github.com/knative/serving/releases/download/knative-v1.7.1/serving-core.yaml)

Expected Behavior

Actual Behavior

kubectl port-forward service/activator-service -n knative-serving 9090:9090
Forwarding from 127.0.0.1:9090 -> 9090
Forwarding from [::1]:9090 -> 9090
Handling connection for 9090
E0914 16:42:51.809345 3007207 portforward.go:400] an error occurred forwarding 9090 -> 9090: error forwarding port 9090 to pod 4f48d8d6708f2f6cc464957b6718d2ec89088951c6430acfb0fb04857e595a94, uid : exit status 1: 2022/09/14 07:42:51 socat[13441] E connect(5, AF=2 127.0.0.1:9090, 16): Connection refused

I had to specify the metrics.backend-destination and metrics.request-metrics-backend-destination to get this working.

Steps to Reproduce the Problem

apiVersion: v1
kind: ConfigMap
metadata:
  name: config-observability
  namespace: knative-serving
  labels:
    app.kubernetes.io/name: knative-serving
    app.kubernetes.io/component: observability
    app.kubernetes.io/version: "1.7.1"
  annotations:
    knative.dev/example-checksum: "fed4756e"
data: {}
@DevSusu DevSusu added the kind/bug Categorizes issue or PR as related to a bug. label Sep 14, 2022
@DevSusu DevSusu changed the title Connection refused to control plane 9090 port Connection refused to control plane metrics port Sep 14, 2022
@DevSusu
Copy link
Author

DevSusu commented Sep 14, 2022

related issue: knative/eventing#6509

@DevSusu
Copy link
Author

DevSusu commented Sep 14, 2022

resolved by editing configmap

apiVersion: v1
kind: ConfigMap
metadata:
  name: config-observability
  namespace: knative-serving
  labels:
    app.kubernetes.io/name: knative-serving
    app.kubernetes.io/component: observability
    app.kubernetes.io/version: "1.7.1"
  annotations:
    knative.dev/example-checksum: "fed4756e"
data:
  metrics.backend-destination: prometheus
  metrics.request-metrics-backend-destination: prometheus

@DevSusu DevSusu closed this as completed Sep 14, 2022
@DevSusu DevSusu changed the title Connection refused to control plane metrics port Prometheus metrics not exported by default Sep 14, 2022
@DevSusu DevSusu reopened this Sep 14, 2022
@DevSusu
Copy link
Author

DevSusu commented Sep 14, 2022

I think we need to add below block to setting up prometheus part.

https://knative.dev/docs/serving/observability/metrics/collecting-metrics/#setting-up-prometheus

kubectl patch --namespace knative-serving configmap/config-observability \
  --type merge \
  --patch '{"data":{"metrics.backend-destination":"promethuus","metrics.request-metrics-backend-destination":"prometheus"}}'

kubectl patch --namespace knative-serving configmap/config-observability \
  --type merge \
  --patch '{"data":{"metrics.backend-destination":"promethuus","metrics.request-metrics-backend-destination":"prometheus"}}'

@knative-prow
Copy link

knative-prow bot commented Sep 14, 2022

@DevSusu: The label(s) area/monitoring cannot be applied, because the repository doesn't have them.

In response to this:

/area monitoring

What version of Knative?

1.7.1 (installed with https://github.com/knative/serving/releases/download/knative-v1.7.1/serving-core.yaml)

Expected Behavior

Actual Behavior

kubectl port-forward service/activator-service -n knative-serving 9090:9090
Forwarding from 127.0.0.1:9090 -> 9090
Forwarding from [::1]:9090 -> 9090
Handling connection for 9090
E0914 16:42:51.809345 3007207 portforward.go:400] an error occurred forwarding 9090 -> 9090: error forwarding port 9090 to pod 4f48d8d6708f2f6cc464957b6718d2ec89088951c6430acfb0fb04857e595a94, uid : exit status 1: 2022/09/14 07:42:51 socat[13441] E connect(5, AF=2 127.0.0.1:9090, 16): Connection refused

I had to specify the metrics.backend-destination and metrics.request-metrics-backend-destination to get this working.

Steps to Reproduce the Problem

apiVersion: v1
kind: ConfigMap
metadata:
 name: config-observability
 namespace: knative-serving
 labels:
   app.kubernetes.io/name: knative-serving
   app.kubernetes.io/component: observability
   app.kubernetes.io/version: "1.7.1"
 annotations:
   knative.dev/example-checksum: "fed4756e"
data: {}

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@psschwei psschwei transferred this issue from knative/serving Sep 14, 2022
@psschwei psschwei changed the title Prometheus metrics not exported by default Update setting up Prometheus docs Sep 14, 2022
@psschwei psschwei removed the kind/bug Categorizes issue or PR as related to a bug. label Sep 14, 2022
@abrennan89 abrennan89 added kind/bug Categorizes issue or PR as related to a bug. kind/good-first-issue Denotes an issue ready for a new contributor. priority/nice-to-have kind/serving lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Issues which should be fixed (post-triage) hacktoberfest Issues that can be picked up by contributors for Hacktoberfest! labels Sep 26, 2022
@abrennan89 abrennan89 moved this to In design in Docs WG Roadmap Sep 26, 2022
@abrennan89 abrennan89 moved this from In design to Ready to work in Docs WG Roadmap Sep 26, 2022
@evankanderson
Copy link
Member

/good-first-issue

@knative-prow
Copy link

knative-prow bot commented Dec 8, 2022

@evankanderson:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@afzal442
Copy link

afzal442 commented Feb 3, 2023

/assign @afzal442

@afzal442 afzal442 removed their assignment Mar 7, 2023
@Rajdeep1311
Copy link

Can I help?

@xiangpingjiang
Copy link
Contributor

/assign

@xiangpingjiang xiangpingjiang removed their assignment Sep 29, 2023
@pawarpranav83
Copy link

pawarpranav83 commented Oct 13, 2023

I think we need to add below block to setting up prometheus part.

https://knative.dev/docs/serving/observability/metrics/collecting-metrics/#setting-up-prometheus

kubectl patch --namespace knative-serving configmap/config-observability \
  --type merge \
  --patch '{"data":{"metrics.backend-destination":"promethuus","metrics.request-metrics-backend-destination":"prometheus"}}'

kubectl patch --namespace knative-serving configmap/config-observability \
  --type merge \
  --patch '{"data":{"metrics.backend-destination":"promethuus","metrics.request-metrics-backend-destination":"prometheus"}}'

The config map is to be set before we apply the ServiceMonitors/PodMonitors to collect metrics from Knative, right?

@pawarpranav83
Copy link

/assign

pawarpranav83 added a commit to pawarpranav83/docs that referenced this issue Oct 13, 2023
Editing the config map with specified commands.
Issue knative#5217.
@KamalSritha-04
Copy link

Please assign me this issue

@pawarpranav83 pawarpranav83 removed their assignment Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue hacktoberfest Issues that can be picked up by contributors for Hacktoberfest! help wanted kind/bug Categorizes issue or PR as related to a bug. kind/good-first-issue Denotes an issue ready for a new contributor. kind/serving lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/nice-to-have triage/accepted Issues which should be fixed (post-triage)
Projects
Status: Ready to work
Development

No branches or pull requests

9 participants