Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1731235 - [RFE] Create Report Template to list inactive hosts
Summary: [RFE] Create Report Template to list inactive hosts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Reporting
Version: 6.5.0
Hardware: All
OS: Linux
high
medium
Target Milestone: 6.8.0
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-18 17:33 UTC by Dylan Gross
Modified: 2024-06-13 22:11 UTC (History)
8 users (show)

Fixed In Version: tfm-rubygem-katello-3.15.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 12:58:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28211 0 Normal Closed Create Report Template to list inactive hosts 2021-01-05 15:06:27 UTC
Foreman Issue Tracker 28746 0 Normal Closed Adding last_checkin macro to safemode 2021-01-05 15:07:05 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 12:59:06 UTC

Description Dylan Gross 2019-07-18 17:33:08 UTC
1. Proposed title of this feature request

   [RFE] Create Report Template to list inactive hosts

3. What is the nature and description of the request?

   Using the new Report Template functionality introduced in Satellite 6.5, create a report template to identify Hosts that aren't checking in, so they can be cleaned out of the enviornment.  (Additionally provide a means to flag certain hosts for special do-not-delete use case).

4. Why does the customer need this? (List the business requirements here)

   In very large environments, tracking down inactive hosts can be problematic.  Attempts to api/hammer search on the entire list of hosts take a prohibitively long time, and other RFEs (BZ#1522934) to make workarounds possible are being closed as WONTFIX.

5. How would the customer like to achieve this? (List the functional requirements here)

   Ideally the report template could list all the hosts on the system and the last_checkin value with the abiltity in the template to specify a minimum of time to display (i.e.  Greater than 1 day, or greater than <n> hours, etc).  Additionally, if a host parameter could be specified in the template to be included as well, the host parameter could be used to identify servers that are not checking in, but should not be deleted for specific edge case scenarios.

6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

   The report would complete in a short time.  (Currently listing the hosts via can take many minutes to complete and must be done in paginated requests)

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

   No

8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

   No.

9. Is the sales team involved in this request and do they have any additional input?

   No.

10. List any affected packages or components.


11. Would the customer be able to assist in testing this functionality if implemented?

  Yes.

Comment 4 Ondřej Pražák 2019-11-07 09:18:53 UTC
Created redmine issue https://projects.theforeman.org/issues/28211 from this bug

Comment 5 Dominik Matoulek 2019-11-15 13:43:55 UTC
The behavior of requested can partially achieved by included reports. In the "Host statuses" is possible to filter hosts by name and  other attributes like "last_checkin". So if you want to list hosts where last_checkin was 3 hours ago until now, you can simply filter by "last_checkin < 3 hours ago" at the hosts input. The little problem is that is not possible to include to report a last_checkin value for given host. This improvement will be in the next release. After that, you will be able to add to report (ie. "Host statuses") last_checkin value for host also. The only drawback is make own report type.

1. You have to clone "Host statuses" report
2. Add to end of line 18 character "," (without quotes)
3. Create new row after line 18 and write " 'last_checking': last_checkin(host)" with indentation that respect line 18 
4. Save and use it.

Comment 6 Marek Hulan 2019-11-19 16:06:39 UTC
Dylan, does comment 5 resolved the issue? Or should we keep this RFE to track "making last_checking information available in report templates"?

Comment 7 Bryan Kearney 2019-11-19 19:05:12 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28211 has been resolved.

Comment 10 Bryan Kearney 2020-01-14 17:05:07 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28211 has been resolved.

Comment 12 Lukáš Hellebrandt 2020-06-11 14:54:42 UTC
Verified with Sat 6.8 snap 3.0.

1) Clone "Host - Statuses"
2) To "Host - Statuses clone", add field last_checkin:
```
        'Global': host.global_status,
        'Last check-in': last_checkin(host)
      }.merge(all_host_statuses_hash(host))) -%>
```
3) Generate "Host - Statuses clone"

=> List with last checkins of content hosts. This is sufficient as per comment 11. Non-content hosts have last_checkin==0. This is expected because last_checkin only maps checkins with subscription-manager.

Comment 15 errata-xmlrpc 2020-10-27 12:58:49 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 (Important: Satellite 6.8 release), 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/RHSA-2020:4366


Note You need to log in before you can comment on or make changes to this bug.