amahi / amahi-anywhere-fs

Amahi Anywhere file server
GNU General Public License v3.0
12 stars 10 forks source link

[WIP] System health monitoring #25

Open vishwasmittal opened 5 years ago

vishwasmittal commented 5 years ago

API to serve data to monitor the system health. Uses Gopsutil library to query system parameters periodically and stores them in the Mysql database which can later be queried using an API by the admins to keep a check on the system health.

cpg commented 5 years ago

How often do the updates into MySQL happen?

What is the rate of growth of the DB?

Should there be some purging over time?

vishwasmittal commented 5 years ago

Updates happen at every 15 seconds and it takes about 3 seconds to take a reading (to calculate the avg CPU usage) therefore, database entries will made every 18 seconds.

Yes, we can perform purging over time. This is to monitor the system health and identify any suspicious/unexpected behavior. We need not keep logs older than a week (or a smaller time frame). For a week it will give us about 33600 database entries.

vishwasmittal commented 5 years ago

Currently, it stores CPU and RAM usage information. I am planning to store Disk usage information. What else do you think I should keep account of?

cpg commented 5 years ago

We decided to put this on hold for the time being. We will review at a later time.