istio.io icon indicating copy to clipboard operation
istio.io copied to clipboard

Monitoring instructions for using ServiceMonitors

Open upodroid opened this issue 4 years ago • 14 comments

Please provide a description for what this PR is for.

And to help us figure out who should review this PR, please put an X in all the areas that this PR affects.

  • [ ] Configuration Infrastructure
  • [ ] Docs
  • [ ] Installation
  • [ ] Networking
  • [ ] Performance and Scalability
  • [X] Policies and Telemetry
  • [ ] Security
  • [ ] Test and Release
  • [ ] User Experience
  • [ ] Developer Infrastructure

Fixes: https://github.com/istio/istio/issues/27940 Fixes: https://github.com/istio/istio/issues/30063

upodroid avatar Sep 01 '21 13:09 upodroid

Hi @upodroid. Thanks for your PR.

I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

istio-testing avatar Sep 01 '21 13:09 istio-testing

@howardjohn I pulled this from https://github.com/istio/istio/blob/master/samples/addons/extras/prometheus-operator.yaml

I found additional ones here too, but the ones in my PR are sufficient to collect metrics.

https://github.com/istio/installer/blob/master/istio-telemetry/prometheus-operator/templates/servicemonitors.yaml

upodroid avatar Sep 01 '21 13:09 upodroid

Thanks for this - I came across this exact problem a few months back when I started looking at the Prometheus Operator. I think it's better to document what needs to happen (and in what cases you might want to use this). Happy to help write that section.

How would you feel about linking the samples rather than listing them inline?

I also had a problem with my installation in that the operator didn't have RBAC permission to read into the other namespaces. Did you have to deal with this in your setup? This might be a side effect of the kube-prometheus "easy button" setup I used.

craigbox avatar Sep 01 '21 15:09 craigbox

That is a common gotcha for why Prom Operator doesn't pick up ServiceMonitors/PodMonitors in different namespaces.

Add this to the prom-operator helm chart:

# helm upgrade --install prometheus prometheus-community/kube-prometheus-stack -f prom-operator.yaml -n monitoring
prometheus:
  prometheusSpec:
    serviceMonitorSelectorNilUsesHelmValues: false
    podMonitorSelectorNilUsesHelmValues: false

I can expand on the docs.

upodroid avatar Sep 01 '21 15:09 upodroid

/ok-to-test

ericvn avatar Sep 09 '21 21:09 ericvn

/test doc.test.profile_default_istio.io

ericvn avatar Sep 10 '21 16:09 ericvn

We came across this yesterday - happy to see this PR!

    ./en/docs/ops/integrations/prometheus/index.md
      116 | ### Istio ServiceMonitors and PodMonitors 
      116 | ### Istio ServiceMonitors and PodMonitors 
      118 | age Prometheus, the following PodMonitor and ServiceMonitor can collec 
      118 |  the following PodMonitor and ServiceMonitor can collect metrics from the  

>> 4 spelling errors found in 729 files
To learn how to address spelling errors, please see https://istio.io/about/contribute/build/#test-your-changes
./en/docs/ops/integrations/prometheus/index.md:32: MD034 Bare URL used

@upodroid, PodMonitor and ServiceMonitor needs to be added to .spelling .. and bare url needs to be wrapped in a markdown link

rvennam avatar Sep 15 '21 18:09 rvennam

We came across this yesterday - happy to see this PR!

    ./en/docs/ops/integrations/prometheus/index.md
      116 | ### Istio ServiceMonitors and PodMonitors 
      116 | ### Istio ServiceMonitors and PodMonitors 
      118 | age Prometheus, the following PodMonitor and ServiceMonitor can collec 
      118 |  the following PodMonitor and ServiceMonitor can collect metrics from the  

>> 4 spelling errors found in 729 files
To learn how to address spelling errors, please see https://istio.io/about/contribute/build/#test-your-changes
./en/docs/ops/integrations/prometheus/index.md:32: MD034 Bare URL used

@upodroid, PodMonitor and ServiceMonitor needs to be added to .spelling .. and bare url needs to be wrapped in a markdown link

They do not need to be added to .spelling, but back-ticks should be used: https://istio.io/latest/docs/releases/contribute/formatting/

Link about URLs: https://istio.io/latest/docs/releases/contribute/shortcodes/#add-links-to-other-pages

ericvn avatar Sep 15 '21 21:09 ericvn

make lint is very slow on my Mac. I hope this commit fixes it.

upodroid avatar Sep 15 '21 22:09 upodroid

/test doc.test.profile_default_istio.io

ericvn avatar Sep 16 '21 20:09 ericvn

Failed lint is due to my bad suggestion :( It doesn't like prometheus-community and kube-prometheus-stack. If you want to put it back to GitHub or Prometheus community GitHub, that would work

rvennam avatar Sep 27 '21 20:09 rvennam

/retest

upodroid avatar Oct 15 '21 15:10 upodroid

@upodroid: PR needs rebase.

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.

istio-testing avatar Jun 13 '22 22:06 istio-testing

@upodroid: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
doc.test.profile_default_istio.io 59b7451a72d52f106a6db8c6c5174407b8189e4f link true /test doc.test.profile_default
doc.test.multicluster_istio.io 59b7451a72d52f106a6db8c6c5174407b8189e4f link true /test doc.test.multicluster
doc.test.profile_demo_istio.io 59b7451a72d52f106a6db8c6c5174407b8189e4f link true /test doc.test.profile_demo
doc.test.profile_none_istio.io 59b7451a72d52f106a6db8c6c5174407b8189e4f link true /test doc.test.profile_none
doc.test.profile_minimal_istio.io 59b7451a72d52f106a6db8c6c5174407b8189e4f link true /test doc.test.profile_minimal
doc.test.profile-default_istio.io 59b7451a72d52f106a6db8c6c5174407b8189e4f link true /test doc.test.profile-default
doc.test.profile-minimal_istio.io 59b7451a72d52f106a6db8c6c5174407b8189e4f link true /test doc.test.profile-minimal
doc.test.profile-none_istio.io 59b7451a72d52f106a6db8c6c5174407b8189e4f link true /test doc.test.profile-none
doc.test.profile-demo_istio.io 59b7451a72d52f106a6db8c6c5174407b8189e4f link true /test doc.test.profile-demo

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. I understand the commands that are listed here.

istio-testing avatar Jun 15 '23 17:06 istio-testing