<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>monitoring on Kevin Heruer</title><link>/tags/monitoring/</link><description>Recent content in monitoring on Kevin Heruer</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 21 Jan 2022 21:00:00 +0100</lastBuildDate><atom:link href="/tags/monitoring/index.xml" rel="self" type="application/rss+xml"/><item><title>Monitoring is important</title><link>/posts/2022/01/21/monioring-is-important/</link><pubDate>Fri, 21 Jan 2022 21:00:00 +0100</pubDate><guid>/posts/2022/01/21/monioring-is-important/</guid><description>I&amp;rsquo;ve been experimenting with monitoring systems because I was not satisfied with Proxmox&amp;rsquo;s limited reporting of system stats. But that was not the only reason I set up a monitoring system.
I stumbled upon SNMP (Simple Network Management Protocol) and found it it&amp;rsquo;s implemented in anything that has a network connection, it&amp;rsquo;s even implemented in printers and routers. This protocol lets you fetch (and set) a limited set of data, but this is enough for monitoring.</description><content>&lt;p>I&amp;rsquo;ve been experimenting with monitoring systems because I was not satisfied with
Proxmox&amp;rsquo;s limited reporting of system stats. But that was not the only reason
I set up a monitoring system.&lt;/p>
&lt;p>I stumbled upon SNMP (Simple Network Management Protocol) and found it it&amp;rsquo;s
implemented in anything that has a network connection, it&amp;rsquo;s even implemented
in printers and routers. This protocol lets you fetch (and set) a limited set of
data, but this is enough for monitoring. At first I set up Observium, it&amp;rsquo;s a valid
system but I quickly ran in the problem that it doesn&amp;rsquo;t play nice with mDNS for
some reason. I also have not set up an enterprice grade network so I do not have
a local DNS server. I do not want to hack into hosts files or use IP addresses
even though all non-user systems have static IP addresses.&lt;/p>
&lt;p>Next was Zabbix, it&amp;rsquo;s open source and very mature software. Setting it up
(correctly) was quite a lot of work, and the learning curve is a bit steep if you
never really used complete monitoring systems before. However, once Zabbix was
set up and using the built-in templates it&amp;rsquo;s quite easy to start monitoring a
server.&lt;/p>
&lt;p>Currently I have 11 servers running in VM on Proxmox, adding a server to Zabbix
is as easy as &lt;code>apt install zabbix-agent&lt;/code> and adding an IP range into the config.
The most work I had to do for a server was getting the source and building it
myself which was unnecessary because I had to restore the backup anyway
(long story short: I upgraded the OS, it got borked).&lt;/p>
&lt;p>Once I started adding my hosts I noticed that I was getting long disk write wait&amp;rsquo;s,
this could mean a lot of things. Including failing drives. I ignored it mostly and
continued adding all the servers, once that was done I saw more servers throwing
this error. I started investigating and found out there were 2 servers running
MySQL/MariaDB database servers for the applications running on the servers, turns
out that database servers love to read and write (duh). They were slamming the cheap
HDD&amp;rsquo;s I&amp;rsquo;m running in the server which they didn&amp;rsquo;t like, I optimized the configs for
the databases and now most is well.&lt;/p>
&lt;p>&lt;a href="/posts/2022/01/21/images/mysql_config_tweak_full.png">
&lt;figure class="left" >
&lt;img src="/posts/2022/01/21/images/mysql_config_tweak.png" />
&lt;/figure>
&lt;/a>&lt;/p>
&lt;p>I did notice an increase in server/VM responsiveness but the warning(s) still remain,
however looking at the graph it does show a great improvement and it currently just
barely triggers the warning each time. I&amp;rsquo;m thinking of increasing the check for now
and see if I can upgrade the HDD&amp;rsquo;s in the future.&lt;/p>
&lt;p>Another thing I noticed was that running a DB from an SSD really makes a difference:&lt;/p>
&lt;p>&lt;a href="/posts/2022/01/21/images/migration_full.png">
&lt;figure class="left" >
&lt;img src="/posts/2022/01/21/images/migration.png" />
&lt;/figure>
&lt;/a>&lt;/p>
&lt;p>It&amp;rsquo;s obvious SSDs are fast, but seeing a direct impact is really cool! I suggest you
start setting up a monitoring system if you have any interest, the things you can
do with the data is amazing. I might even connect Home Assistant to Zabbix so I have
a single dashboard for all the data.&lt;/p></content></item></channel></rss>