Hello, community! Problem:
I’m using Foreman with puppetDB.
And I want to access to reports older than 7 days.
In puppetdb server in database.ini file i has added these options:
report-ttl = 60d
node-purge_ttl = 60d
resource-events-ttl = 60d
node-ttl = 60d
And restarted puppetdb
Then, i has executed these command
foreman-rake reports:expire days=60
And restarted foreman.
But after that then i am open reports for the node, i am still view only reports for last 7 days.
what am I doing wrong?
displaying reports for 60 instead of 7 days Foreman and Proxy versions:
foreman version 2.1.2
puppetdb version 6.12.0 Foreman and Proxy plugin versions:
Distribution and version:
CentOS 8 Other relevant data:
also I have run for user in $(cut -d':' -f1 /etc/passwd); do crontab -u $user -l; done
and this script output “no crontab” for all users. systemctl status *timer
ouptut only 3 tasks not related to foreman or puppet.
Thanks a lot! I hope the problem is solved.
I am edit the /etc/cron.d/foreman file, I am modified the string 30 7 * * * foreman /usr/sbin/foreman-rake reports:expire >>/var/log/foreman/cron.log 2>&1
to 30 7 * * * foreman /usr/sbin/foreman-rake reports:expire days=90 >>/var/log/foreman/cron.log 2>&1
And will check result in a few days.