Server Performance Monitoring

Today was a holiday in Germany, so I spent my afternoon building a Frappe app (inspired by @mymi14s):

It regularly logs the CPU, RAM and disk utilization of the server running your site and allows you to analyze them in the usual views: workspace, list and report. The logs are automatically deleted after 7 days, so they won’t bloat your database too much (this is configurable).

It’s just a toy project, but maybe it’s interesting for someone. :smiley:

13 Likes

@rmeyer I am honoured. :upside_down_face:

I will pray for more holidays in Germany.

5 Likes

@rmeyer got this error while trying to install

Installing server_performance…
Updating DocTypes for server_performance: [========================================] 100%
An error occurred while installing server_performance: ‘NoneType’ object has no attribute ‘options’
Traceback (most recent call last):
File “apps/frappe/frappe/commands/site.py”, line 293, in install_app
_install_app(app, verbose=context.verbose)
File “apps/frappe/frappe/installer.py”, line 196, in install_app
frappe.get_attr(after_install)()
File “apps/server_performance/server_performance/install.py”, line 13, in after_install
log_settings.append(
File “apps/frappe/frappe/model/base_document.py”, line 202, in append
value = self._init_child(value, key)
File “apps/frappe/frappe/model/base_document.py”, line 241, in _init_child
value[“doctype”] = self.get_table_field_doctype(key)
File “apps/frappe/frappe/model/base_document.py”, line 373, in get_table_field_doctype
return self.meta.get_field(fieldname).options
AttributeError: ‘NoneType’ object has no attribute ‘options’

This probably only works with v14. Configurable Log settings was added in v14 :slight_smile:

https://frappeframework.com/docs/v14/user/en/logging#auto-cleanup-of-old-logs

1 Like

Even worse, it’s bleeding edge, not even tested with v14. :smile: