Bug 1805915

Summary: [RFE] Schedule a daily count of managed VMs and print result to audit log
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ReportingAssignee: Adam Grare <agrare>
Status: CLOSED ERRATA QA Contact: Jaroslav Henner <jhenner>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: unspecified    
Version: 5.11.0CC: akarol, dmetzger, jfrey, obarenbo
Target Milestone: GAKeywords: ZStream
Target Release: 5.11.4Flags: pm-rhel: cfme-5.11.z+
simaishi: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.4.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1805252 Environment:
Last Closed: 2020-03-17 13:11:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On: 1805252    
Bug Blocks:    

Comment 2 CFME Bot 2020-02-21 21:56:05 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/6fc121e6dc5306046814ba216c879a833c39f1e3
commit 6fc121e6dc5306046814ba216c879a833c39f1e3
Author:     Oleg Barenboim <chessbyte>
AuthorDate: Fri Feb 14 16:51:24 2020 +0000
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Fri Feb 14 16:51:24 2020 +0000

    Merge pull request #19830 from jaredm-ibm/master

    Schedule a daily count of managed VMs and print result to audit log.

    (cherry picked from commit c223c1c6aa0183a0df6211e46bb900de11d59904)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1805915

 app/models/miq_schedule_worker/jobs.rb | 4 +
 app/models/miq_schedule_worker/runner.rb | 5 +
 app/models/miq_server.rb | 14 +
 config/settings.yml | 1 +
 4 files changed, 24 insertions(+)


https://github.com/ManageIQ/manageiq/commit/a0a4e44be3598c5f9809d59b4a9f188d317bac0e
commit a0a4e44be3598c5f9809d59b4a9f188d317bac0e
Author:     Oleg Barenboim <chessbyte>
AuthorDate: Fri Feb 14 17:47:47 2020 +0000
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Fri Feb 14 17:47:47 2020 +0000

    Merge pull request #19835 from agrare/improve_audit_managed_resources_performance

    Use a single query to get count of active VMs and Hosts

    (cherry picked from commit cee35bfd2a2d77bde3f581737b749d38b6b8ea00)

    https://bugzilla.redhat.com/show_bug.cgi?id=1805915

 app/models/host.rb | 3 +
 app/models/miq_server.rb | 12 +-
 spec/models/miq_server_spec.rb | 15 +
 3 files changed, 21 insertions(+), 9 deletions(-)

Comment 3 Jaroslav Henner 2020-03-03 14:36:42 UTC
After configuring 1.minute interval from the 1.day which was predefined for the  :audit_managed_resources in the advanced settings and restarting the evmserverd the system seems have picked up this change nad I see the periodic message:

[----] I, [2020-03-03T09:27:59.628997 #21404:2ad91f6fe5b4]  INFO -- : Q-task_id([audit_managed_resources]) Under Management: {"vms":47,"hosts":2}

in the CFME audit.log (note it is not the system audit.log) for every minute

Comment 8 errata-xmlrpc 2020-03-17 13:11:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0867