[GeoNode-users] geonode monitoring change of cron impact

Sam Franklin mr.samfranklin at gmail.com
Wed Nov 15 09:11:23 PST 2023


Hi List

I'm still involved with a legacy application that still runs geonode
2.10-rc4. Yes you read that right. Please do not ask why I'm on this
version and why I have not upgraded, it is a long, painful and sorrowful
tale.

In my case, geonode still works, lol, and geonode monitoring is enabled and
it has been configured based on the defaults, following roughly this
approach in the 3.3x docs
https://docs.geonode.org/en/3.3.x/intermediate/monitoring/geonode_monitoring/index.html.
I have set settings.MONITORING_DATA_TTL = timedelta(days=90). This has been
working fine for (a very long) time.

However, there's some database performance issues that I cannot pin down,
possibly due to another factor.

I've found that collect_metrics management command takes 2.5 minutes to run
which is too long and I want to reduce the transactions on the database
generated by geonode monitoring.

I think I've misunderstood what the management command "collect_metrics"
actually does. I thought collect_metrics inserts data to the database
monitoring tables. However, I've disabled the supervisor service and the
crontab. Yet inserts to "monitoring_requestevent" table are happening on a
on a near real-time basis. Therefore, some other process must be handling
this.

In my use case, I do not use any of the monitoring front end ui features,
these are all disabled. My current use case is to connect to the postgres
database and take a dump of the monitoring_requestevent table on an ad hoc
basis for offline analysis of traffic, that's it.

To reduce traffic on the database from the collect_metrics which appears to
run every minute based on the suggested cron in the docs:
* * * * * supervisorctl start geonode-monitoring

I'm planning to set my cron to once per 24 hours to simply drop data that
is >90 days old from the database table.
0 0 * * * supervisorctl start geonode-monitoring

I think I still do not understand exact what "collect_statics" actually
doe, so *my* *question is, are there any other side-effects or impacts that
I have not considered by moving a collect statics once per 24 hours instead
of every minute?*

Thanks for any help or pointers on this.

Cheers

---
Sam Franklin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20231115/0803291d/attachment.htm>


More information about the geonode-users mailing list