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

Prometheus monitoring doc doesn't help to get monitoring working #3428

Closed
bjethwan opened this issue Jul 10, 2022 · 3 comments
Closed

Prometheus monitoring doc doesn't help to get monitoring working #3428

bjethwan opened this issue Jul 10, 2022 · 3 comments
Labels
area/documentation Documentation task area/observability Logging, monitoring and tracing status/stale

Comments

@bjethwan
Copy link

bjethwan commented Jul 10, 2022

Doc: https://camel.apache.org/camel-k/1.9.x/observability/monitoring.html

As per the doc, I installed prometheus-operator.
$ kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/bundle.yaml

Check the error below:

customresourcedefinition.apiextensions.k8s.io/alertmanagerconfigs.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/alertmanagers.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/podmonitors.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/probes.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/prometheusrules.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/servicemonitors.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/thanosrulers.monitoring.coreos.com created
clusterrolebinding.rbac.authorization.k8s.io/prometheus-operator created
clusterrole.rbac.authorization.k8s.io/prometheus-operator created
deployment.apps/prometheus-operator created
serviceaccount/prometheus-operator created
service/prometheus-operator created
**The CustomResourceDefinition "prometheuses.monitoring.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes**

Next statement doesn't work

cat <<EOF | kubectl apply -f -
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  name: prometheus
spec:
  podMonitorSelector:
    matchExpressions:
      - key: camel.apache.org/integration
        operator: Exists
EOF

Error:
error: unable to recognize "STDIN": no matches for kind "Prometheus" in version "monitoring.coreos.com/v1"

Extra:

k get crds | grep monitoring
alertmanagerconfigs.monitoring.coreos.com   2022-07-10T08:48:12Z
alertmanagers.monitoring.coreos.com         2022-07-10T08:48:12Z
podmonitors.monitoring.coreos.com           2022-07-10T08:48:12Z
probes.monitoring.coreos.com                2022-07-10T08:48:12Z
prometheusrules.monitoring.coreos.com       2022-07-10T08:48:12Z
servicemonitors.monitoring.coreos.com       2022-07-10T08:48:12Z
thanosrulers.monitoring.coreos.com          2022-07-10T08:48:13Z
@tadayosi
Copy link
Member

@bjethwan The below error suggests you should do kubectl create -f instead of kubectl apply -f.

The CustomResourceDefinition "prometheuses.monitoring.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

Could you try the following and see if it works?

$ kubectl delete -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/bundle.yaml
$ kubectl create -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/bundle.yaml

If it works, we can just update our docs.

@squakez
Copy link
Contributor

squakez commented Jul 11, 2022

I've recently published a blog. Have a look here to see how to install the Prometheus stack on kubernetes.

@squakez squakez added area/documentation Documentation task area/observability Logging, monitoring and tracing labels Jul 13, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Documentation task area/observability Logging, monitoring and tracing status/stale
Projects
None yet
Development

No branches or pull requests

3 participants