# Monitoring Without diving too deeply into philosophy or history of *Monitoring in CS(CMS)*, there are a few things that should be outlined: - **Monitoring** is not *observability*. - We want as much as possible to be *monitored*, while being *observable* is a secondary objective. - Even though *observability* can lead to predictions of service outages, *monitoring* serves this purpose as a primary goal. In other words, we want to know when a service outage occurs, and it would be nice to know before this happens, but attempting to predict a service outage is often time not well spent and typically leads to false positives or large noise ratios in notifications. Having said all this, *observability* is also a nice tool to have, as it can help in *capacity planning*. In this and related documents we will explain the design decisions and rationale of both *monitoring* and *observability* in the department, and attempt to describe how it all fits together into a coherent infrastructure. ## Architecture Through the evolution of monitoring in the department, we have evolved while learning what works and what doesn't. The overall goal of monitoring is simple: - Be made aware of a service outage - Reduce/eliminate the noise of things that are not important - Lower the priority of things that are not emergencies. - Mark as critical all important outages - Avoid service flapping This seems like a tall order, because systems don't inherently know what is "important". Of course, we can prioritize all the services in the department, but this does not scale when the department adds/removes a service from the hierarchy of importance. However, a best effort still should be made when determining importance because this will be crucial in determining a **root cause** of a service outage. Historically, we relied almost exclusively on [SNMP](https://en.wikipedia.org/wiki/Simple_Network_Management_Protocol), in that local dedicated systems would periodically poll target hosts for metrics and collect data for a trend analysis. This is *observability* at its most fundamental level, and this does not provide any *monitoring*. For *monitoring* to be successful, a system needs to be made aware of the services we consider to be important, then frequently poll those services to determine their status, and notify someone responsible should a service become unresponsive. In the past, the department used [OpenNMS](https://www.opennms.com/), [Zabbix](https://www.zabbix.com/), and most recently [CheckMK](https://checkmk.com). Briefly, OpenNMS is designed to be "discover all, remove as necessary", meaning it will attempt to discover everything on the local network and adjacent devices, add all nodes and services it found, and then alert whenever anything changes. This can be quite noisy and it becomes difficult to have any level of granularity in what is to be considered important. Zabbix is more restrictive in its philosophy, whereas it can be configured to scan the local network for devices, but also specifically declared for hosts that run an agent. This ultimately became noisy due to the fact that the department has unmanaged hosts on the same network as the sysadmin-managed hosts. Finally, CheckMK is the latest in the monitoring evolution in the department in that it will only monitor hosts/services that we have configured to be monitored. ### CheckMK Monitoring in the department is done with *agents* and a central monitor, located at https://monitor.cms.caltech.edu/CMS.