camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

Prometheus monitoring doc doesn't help to get monitoring working

Open bjethwan opened this issue 3 years ago • 2 comments

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

bjethwan avatar Jul 10 '22 08:07 bjethwan

@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.

tadayosi avatar Jul 11 '22 04:07 tadayosi

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

squakez avatar Jul 11 '22 08:07 squakez

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!

github-actions[bot] avatar Oct 12 '22 00:10 github-actions[bot]