Skip to main content

Posts

Showing posts from April, 2018

MongoDB monitoring by zabbix

What should we monitor? There are many things you can monitor in a MongoDB environment, but a few key areas will tip you off quickly if something is amiss. You should be analyzing the following metrics: Replication lag . Replication lag refers to delays in copying data from the primary node to a secondary node. Replica state . The replica state is a method of tracking if secondary nodes have died, and if there was an election of a new primary node. Locking state . The locking state shows what data locks are set, and the length of time they have been in place. Disk utilization . Disk utilization refers to disk access. Memory usage . Memory usages refers to how much memory is being used, and how it is being used. Number of connections . The number of connections the database has open in order to serve requests as quickly as possible. serverStatus The  serverStatus  command, or  db.serverStatus()  from the shell, returns a general overview of the status of the dat

Monitor monthly bandwidth in zabbix

Monitoring server's used bandwidth is not something that comes integrated with Zabbix by default. First of all we deploy  vnstat  to the target server(s).   vnstat  is a simple program to monitor network traffic: [root@test-ashok ~]# yum install vnstat -y [root@test-ashok ~]# vnstat -u -i ens160   (interface name) [root@test-ashok ~]#  sudo chown -R vnstat: /var/lib/vnstat [root@test-ashok ~]# sudo systemctl start vnstat [root@test-ashok ~]# sudo systemctl enable vnstat root@test-ashok ~]# vnstat -m  eth0  /  monthly        month        rx      |     tx      |    total    |   avg. rate     ------------------------+-------------+-------------+---------------       Apr '18      5.00 GiB |    2.46 GiB |    7.46 GiB |   36.93 kbit/s     ------------------------+-------------+-------------+---------------     estimated      7.65 GiB |    3.76 GiB |   11.41 GiB | Now we need to add small bash script for user parameter for zabbix. #!/bin/bash # Current mo