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 1284679 - record number of hosts per compute resource type in foreman-debug for statistical purposes
Summary: record number of hosts per compute resource type in foreman-debug for statist...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Debug
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker
TreeView+ depends on / blocked
 
Reported: 2015-11-23 21:36 UTC by Jan Hutař
Modified: 2017-01-13 20:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-13 20:58:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 13753 0 None None None 2016-02-17 10:58:16 UTC
Red Hat Bugzilla 1305089 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 1305089

Description Jan Hutař 2015-11-23 21:36:42 UTC
Description of problem:
When we want to learn which compute resources are most used, we have to collect these data somewhere. Maybe foreman-debug can be used?


Version-Release number of selected component (if applicable):
foreman-debug-1.7.2.46-1.el6_6sat.noarch


How reproducible:
always


Steps to Reproduce:
1. Attempt to estimate which compute resources are used at most


Actual results:
There are no such data available


Expected results:
Maybe foreman debug can collect hosts counts per compute resource types (no customer internal info like concrete hosts or compute resource names)


Additional info:
Maybe something like this could be added to foreman-debug?

# diff -u `type -p foreman-debug `{.ORIG,}
--- /usr/sbin/foreman-debug.ORIG	2015-11-23 16:06:15.646949752 -0500
+++ /usr/sbin/foreman-debug	2015-11-23 16:28:59.070276247 -0500
@@ -270,6 +270,7 @@
 add_files /var/log/{httpd,apache2}/foreman-ssl_access_ssl.log*
 add_cmd "echo \"select id,name,value from settings where name not similar to '%(pass|key|secret)'\" | su postgres -c 'psql foreman'" "foreman_settings_table"
 add_cmd "echo 'select type,name,host,port,account,base_dn,attr_login,onthefly_register,tls from auth_sources' | su postgres -c 'psql foreman'" "foreman_auth_table"
+add_cmd "echo 'select count(hosts.name), compute_resources.type from hosts, compute_resources where hosts.compute_resource_id = compute_resources.id group by compute_resources.type;' | su postgres -c 'psql foreman'" "foreman_compute_resources_host_counts"
 add_cmd "foreman-selinux-relabel -nv" "foreman_filecontexts"
 
 add_files /etc/{sysconfig,default}/foreman

Comment 2 Lukas Zapletal 2016-02-15 08:56:53 UTC
Jan, why don't you simply create a pull request?

https://github.com/theforeman/foreman/blob/develop/script/foreman-debug

Comment 3 Lukas Zapletal 2016-02-15 10:15:10 UTC
There is a bug I am working on (https://bugzilla.redhat.com/show_bug.cgi?id=1305089) that will add list of hosts. I can keep the compute_resource_id column, is it enough for you?

Comment 4 Jan Hutař 2016-02-17 11:17:40 UTC
Create a pull request: https://github.com/theforeman/foreman/pull/3196 (depends on Lukas's branch lzap:debug-db-13703)

Comment 5 Bryan Kearney 2016-04-08 15:48:14 UTC
lzap, can this be closed as a dupe of https://bugzilla.redhat.com/show_bug.cgi?id=1305089

Comment 6 Lukas Zapletal 2016-04-12 11:11:27 UTC
It's actually something different, but we will build this on of the other bug which was rescheduled to 6.3. Doing so.

Comment 7 Bryan Kearney 2016-07-08 20:48:39 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 9 Lukas Zapletal 2016-10-21 13:23:41 UTC
This should be implemented as a CSV exporter as part of https://bugzilla.redhat.com/show_bug.cgi?id=1305089

Comment 10 Bryan Kearney 2017-01-13 20:58:08 UTC
This is an older bug which I do not envision being addressed in the near term. I am closing this out. If you believe doing so is an issue, please feel free to re-open and provide additional business information. Thank you.


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