I recently wrote a few
article on installing Grafana and Prometheus.
http://www.whiteboardcoder.com/2021/01/installing-grafana-on-ubuntu-2004.html
[1]
http://www.whiteboardcoder.com/2021/01/installing-prometheus-on-ubuntu-2004.html
[2]
Now that I have it set up and I have prometheus ingesting some data I want to hook it into Promtheus and see some beautiful graphs
Now I want to start getting
some real data into it to have something to graph!
Adding a Data Source
I have Prometheus and
Grafana running on the same box.
Let me ssh into my box and also pull some ports on the way.
> ssh prometheus -L 3000:localhost:3000 -L
9090:localhost:9090 -L 9100:localhost:9100 |
Now check if prometheus and
grafana are running.
> sudo systemctl status grafana-server |
And Prometheus
> sudo systemctl status prometheus |
OK all looks good.
Now let me open up Grafana.
http://localhost:3000/login
Click on Configuration and select Data Sources.
Click Add data sources
Click on Select in the Prometheus
Set URL to http://localhost:9090
All other settings leave as is since I have no SSL or
anything fancy set up in front of prometheus.
Click on Save & Test
Wahoo its working!
Now go back to Data Sources
Now we should see that we have Promtheus as a data source.
Testing data
First let me prove I have some node exporter data in
prometheus.
Head over to http://localhost:9090/graph
Now back to grafana
Click on + and select Dashboard
Click Add New Panel
Enter the query
(100 - 100*(avg by (node)
(irate(node_cpu_seconds_total{mode="idle"}[15m])))) |
Then hit apply
On the right scroll down to Axes and set the Y-Min to 0 and
Y-Max to 100 and click Apply
As you can see nothing much is going on my CPU is not taxed
On my computer let me
run htop to confirm (if you don’t have htop install it with sudo apt-get install
htop
> htop |
Now let’s do something to get our CPU to max out or at least jump up a bit.
Let me install and run stress
> sudo apt-get install stress |
Wow
Run just one cpu
> stress --cpu 1 |
References
[1] Installing Grafana on Ubuntu
20.04
http://www.whiteboardcoder.com/2021/01/installing-grafana-on-ubuntu-2004.html
Accessed 2/2020
[2] Installing Prometheus on
Ubuntu 20.04
http://www.whiteboardcoder.com/2021/01/installing-prometheus-on-ubuntu-2004.html
Accessed 2/2020
I have voiced some of the posts on your website now, and I really like your blogging style. I added it to my list of favorite blogging sites and will be back soon ...
ReplyDeleteDigital Marketing Training in Bangalore
The Extraordinary blog went amazed by the content that they have developed in a very descriptive manner. This type of content surely ensures the participants explore themselves. Hope you deliver the same near the future as well. Gratitude to the blogger for the efforts.
ReplyDeleteMachine Learning Course in Bangalore
Very interesting blog. A lot of the blogs I visit nowadays don't really provide anything that I'm interested in, but I'm definitely interested in this one Turkish e Visa is an electronic visa Turkey that allows entry into Turkey. Once available, eligible foreign will be able to complete the online application process without visiting an embassy or consulate.
ReplyDeleteNice Post thank you very much for sharing such a useful information and will definitely saved and revisit your site and i have bookmarked to check out new things frm your post.
ReplyDeleteData Science Course
Really impressed! Everything is a very open and very clear clarification of the issues. It contains true facts. Your website is very valuable. Thanks for sharing.
ReplyDeleteDigital Marketing Training in Bangalore
I am really enjoying reading your well written articles. I am looking forward to reading new articles. Keep up the good work.
ReplyDeleteData Science Courses in Bangalore
Very good article and liked reading your post, very pleasant to share, I want to tweet this to my followers. Thank you!.
ReplyDeleteDigital Marketing Institute in Hyderabad
First You got a great blog .I will be interested in more similar topics.I commend you for your excellent report on the knowledge that you have shared in this blog.
ReplyDeletedigital marketing training in hyderabad
free digital marketing course in hyderabad
I am hoping the same best effort from you in the future as well and in fact your creative writing skills has inspired me.
ReplyDeleteData Science Course near me
This is an informative and knowledgeable article. therefore, I would like to thank you for your effort in writing this article.
ReplyDeleteData Science Course in Bangalore
Interesting and attractive information. This blog is really rocking... Yes, the post is very interesting and I enjoy it a lot. What to bring to the airport? You will need your passport, copy of ETV and a valid citizen card when you check-in on your flight to India.
ReplyDeleteVery informative Blog! There is so much information here that can help thank you for sharing.
ReplyDeleteData Analytics Training in Bangalore
I got to this amazing site not long ago. I actually captured with the piece of resources you have got here. Thanks for making such wonderful blog page.
ReplyDeleteData Science Course in Ahmedabad
I read your excellent post. It's a great job. I enjoyed reading your post for the first time. I want to thank you for this publication. Thank you...
ReplyDeleteData Science Course in Patna
Very interesting blog. A lot of the blogs I see these days don't provide anything that interests me, but I'm really interested in this one. I just thought I would post and let you know.
ReplyDeleteData Science Course in Ernakulam
This is an informative and knowledgeable article. therefore, I would like to thank you for your effort in writing this article.
ReplyDeleteData Scientist Course in Chandigarh
I enjoyed reading your articles. I have bookmarked it and I am looking forward to reading new articles. Thanks for sharing.
ReplyDeleteData Science Course in Ahmedabad
Really impressed! Information shared was very helpful Your website is very valuable. Thanks for sharing.
ReplyDeleteBusiness Analytics Course in Bangalore
Some really good points you wrote here ... Great things ... I think you raised some really interesting points. Keep up the good work.
ReplyDeleteBest Data Analytics Courses in Bangalore
This comment has been removed by the author.
ReplyDelete