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

added x-metrics pod monitor #8

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

added x-metrics pod monitor #8

wants to merge 34 commits into from

Conversation

humoflife
Copy link
Collaborator

Description of your changes

Added x-metrics pod monitor. Please review.

Fixes #

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

humoflife and others added 2 commits October 30, 2023 21:37
… namespace selectors for crossplane-system and upbound-system

Signed-off-by: Christopher Haar <[email protected]>
@haarchri
Copy link
Member

haarchri commented Nov 1, 2023

@humoflife
Copy link
Collaborator Author

Adding the usage did not let prometheus display the target. Still exploring other possible causes for the x-metrics podMonitor not showing up.

@humoflife
Copy link
Collaborator Author

/test-examples

@humoflife
Copy link
Collaborator Author

/test-examples

@humoflife
Copy link
Collaborator Author

/test-examples

@humoflife
Copy link
Collaborator Author

/test-examples

@haarchri
Copy link
Member

haarchri commented Nov 8, 2023

Can you rebase this branch ?

@humoflife
Copy link
Collaborator Author

/test-examples

Comment on lines +113 to +119
- name: podMonitorXmetrics
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
metadata:
labels:
type: podMonitorXmetrics

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X-metrics installs with a service, when a service exists, it is better to use a service monitor for Prometheus. The helm chart already supports service monitor, use helm values to enable it.

README.md Outdated
Comment on lines 8 to 21
**Warning**
## Disclaimer: Management Cluster Resource Use
Prometheus and Grafana may require significant cluster resources in relation
to the amount of metrics scraped, processed and visualized. This may impact
cluster operations. Consult the respective Prometheus Operator and
Grafana documentation for set up guidance prior to using this configuration
on mission critical Crossplane management clusters.

**Warning**
## Disclaimer: Metric Stability
Crossplane has no concept of metric stability. This implies
that metrics used in this configuration may be absent in future versions
of Crossplane and / or its providers.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These warning messages do not provide much direction and the language has negative connotation. Consider rewriting them. What is the goal of having them here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal is to guide users to keep their mission critical management clusters happily operational through proper Prometheus tuning. I'll come up with more positive wording.

README.md Outdated
@@ -20,37 +34,32 @@ at the conclusion of the tests by default.

Apply the resource claim as follows to re-create
the namespace, Prometheus, Grafana and dependencies for further

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the claim 're-creating' the ns, Prometheus, and Grafana?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we offer a make cluster so that the workflow does not duplicate the installation after Uptest cleaned up its test setup? Users who want to run make e2e could do it purposefully as a separate step with or without pre-existing cluster.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a make cluster option.

exploration.
exploration. Note that the xmetrics configuration examples
rely on the CRDs to be installed through the oss composition
first.
```
kubectl apply -f examples/oss.yaml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this claim installing x-metrics? If so, change the name. OSS is very generic, I would avoid using it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you recommend to not use oss.yaml for the claim name, even though x-metrics, prometheus and grafana are open source?

If so, which name would resonate with you?

README.md Outdated
Comment on lines 49 to 50
To load dashboards that are part of this configuration repository,
please apply the following dashboard resource claims.
Copy link

@candonov candonov Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To load dashboards that are part of this configuration repository,
please apply the following dashboard resource claims.
The following command will apply all the dashboard resource claims located in the `dashboards` folder. Each claim will create a respective Grafana dashboard.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

README.md Outdated
tail +2|\
grep prometheus-0)
kubectl -n operators port-forward ${PROMETHEUS_POD_NAME} 9090
kubectl -n operators port-forward prometheus-oss-kube-prometheus-stack-prometheus-0 9090

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl -n operators port-forward prometheus-oss-kube-prometheus-stack-prometheus-0 9090
kubectl -n operators port-forward svc/kube-prometheus-stack-prometheus 9090:9090

README.md Outdated
tail +2|\
grep prometheus-0)
kubectl -n operators port-forward ${PROMETHEUS_POD_NAME} 9090
kubectl -n operators port-forward prometheus-oss-kube-prometheus-stack-prometheus-0 9090
```

Use the following to forward localhost:3000 to the Grafana pod.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Use the following to forward localhost:3000 to the Grafana pod.
To access the Grafana dashboard, port-forward to the Grafana service on port 80.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

metadata:
name: upbound-metric-sample
spec:
matchName: ".upbound.io"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates a lot of custom metrics, can you provide an example with a list of common families instead?

Copy link
Collaborator Author

@humoflife humoflife Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added more narrow scoped matches, e.g. ".s3.aws.upbound.io" or ".ec2.aws.upbound.io", etc.

Comment on lines +1 to +7
---
apiVersion: metrics.crossplane.io/v1
kind: ClusterMetric
metadata:
name: clustermetric-sample
spec:
matchName: ".crossplane.io"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for the community provider?

Crossplane has no concept of metric stability. This implies
that metrics used in this configuration may be absent in future versions
of Crossplane and / or its providers.

## Purpose
The goal for configuration-observability-oss is to complement
other configurations such as configuration-caas. See the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is configuration-caas?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configuration-caas is a plug and play configuration for cluster as a service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants