-
-
Notifications
You must be signed in to change notification settings - Fork 201
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
For questions, doubts, guidances please use Discussions. Don't open a new Issue. #91
Comments
I faced with an Issue, in which I couldn't open grafana and prometheus applications (link https://grafana.192.168.0.106.nip.io)
In the browser I got same Issue "Unable to connect". I'm using k3s and I configured my master ip address I managed to successfully deploy all pods but I don't know how do I need to connect to the applications
Do you have any suggestions ? |
You need to troubleshoot the access to your K3s cluster ingress that bridges the outside HTTP/HTTPS traffic to the pods. Here is a reference: https://rancher.com/docs/k3s/latest/en/networking/ Have you deployed any application that uses HTTP(like NGINX, Apache) and been able to access it from your computer? It's similar to access Prometheus, Grafana and AlertManager. |
Yes, I created own blog site on JS but I didn't use ingress, I configured externalIP on Service, so... I will try to troubleshoot this issue. |
I solve this issue. Thank for advice, at the end I just installed nginx, configured it and after that I was able to access to prometheus and grafana. |
Love this project! I am unable to access prometheus.*.nip.io . I can access both Grafana and Alert manager. My ingress shows Prometheus, and is setup correctly. The one odd thing is when I look at all my pods in Monitoring ns; I do not have Prometheus-K8s (or something along those lines that I have seen in videos). The pods I have are Prometheus Adapter and Operator. I have Re-ran make vendor and deployed them. Same thing, again no errors anywhere. And also Prometheus-K8s has a service as I just looked. Does this make any sense? TIA |
Is there a way to deploy grafana and prometheus pods to the master node only ? Because sometimes they are deployed to workers |
@exArax You need to set your master nodes as schedulable. Even this way, Kubernetes can deploy the pods to other nodes. If you need to set to a specific set of nodes, you need pod affinity. |
Doesn't make too much sense since the pods are created by the operator. Re-check your cluster and re-deploy the stack. |
I redeployed and all is well, thank you |
In case of grafana, I have to add the node affinity on the grafana-deployment.yaml that is inside the manifests folder, right? |
Yes, since the jsonnet code doesn't have the pod affinity for this. |
Hi Carlos, root@asus:~/cluster-monitoring# Do you have any suggestions? This is the configuration:
Thank you in advance! |
You need an ingress controller that supports authentication. look at
|
Sorry, so many variables that it's hard to know. Start deploying a test application, check your node IPs and so on. |
Hi Carlos, Robe |
To collect metrics from SNMP you need the snmp_exporter. It's out of scope of this stack but take a look at another project I have here: https://github.com/carlosedp/ddwrt-monitoring. It's not in Kubernetes but I use it for SNMP. |
Thank you Carlos |
Hello again, I want to add some authentication on prometheus.192.168.1.x.nip.io. Is there a way to do something like this https://prometheus.io/docs/guides/basic-auth/ or https://www.openshift.com/blog/adding-authentication-to-your-kubernetes-web-applications-with-keycloak on the prometheus.192.168.1.x.nip.io ? I do not know which file I have to edit to add authentication to Prometheus. |
As I mentioned before, the stack doesn't have anything built-in to provide authentication but you could change the ingresses to you your ingress controller (Traefik, HAProxy, etc) to add a layer of authentication. Another option is similar to the post you linked to but that would require adding the keycloak sidecar to every pod. |
Firstly, thanks for all the work you put into this @carlosedp 👏🏻. Prometheus seems to be running into an error root@pi-master:/home/pi# kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.5+k3s1", GitCommit:"58ebdb2a2ec5318ca40649eb7bd31679cb679f71", GitTreeState:"clean", BuildDate:"2020-05-06T23:42:31Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/arm"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.5+k3s1", GitCommit:"58ebdb2a2ec5318ca40649eb7bd31679cb679f71", GitTreeState:"clean", BuildDate:"2020-05-06T23:42:31Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/arm"}
root@pi-master:/home/pi#
root@pi-master:/home/pi# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
root@pi-master:/home/pi# |
@carlosedp to change the ingresses I have to edit only the ingress-XXXX.yaml files or are there more files that I have to edit ? |
Hey @carlosedp I was wondering if you have any interest in seeing loki ("Prometheus, but for logs") added to this tech stack? I was thinking of taking a stab at it this coming Monday |
Hey @carlosedp really thanks for this stack i am using this in a few clusters that i have! One question though, how do i add a new job into prometheus? I didn't find anything describing the jobs! |
I came here with the same question... |
@carlosedp Kubernetes maintainers changed However, after K8s releases 1.22, this method will fail For long term fix: Ingress-alertmanager.yaml
Ingress-grafana.yaml
Ingress-promethus.yaml
Make sure you change the host |
Hi there, I am learning kubernetes, so I deployed a small cluster on some Raspberry Pis. However, I cannot reach my grafana instance (grafana.192.168.1.100.nip.io). I updated the ingress files following the post above, but to no avail. Does anyone have any suggestions on what to do? Cheers! |
Hi, I configured K3s with MetalLB and for some reason the ingress now doesn't work, is there a way to make the prometheus-k8s-0 to use the hostNetwork: true option? I have added in the prometheus-prometheus.yaml in the spec section but it doesn't seem to work |
Hello all, However i'm not able to connect in browser. I'm aware microk8s isn't officially supported so unsure if it is an issue with this version of kubernetes. This has happened with and without applying the fixes for Thank you! |
I had a same error on k3s version v1.21.2+k3s1 (5a67e8dc) go version go1.16.4 There are 3 master node on EC2 and jetson nano(arm64) via the VPN network, and else are Raspberry Pi arm64. $sudo kubectl get node
NAME STATUS ROLES AGE VERSION
ip-xxx-xxx-xxx-xxx Ready control-plane,master 14d v1.21.1+k3s1
ip-yyy-yyy-yyy-yyy Ready control-plane,master 14d v1.21.1+k3s1
pi4-node2 Ready <none> 33m v1.21.2+k3s1
jetson-master Ready control-plane,master 14d v1.21.2+k3s1
pi4-node1 Ready <none> 37m v1.21.2+k3s1 Thanks |
I don't see how this can work with later version of k3s, since they disabled metrics listening on any interface other than 127.0.0.1 |
I think those two were always dead when I looked at those stats too, they might just not work with k3s? |
Hi, I want to monitor Minio metrics, which files I have to edit to make Prometheus scrape data from it? |
This stack is built to monitor cluster nodes. New added nodes will be automatically monitored. |
Check the modules directory where I have additional scrapers that can be enabled in vars.json. |
@DrumSergio @lauchokyip yes, since Ingress API changed, old version was deprecated in 1.22. I'd welcome a PR :) |
Hi, Nice work! Is it possible to add the speed-test-exporter (https://docs.miguelndecarvalho.pt/projects/speedtest-exporter) to this deployment? Seems like I need to add the exporter to the prometheus.yml but this file is buried in the prometheus-k8s-0 pod and not exposed. Any guidance if someone has already done it? Thanks |
Love the project - I'm wondering how I go about updating though? I want to get Basically I just want to know if it's safe to bump versions and what I should be looking out for - I haven't had much luck so far. |
|
Hey, I am not sure where my problem is. I am unable to connect to any of the ingresses.
but opening the browser on that address fails. All pods seems to be running:
|
Try kubectl get ingress -n monitoring Warning: extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress still exist today |
How does one can create a custom scarper? I have my own metrics endpoint and I want Prometheus to scrape it, how can I add that? |
I've created a new PR for just this here: #116 cc: @carlosedp |
It seems that the I came across a newer project which has been kept up to date https://github.com/jsonnet-libs/k8s-libsonnet and gave it a shot porting this project over to using it, but with not much success (I'm not very familiar with jsonnet). By the looks of things it might be a bit of work to do it. Wondering what your thoughts are @carlosedp and if you might have the time to update? |
@carlosedp I have locally updated all dependencies, once to the latest kube-prometheus version, and once to version 0.8, which is the last one that supports Kubernetes 1.20. Should I push this as a Draft PR as a starting point for someone else to continue, or discard it since I couldn't get it to work? |
@carlosedp Any idea what the end points need to look like? It seems they now only respond when accessed over localhost/127.0.0.1 and not over the cluster ip for the manager (even locally). I tried to change the IP to 127.0.0.1 in the endpoint manifest for kube control manager but it won't allow it. Any idea how we can fix this? |
Hi @carlosedp , I want to add in this stack a pod thati s actually an exporter for Kubevirt. The procedure requires to add a deployment file and service file for sure, but how would I configure Prometheus to scrape from kubevirt-prometheus-metrics? Which file should I edit? Update If found that I don't need an exporter. Based on thishttps://kubevirt.io/user-guide/operations/component_monitoring/ I can integrate Kubevirt with Prometheus Operator. The thing is that I am applying to Kubevirt the namespace monitoring and the service account of the Operator (prometheus-operator) and I can't see the metrics that start with kubevirt_vmi. |
@radicalgeek I actually locally tweaked I compared the generated manifests with those for kube-dns, and couldn't find any difference that I could explain this with.
|
Hi again, I am deploying a VM through Kubevirt, which has cirros inside with node exporter. How can I add an endpoint for this exporter to Prometheus? |
Hi all, I've just enabled Discussions on the project so we can have a proper forum for talking about it. Please head to https://github.com/carlosedp/cluster-monitoring/discussions. I won't close this issue so it can be a pointer for new people. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Since I don't have too many resources and time to address all questions regarding the deployments, the Issues section is a place to report problems or improvements to the stack.
This issue is a place where you can add a comment in case of a question where me or any community member can answer in a best effort manner.
If you deployed the monitoring stack and some targets are not available or showing no metrics in Grafana, make sure you don't have IPTables rules or use a firewall on your nodes before deploying Kubernetes.
If you don't want to receive further notifications, click "Unsubscribe" in the right bar, right above the participants list.
The text was updated successfully, but these errors were encountered: