Monitoring of a Cloud-Based IT Infrastructure
Sirviö, Janne (2021-05-17)
Monitoring of a Cloud-Based IT Infrastructure
Sirviö, Janne
(17.05.2021)
Julkaisu on tekijänoikeussäännösten alainen. Teosta voi lukea ja tulostaa henkilökohtaista käyttöä varten. Käyttö kaupallisiin tarkoituksiin on kielletty.
avoin
Julkaisun pysyvä osoite on:
https://urn.fi/URN:NBN:fi-fe2021052030903
https://urn.fi/URN:NBN:fi-fe2021052030903
Tiivistelmä
The amount of software to maintain increases continuously. New systems are being built and old systems are not phased out at the same pace. The arrival of microservices, SaaS and platform businesses have increased the complexity of software and the requirements for availability of service. Software maintenance has become troublesome. In this thesis, monitoring is used to mitigate the problem.
Objective of this thesis is to build a monitoring system for a SaaS company that is suffering from the increased complexity. The research questions of this thesis ask: 1) How to build an effective monitoring system with OSS tools? 2) What are the important parts of the company's IT infrastructure that should be monitored? 3) How to detect anomalies from monitoring data to set threshold values for alerting in a scalable way? 4) Is it possible to predict the moment of time in the future, when the system is next going to face an anomaly, from the monitoring data gathered in the past?
Research consists of a literature review on the preferred monitoring methods, an interview on the employees of the company to figure out the parts of company's IT infrastructure that monitoring will benefit the most and implementation of a monitoring system for the company with OSS tools (Prometheus and Grafana). In addition, automated anomaly detection methods are introduced and predictive monitoring is discussed.
As a result of this thesis, three key areas were found in the company's IT infrastructure where the built monitoring system focused on. First area was sign-ins which use now centralized logs for easier problem tracking. Second area was sluggishness of certain services that was solved with server, application and database metrics. Third area was MyHealth questionnaires that were supposed to use Prometheus MongoDB query exporter to expose the changes in the database, but current version of the database didn't allow the plan to succeed. For automated anomaly detection several solutions were provided in the thesis and the most suitable for the company was OSS tool called Prometheus anomaly detector. Theory for predictive monitoring was found on AI playing chess. Ylläpidettävien ohjelmistojen määrä lisääntyy jatkuvasti. Uusia ohjelmistoja julkaistaan eikä vanhoja poisteta käytöstä samaan tahtiin. Mikropalveluarkkitehtuurin, SaaSin ja alustaliiketoiminnan yleistymisen myötä ohjelmistojen monimutkaisuus ja saatavuuden vaatimukset ovat kasvaneet. Ohjelmistojen ylläpidosta on tullut hankalaa. Tässä lopputyössä monitorointia hyödynnetään ongelman lievittämiseksi.
Tämän lopputyön tavoitteena on rakentaa monitorointijärjestelmä SaaS-yritykselle, joka kärsii monimutkaisuuden lisääntymisestä. Tämän työn tutkimuskysymykset kysyvät: 1) Miten rakentaa monitorointijärjestelmä avoimen lähdekoodin työkaluilla? 2) Mitkä ovat yrityksen ohjelmistojärjestelmän kohdat, joihin monitorointi kannattaa keskittää? 3) Miten havaita monitorointidatasta poikkeavuuksia, joita käyttää hälytysten raja-arvojen asettamiseen skaalautuvasti? 4) Onko kerätystä monitorointidatasta mahdollista ennustaa ajanhetki, jolloin järjestelmä tulee seuraavaksi kohtaamaan virheen?
Tutkimus sisältää kirjallisuuskatsauksen monitorointitekniikoista. Haastatteluosuuden, jossa yrityksen työntekijöitä haastateltiin monitoroitavien kohteiden selvittämiseksi. Toteutusosuuden, jossa yritykselle toteutettiin monitorointijärjestelmä avoimen lähdekoodin työkaluilla (Prometheus ja Grafana). Lisäksi työssä esitellään automaattisen virheiden havainnoinnin tekniikoita ja pohditaan keinoja toteuttaa ennakoivaa monitorointia.
Työn tuloksena määritettiin kolme avainaluetta, johon rakennettu monitorointijärjestelmä keskittyy. Ensimmäinen alue on kirjautumiset, joissa hyödynnettiin keskitettyä lokitusta helpottamaan virheiden selvitystä. Toinen alue on tiettyjen palvelujen hitaus, joiden selvittämiseen käytettiin palvelimen, applikaation ja tietokantojen metriikkaa. Kolmas alue oli Omavointi-kyselyt, joihin oli tarkoitus käyttää MongoDB query exporter nimistä ohjelmistoa, mutta tietokannan versio vesitti tämän suunnitelman. Automaattiseen virheiden havainnointiin työssä esiteltiin useita vaihtoehtoja, joista yrityksen näkökulmasta sopivin on avoimen lähdekoodin työkalu nimeltä Prometheus anomaly detector. Teoria ennakoivalle monitoroinnille löytyi tekoälyllä toimivasta shakki-robotista.
Objective of this thesis is to build a monitoring system for a SaaS company that is suffering from the increased complexity. The research questions of this thesis ask: 1) How to build an effective monitoring system with OSS tools? 2) What are the important parts of the company's IT infrastructure that should be monitored? 3) How to detect anomalies from monitoring data to set threshold values for alerting in a scalable way? 4) Is it possible to predict the moment of time in the future, when the system is next going to face an anomaly, from the monitoring data gathered in the past?
Research consists of a literature review on the preferred monitoring methods, an interview on the employees of the company to figure out the parts of company's IT infrastructure that monitoring will benefit the most and implementation of a monitoring system for the company with OSS tools (Prometheus and Grafana). In addition, automated anomaly detection methods are introduced and predictive monitoring is discussed.
As a result of this thesis, three key areas were found in the company's IT infrastructure where the built monitoring system focused on. First area was sign-ins which use now centralized logs for easier problem tracking. Second area was sluggishness of certain services that was solved with server, application and database metrics. Third area was MyHealth questionnaires that were supposed to use Prometheus MongoDB query exporter to expose the changes in the database, but current version of the database didn't allow the plan to succeed. For automated anomaly detection several solutions were provided in the thesis and the most suitable for the company was OSS tool called Prometheus anomaly detector. Theory for predictive monitoring was found on AI playing chess.
Tämän lopputyön tavoitteena on rakentaa monitorointijärjestelmä SaaS-yritykselle, joka kärsii monimutkaisuuden lisääntymisestä. Tämän työn tutkimuskysymykset kysyvät: 1) Miten rakentaa monitorointijärjestelmä avoimen lähdekoodin työkaluilla? 2) Mitkä ovat yrityksen ohjelmistojärjestelmän kohdat, joihin monitorointi kannattaa keskittää? 3) Miten havaita monitorointidatasta poikkeavuuksia, joita käyttää hälytysten raja-arvojen asettamiseen skaalautuvasti? 4) Onko kerätystä monitorointidatasta mahdollista ennustaa ajanhetki, jolloin järjestelmä tulee seuraavaksi kohtaamaan virheen?
Tutkimus sisältää kirjallisuuskatsauksen monitorointitekniikoista. Haastatteluosuuden, jossa yrityksen työntekijöitä haastateltiin monitoroitavien kohteiden selvittämiseksi. Toteutusosuuden, jossa yritykselle toteutettiin monitorointijärjestelmä avoimen lähdekoodin työkaluilla (Prometheus ja Grafana). Lisäksi työssä esitellään automaattisen virheiden havainnoinnin tekniikoita ja pohditaan keinoja toteuttaa ennakoivaa monitorointia.
Työn tuloksena määritettiin kolme avainaluetta, johon rakennettu monitorointijärjestelmä keskittyy. Ensimmäinen alue on kirjautumiset, joissa hyödynnettiin keskitettyä lokitusta helpottamaan virheiden selvitystä. Toinen alue on tiettyjen palvelujen hitaus, joiden selvittämiseen käytettiin palvelimen, applikaation ja tietokantojen metriikkaa. Kolmas alue oli Omavointi-kyselyt, joihin oli tarkoitus käyttää MongoDB query exporter nimistä ohjelmistoa, mutta tietokannan versio vesitti tämän suunnitelman. Automaattiseen virheiden havainnointiin työssä esiteltiin useita vaihtoehtoja, joista yrityksen näkökulmasta sopivin on avoimen lähdekoodin työkalu nimeltä Prometheus anomaly detector. Teoria ennakoivalle monitoroinnille löytyi tekoälyllä toimivasta shakki-robotista.