Visitar URL original
Update setting up Prometheus docs · Issue #5217 · knative/docs · GitHub
Skip to content

Update setting up Prometheus docs #5217

Description

@DevSusu

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: {}

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug.
    on Sep 14, 2022
  2. changed the title [-]Connection refused to control plane 9090 port[/-] [+]Connection refused to control plane metrics port[/+] on Sep 14, 2022
  3. DevSusu commented on Sep 14, 2022

    @DevSusu
    Author

    related issue: knative/eventing#6509

  4. DevSusu commented on Sep 14, 2022

    @DevSusu
    Author

    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
  5. changed the title [-]Connection refused to control plane metrics port[/-] [+]Prometheus metrics not exported by default[/+] on Sep 14, 2022
  6. DevSusu commented on Sep 14, 2022

    @DevSusu
    Author

    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"}}'
    
  7. knative-prow commented on Sep 14, 2022

    @knative-prow

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

    Details

    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.

  8. transferred this issue fromknative/servingon Sep 14, 2022
  9. changed the title [-]Prometheus metrics not exported by default[/-] [+]Update setting up Prometheus docs[/+] on Sep 14, 2022
  10. removed
    kind/bugCategorizes issue or PR as related to a bug.
    on Sep 14, 2022
  11. 10 remaining items

  12. afzal442 commented on Feb 3, 2023

    @afzal442

    /assign @afzal442

  13. removed their assignment
    on Mar 7, 2023
  14. Rajdeep1311 commented on Sep 4, 2023

    @Rajdeep1311

    Can I help?

  15. xiangpingjiang commented on Sep 13, 2023

    @xiangpingjiang
    Contributor

    /assign

  16. removed their assignment
    on Sep 29, 2023
  17. pawarpranav83 commented on Oct 13, 2023

    @pawarpranav83

    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?

  18. pawarpranav83 commented on Oct 13, 2023

    @pawarpranav83

    /assign

  19. added a commit that references this issue on Oct 13, 2023
  20. KamalSritha-04 commented on Oct 27, 2023

    @KamalSritha-04

    Please assign me this issue

  21. removed their assignment
    on Dec 9, 2023
  22. Felix-ming commented on Sep 20, 2026

    @Felix-ming

    Hi, I'd like to work on this issue if it is still available. I plan to verify the current Prometheus setup instructions and update the docs with the required config-observability settings for Knative Serving, keeping the change scoped to the documentation and current release behavior. I'll open a PR with validation notes and links to the relevant docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuehacktoberfestIssues that can be picked up by contributors for Hacktoberfest!help wantedkind/bugCategorizes issue or PR as related to a bug.kind/good-first-issueDenotes an issue ready for a new contributor.kind/servinglifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/nice-to-havetriage/acceptedIssues which should be fixed (post-triage)

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions