Ubuntu – System monitoring with email notifications

emailnotificationsystem

I currently have an Ubuntu Server 16.04 LTS and I want to be able to receive email notifications with information about the resource usage on my server. CPU, memory, swap, you name it.

I understand that I can use Glances for local monitoring but I won't be on the console looking at the information all the time. I just need email notifications that inform me of resources that hit above normal/critical values and get notified.

Does anyone know of a method that allows me to do this?

Best Answer

I'll give you a small list of tools - while I would personally recommend Nagios simply as I am used to it. It comes with a big user base, good collection of plug-ins etc - but I've heard good things about Icinga as well.

Be aware that setting up Nagios or Icinga will take some time until you have a perfectly working setup which covers / monitors all your existing services. The start is most likely not that easy, but once you got it working it's a lovely setup which will notify for all your defined services if states do change so something which is reportable/defined as critical

Project names & links

First of all - a quick overview:

Client & Server Setups

Other interesting software

Single host setups

More Information

About Nagios

Wikipedia writes

Nagios /ˈnɑːɡiːoʊs/, now known as Nagios Core, is a free and open source computer-software application that monitors systems, networks and infrastructure. Nagios offers monitoring and alerting services for servers, switches, applications and services. It alerts users when things go wrong and alerts them a second time when the problem has been resolved.

Example image - showing 1 of several views you have:

enter image description here

Here is a good AskUbuntu post about How to Install Nagios. Nagios Exchange offers a huge collection of plugins, addons, documentation, extensions, and more.

About Munin

Wikipedia writes

Munin is a free and open-source computer system monitoring, network monitoring and infrastructure monitoring software application. It offers monitoring and alerting services for servers, switches, applications, services, etc. It alerts the users when things go wrong and alerts them a second time when the problem has been resolved

Example Image

enter image description here

About Icinga

Wikipedia writes

Icinga is an open source computer system and network monitoring application. It was originally created as a fork of the Nagios system monitoring application in 2009.

Icinga is attempting to get past perceived short-comings in Nagios' development process, as well as adding new features such as a modern Web 2.0 style user interface, additional database connectors (for MySQL, Oracle, and PostgreSQL), and a REST API that lets administrators integrate numerous extensions without complicated modification of the Icinga core.

Example Image showing 1 of several views:

enter image description here

About Spiceworks

Wikipedia writes:

Spiceworks is a professional network for the information technology (IT) industry that is headquartered in Austin, Texas. The company was founded in January 2006 by Scott Abel, Jay Hallberg, Greg Kattawar, and Francis Sullivan to build IT management software.

Spiceworks is an online community where users can collaborate and seek advice from one another and also engage in a marketplace to purchase IT-related services and products. The network is estimated to be used by more than six million IT professionals and 3,000 technology vendors.

About monit

Wikipedia writes

Monit is a free, open source process supervision tool for Unix and Linux. With Monit, system status can be viewed directly from the command line, or via the native HTTP(S) web server. Monit rose to popularity with Ruby on Rails and the Mongrel web server,[citation needed] because a tool was needed that could manage the many identical Mongrel processes that needed to be run to support a scalable Ruby on Rails site, and Monit was fairly uniquely suited for the needs of the Ruby on Rails community. Many popular Rails sites have used Monit, including Twitter and scribd.

About Cacti

Wikipedia writes:

Cacti is an open-source, web-based network monitoring and graphing tool designed as a front-end application for the open-source, industry-standard data logging tool RRDtool. Cacti allows a user to poll services at predetermined intervals and graph the resulting data. It is generally used to graph time-series data of metrics such as CPU load and network bandwidth utilization. A common usage is to monitor network traffic by polling a network switch or router interface via Simple Network Management Protocol (SNMP).

The front end can handle multiple users, each with their own graph sets, so it is sometimes used by web hosting providers (especially dedicated server, virtual private server, and collocation providers) to display bandwidth statistics for their customers. It can be used to configure the data collection itself, allowing certain setups to be monitored without any manual configuration of RRDtool. Cacti can be extended to monitor any source via shell scripts and executables.

About Zabbix

Wikpedia writes:

Zabbix is enterprise open source monitoring software for networks and applications, created by Alexei Vladishev. It is designed to monitor and track the status of various network services, servers, and other network hardware.

Zabbix uses MySQL, PostgreSQL, SQLite, Oracle or IBM DB2 to store data. Its backend is written in C and the web frontend is written in PHP. Zabbix offers several monitoring options

Related Question