prometheus-kubernetes | Monitoring Kubernetes clusters on AWS , GCP and Azure | Dashboard library
kandi X-RAY | prometheus-kubernetes Summary
kandi X-RAY | prometheus-kubernetes Summary
Monitoring Kubernetes clusters on AWS, GCP and Azure using Prometheus Operator and Grafana
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of prometheus-kubernetes
prometheus-kubernetes Key Features
prometheus-kubernetes Examples and Code Snippets
Community Discussions
Trending Discussions on prometheus-kubernetes
QUESTION
Is there any tools/way to get CPU, MEM, NET metrics of PODs
. Other than below links, is there any tools available
kube-state-metrics
- Able to deploy but no useful POD metrics. You can see the POD metrics here.- kubernetes-monitoring-with-prometheus-in-15-minutes- Installed kube-prometheus with "helm" tool, No POD metrics. Metrics List here
prometheus-kubernetes
- But it strucks at registering custom service forever. check here- Monitoring K8s with Prometheus - In blog they mentioned
container_cpu metrics
, but I dont see any metrics like that
UPDATE1
Tried launch POD with yaml file
as they mentioned in blog. Installed go lang
with GOPATH
& GOROOT
ANSWER
Answered 2017-Oct-26 at 10:49You are looking for cadvisor.
QUESTION
This is my prometheus.yml file and i create configmap using kubectl create configmap prometheus-server-config --from-file=prometheus.yml
ANSWER
Answered 2018-Jun-06 at 06:05I am running the cluster on AWS, the following tutorials work for me https://itnext.io/kubernetes-monitoring-with-prometheus-in-15-minutes-8e54d1de2e13. Let see if you can adapt it. Basicallly, I used helm to install coreos/kube-prometheus
.
# initialize tiller account
kubectl create serviceaccount -n kube-system tiller
kubectl create clusterrolebinding tiller-binding --clusterrole=cluster-admin --serviceaccount kube-system:tiller
helm init --service-account tiller
# install Prometheus app
sleep 1m
helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/
helm install coreos/prometheus-operator --name prometheus-operator --namespace monitoring
helm install coreos/kube-prometheus --name kube-prometheus --namespace monitoring --set global.rbacEnable=true --set prometheus.resources.requests.memory=300Mi
# forward ports
kubectl port-forward -n monitoring prometheus-kube-prometheus-0 9090 &
kubectl port-forward $(kubectl get pods --selector=app=kube-prometheus-grafana -n monitoring --output=jsonpath="{.items..metadata.name}") -n monitoring 3000 &
kubectl port-forward -n monitoring alertmanager-kube-prometheus-0 9093 &
QUESTION
I am able to scrape Prometheus metrics from a Kubernetes service using this Prometheus job configuration:
...ANSWER
Answered 2018-Aug-08 at 02:26Here they use example.io/scrape=true
(and similar annotations for specifying the scrape port and the scrape path if it's not /metrics
), which is how one achieves the "autodiscovery" part.
If you apply that annotation -- and the relevant config snippets in the Prom config -- to a Service
, then Prom will scrape the port and path on the Service
, meaning you will have stats for the Service
itself, and not the individual Endpoints behind it. Similarly, if you label the Pod
s, you will gather metrics for the Pod
s but they would need to be rolled up to have a cross-Pod
view of the state of affairs. There are multiple different resource types that can be autodiscovered, including node and ingress, also. They all behave similarly.
Unless you have grave CPU or storage concerns for your Prom instance, I absolutely wouldn't enumerate the scrape targets in the config like that: I would use the scrape annotations, meaning you can change who is scraped, what port, etc. without having to reconfigure Prom each time.
Be aware that if you want to use their example as-is, and you want to apply those annotations from within the kubernetes resource YAML, ensure that you quote the : 'true'
value, otherwise YAML will promote that to be a boolean literal, and kubernetes annotations can only be string values.
Applying the annotations from the command line will work just fine:
QUESTION
Can someone guide the configuration for auto discover for K8s. The Prometheus server is outside of the cluster. I tried Service Discovery With Kubernetes and someone mentioned in this discussion
I'm not yet a K8s expert enough to explain all the details here, but fundamentally it's perfectly possible to run Prometheus outside of the cluster (and required for things like redundant cross-cluster meta-monitoring). Cf. the
in_cluster
config option in http://prometheus.io/docs/operating/configuration/#kubernetes-sd-configurations-kubernetes_sd_config . You need to jump through certificate hoops if you run it outside.
So, I made a simple configuration
...ANSWER
Answered 2017-Dec-09 at 19:43By digging though the source code I figured out, that Prometheus always uses the in cluster config, if no api_server
is provided in the config (discovery/kubernetes/kubernetes.go#L90-L96
).
Somehow the docs don't say anything about the Kubernetes configuration parameters, but the source code does (config/config.go#L1026-L1037
). Therefore there is not list named api_servers
, but a single parameter named api_server
.
So your config should look like this (untested):
QUESTION
I set up a Kubernetes cluster. Apiserver is started on host 192.168.0.2, and I use self-signed certificate and static token as authentication. The other 2 nodes' ip are 192.168.0.3 and 192.168.0.4
Then I created a prometheus deployment, the config is this. In prometheus dashboard, the two nodes and prometheus self are showed as "UP". However the apiserver is showed "DOWN", and the reason is "context deadline exceeded".
...ANSWER
Answered 2017-Jan-13 at 12:15That sounds like a network issue as the request is timing out. Can you hit that endpoint from inside the Prometheus container?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install prometheus-kubernetes
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page