darshank15 / GSoC_2020_FOSSOlogy

FOSSology generates a large set of data that is exported to the time-series influx database and visualized with the help of Grafana. I Wrote a fossdash_publisher script that collects useful data from FOSSology DB (Postgres) and exposes them to influx DB. Developed a visualization dashboard in Grafana by integrating influx as an input data source.
GNU General Public License v2.0
2 stars 0 forks source link

CRON health check can be improved #22

Closed NicolasToussaint closed 4 years ago

NicolasToussaint commented 4 years ago

When configuring Fossdash CRON, it is possible to add some numerical values after the usual 5 fields. These numbers are transferred to the crontab file. Other data than number are properly rejected by the web page.

image

root@2b1d14c6283a:/srv/fossology/repository/fossdash# cat /var/spool/cron/crontabs/www-data
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Thu Aug 20 10:12:11 2020)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
* * * * * 987978 python3 /usr/local/lib/fossology/fossdash-publish.py >> /srv/fossology/repository/fossdash/fossdash.log 2>&1
darshank15 commented 4 years ago

Regex is now : ^((@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5}))$

We are now sticking to this limited cron job setting Screenshot from 2020-08-22 14-01-29

darshank15 commented 4 years ago

Done

NicolasToussaint commented 4 years ago

great, well done :)