Learn MongoDB Health Checks/Monitoring with Prometheus & Grafana

  Рет қаралды 8,506

Avinashkumar - The Learning Destination

Avinashkumar - The Learning Destination

2 жыл бұрын

This tutorial helps you to setup MongoDB monitoring with the help of Prometheus & Grafana.
Below are the commands that has been used in this tutorial:
mkdir mongodb-exporter
cd mongodb-exporter
wget github.com/percona/mongodb_ex...
tar xvzf mongodb_exporter-0.7.1.linux-amd64.tar.gz
sudo useradd -rs /bin/false prometheus
sudo mv mongodb_exporter /usr/local/bin/
mongo --port 27017
use admin
db.createUser(
{
user: "mongodb_exporter",
pwd: "password",
roles: [
{ role: "clusterMonitor", db: "admin" },
{ role: "read", db: "local" }
]
}
)
exit
sudo mongod --auth --port 27017 --config /etc/mongodb.conf &
export MONGODB_URI=mongodb://mongodb_exporter:password@localhost:27017
cd /lib/systemd/system/
sudo touch mongodb_exporter.service
[Unit]
Description=MongoDB Exporter
User=prometheus
[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/mongodb_exporter --mongodb.uri=mongodb://mongodb_exporter:password@localhost:27017
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start mongodb_exporter.service
Edit Prometheus Conf File
- job_name: 'prometheus'
static_configs:
- targets: ['IP_ADRESS:9090', 'IP_ADRESS:9216']
Restart Prometheus Server

Пікірлер: 30
@ankitbhatti667
@ankitbhatti667 10 ай бұрын
Very well explained. Thanks for the video.
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 10 ай бұрын
Thank you so much Ankit. Please share my channel within your network on LinkedIn.
@oswaldogvzla
@oswaldogvzla Жыл бұрын
Hi, I'm very grateful to you, a content very very useful. Thx. 👍
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest Жыл бұрын
Thank you so much for your valuable words. It encourages me a lot. Please help me by sharing my channel within your network 🙏
@mdsiddiqaamiri3019
@mdsiddiqaamiri3019 2 жыл бұрын
Thank you so much
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 2 жыл бұрын
Welcome Bro
@mohammedsaqlainmushtaq2207
@mohammedsaqlainmushtaq2207 2 жыл бұрын
How to create metrics of our own database data stored in mongodb other than the system information ?
@shindeaditya1316
@shindeaditya1316 Жыл бұрын
How to create user under the mongo system that you not shown ? Tell me plz
@nikhilverma1552
@nikhilverma1552 2 жыл бұрын
sir i am getting this error: server returned error on SASL authentication step ......kindly help
@marutigolande3073
@marutigolande3073 Жыл бұрын
Hi sir i am faccing tls disable error in mongodb exporter serfvice status in ubuntu. how i resolve this?
@mquanit
@mquanit 10 ай бұрын
No data is showing after setting up prometheus and grafana successfully. Charts are empty.
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 10 ай бұрын
Hi, is there anything you see in system logs for prometheus?
@rappalini
@rappalini 2 жыл бұрын
Hi! Beautyful work!!!! I just have one question... I follow all the steps, but in prometheus I only get "mongoup" metric... no the full set of mongodb metrics. What could I been doing wrong??
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 2 жыл бұрын
Thanks for valuable comments @pablo Sorry for delay in my response, Could you please check that the user "mongodb_exporter user has been successfully created and having correct permissions.
@rappalini
@rappalini 2 жыл бұрын
@@avinashkumar-thelearningdest I dont have a "mongodb_exporter" user, I only create thue user "prometheus" with this command: sudo useradd -rs /bin/false prometheus
@rappalini
@rappalini 2 жыл бұрын
I check, I have the user prometheus in the system, and the user "mongodb_exporter" in the DB Mongo... It has the same as the data you provided... What can be happening?
@durantapatra443
@durantapatra443 Жыл бұрын
​@@rappalini did that worked for you ? mongodb_exporter you had to create?
@chanakyareddyk8515
@chanakyareddyk8515 2 жыл бұрын
Cloud you please help me , it will works for Mongodb Atlas "mongodb_exporter" will work are not please do some videos , i think Mongodb Altas this cloud cluster how we can configure Grafana or Prometheus
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 2 жыл бұрын
Hi Chanakya, sure l will make a tutorial on MongoDB Atlas. Now a days bot busy in office work. Please allow me sometime.
@rajusangam7480
@rajusangam7480 9 ай бұрын
I followed and successful successfully done, How to setup alerts like cpu usage, memory usage, disk space, slow queries
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 9 ай бұрын
I'm glad to hear you have done it successfully, brother. Please help me to promote my channel within your network 🙏 feel free to reach me if need any technical help.
@rajusangam7480
@rajusangam7480 9 ай бұрын
Number?
@mdsiddiqaamiri3019
@mdsiddiqaamiri3019 2 жыл бұрын
Sir Can you please setup complete dashboard with related to monitor on daily based
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 2 жыл бұрын
Thank you for your comment brother, I will cover it soon. Please help me to share my channel within your network 🙏 ask your friends and colleagues to subscribe it.
@mdsiddiqaamiri3019
@mdsiddiqaamiri3019 2 жыл бұрын
@@avinashkumar-thelearningdest yes sir definitely, please make some more videos on mongodb monitoring
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 2 жыл бұрын
I will brother. Thanks 😊
@yarraramu4774
@yarraramu4774 2 жыл бұрын
can't we get data directly from mongoDB without using prometheus?
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 2 жыл бұрын
I think, it can be as when you add Datasource "MongoDB" in Grafana. Bit I would recommend, go with Prometheus as you can easily track more then 100 metrics with prometheus.
@yarraramu4774
@yarraramu4774 2 жыл бұрын
@@avinashkumar-thelearningdest Thank you...
How to monitor InfluxDB with Telegrafs & Grafana #influxdb #telegraf #grafana #devops
15:27
Avinashkumar - The Learning Destination
Рет қаралды 824
How Prometheus Monitoring works | Prometheus Architecture explained
21:31
TechWorld with Nana
Рет қаралды 1 МЛН
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 42 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:26
CRAZY GREAPA
Рет қаралды 3,5 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 11 МЛН
How to Monitor MySQL/MariaDB through Prometheus & Grafana ? #prometheus #grafana #mysql #mariadb
18:21
Avinashkumar - The Learning Destination
Рет қаралды 9 М.
How to Monitor PostgreSQL with Prometheus & Grafana ? #prometheus #grafana #postgresql #database
15:57
Avinashkumar - The Learning Destination
Рет қаралды 16 М.
Creating Grafana Dashboards for Prometheus | Grafana Setup & Simple Dashboard (Chart, Gauge, Table)
13:51
Prometheus Monitoring with Julius | PromLabs
Рет қаралды 68 М.
Monitoring for MongoDb | MongoDb Performance and Health Check
24:35
Smarty Tech Fizz
Рет қаралды 9 М.
Server Monitoring with Grafana Prometheus and Loki
51:44
Piyush Garg
Рет қаралды 43 М.
Open source observability explained - the Grafana Labs stack
19:32
Setup Prometheus & Grafana Monitoring On Kubernetes Using Helm
32:12
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 42 МЛН