Reporting module for Foreman - Feature feedback requested

Hi all,

I'm looking for some feedback/suggestions on a possible new feature [1].

This feature would add a "reporting module" into Foreman. The goal is that
a non-technical Foreman user (such as management) can easily generate
inventory reports on the fly based on fact data. An example of a report
that could be generated would be:

"Show me all hosts in Foreman, their "operatingsystem" fact, their
"location" fact, their "customfact1" fact, and their "customfact2" fact.

The user would be able to specify as many facts as he wants for the report.
This report would be displayed as tabular data in the user interface and
would likely be able to be exported into a variety of formats (CSV, etc).
In addition, the user would be able to save custom report definitions so
they can easily be viewed in the future (similar to Foreman's bookmarks).
This functionality already sort of exists using Foreman's native search
interface, but the user interface that is presented to the user to create a
report like this would need to be refined.

I believe this type of reporting feature further aligns Foreman with the
CMDB realm, which I believe many users are interested in. I'm looking for
any input, suggestions or discussion regarding this possible feature.

Thanks,

Josh

[1] - See http://projects.theforeman.org/issues/show/2235

This is definitely a great idea. In fact I have something very similar in Remote Admin that does exactly this. However, I only report on a single fact. Foreman could definitely be improved in this area and I think it could follow a similar approach by selecting facts and then pressing a export/share button.

Check out some of the screenshots for my "Facts View". Pressing the share button produces the following result.

https://github.com/logicminds/remoteadmin-mobile/wiki

The Fact name architecture has the following values associated with it.

x86_64 = 30 nodes
puppetagent30
puppetagent33
puppetagent0
puppetagent8
puppetagent16
puppetagent12
puppetagent21
puppetagent43
puppetagent31
puppetagent38
puppetagent15
puppetagent3
puppetagent42
puppetagent47
puppetagent24
puppetagent11
puppetagent14
puppetagent7
puppetagent2
puppetagent23
puppetagent27
puppetagent1
puppetagent6
puppetagent18
puppetagent39
puppetagent5
puppetagent35
puppetagent40
puppetagent4
puppetagent17

i386 = 20 nodes
puppetagent37
puppetagent29
puppetagent41
puppetagent49
puppetagent46
puppetagent36
puppetagent32
puppetagent25
puppetagent45
puppetagent48
puppetagent20
puppetagent10
puppetagent13
puppetagent22
puppetagent44
puppetagent9
puppetagent19
puppetagent26
puppetagent34
puppetagent28

Thanks,

Corey Osman
corey@logicminds.biz

Green IT and Data Center Automation Specialist

··· On Mar 6, 2013, at 8:32 PM, AD wrote:

Hey Josh,

Sorry for the delayed reply, just been catching up on some lists. I would LOVE this!!! We would use it extensively. Lately I’ve been having to manually run queries to dump reports like this.

Cheers,

Adam

On Wednesday, February 20, 2013 9:12:16 AM UTC-6, Josh wrote:
Hi all,

I’m looking for some feedback/suggestions on a possible new feature [1].

This feature would add a “reporting module” into Foreman. The goal is that a non-technical Foreman user (such as management) can easily generate inventory reports on the fly based on fact data. An example of a report that could be generated would be:

"Show me all hosts in Foreman, their “operatingsystem” fact, their “location” fact, their “customfact1” fact, and their “customfact2” fact.

The user would be able to specify as many facts as he wants for the report. This report would be displayed as tabular data in the user interface and would likely be able to be exported into a variety of formats (CSV, etc). In addition, the user would be able to save custom report definitions so they can easily be viewed in the future (similar to Foreman’s bookmarks). This functionality already sort of exists using Foreman’s native search interface, but the user interface that is presented to the user to create a report like this would need to be refined.

I believe this type of reporting feature further aligns Foreman with the CMDB realm, which I believe many users are interested in. I’m looking for any input, suggestions or discussion regarding this possible feature.

Thanks,

Josh

[1] - See http://projects.theforeman.org/issues/show/2235


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

There's definitely scope for a Foreman plugin here, I think. Anyone want to
volunteer to write it, for fame and glory and suchlike? :slight_smile:

Thanks for the feedback, guys. I apologize for all of the top-posting here.

Corey - I have taken a look at RemoteAdmin, and it does look promising
although like you said, it can only report on one fact currently.

Greg - if I had the skillset to write it, I certainly would!

Adam - you are running manual SQL queries?

Anyhow, if you would like to see this feature, please consider voting for
it over at http://projects.theforeman.org/issues/show/2235. Maybe we can
find a developer that is interested in developing this feature/plugin.

Thanks,

Josh

··· On Thu, Mar 7, 2013 at 5:43 AM, Greg Sutcliffe wrote:

There’s definitely scope for a Foreman plugin here, I think. Anyone want
to volunteer to write it, for fame and glory and suchlike? :slight_smile:

– e
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from ite, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Yeah, and I have a quick and dirty php script with specific hard coded
fact_name_ids I made that puts facts in a nodes html table. It's extremely
inefficient though (does one query per fact per node). With ~650 nodes and
over 20 facts it ain't too quick :slight_smile: But it gets the job done for my needs
for now. I'd be interested in helping with this project, but have next to
zero rails skills (intent on changing that soon tho!).

Another type of query I run is cumulative fact counts for specific
hostgroups. For example

SELECT fact_values.value, COUNT(fact_values.value) AS value_count FROM
hosts INNER JOIN fact_values ON hosts.id=fact_values.host_id WHERE
fact_values.fact_name_id = 12 AND hosts.hostgroup_id IN (1,11,9) GROUP BY
fact_values.value ORDER BY value_count DESC;

This one gives me the counts of for cpu types for a hostgroup and its two
sub-groups.

Regards,

Adam

··· On Thursday, March 7, 2013 7:15:21 AM UTC-6, Josh wrote: > > > Adam - you are running manual SQL queries? > >

Thanks,

Corey Osman
corey@logicminds.biz

Green IT and Data Center Automation Specialist

> Thanks for the feedback, guys. I apologize for all of the top-posting here.
>
> Corey - I have taken a look at RemoteAdmin, and it does look promising although like you said, it can only report on one fact currently.

If I had the time I would port this feature over to foreman. This feature probably consumes the most CPU on mobile platform so it would be best have on server. There is a lot of data correlation that takes place.
The backend code would probably be pretty simple in ruby. The only other part would be the UI which would take much longer possibly.

https://github.com/logicminds/ralib/blob/master/src/com/lmc/ralib/model/FactValues.as (see copy function) for how I do it on mobile.

If I had the time it would be done already :slight_smile:

··· On Mar 7, 2013, at 5:15 AM, Josh Baird wrote:

Greg - if I had the skillset to write it, I certainly would!

Adam - you are running manual SQL queries?

Anyhow, if you would like to see this feature, please consider voting for it over at http://projects.theforeman.org/issues/show/2235. Maybe we can find a developer that is interested in developing this feature/plugin.

Thanks,

Josh

On Thu, Mar 7, 2013 at 5:43 AM, Greg Sutcliffe greg.sutcliffe@gmail.com wrote:
There’s definitely scope for a Foreman plugin here, I think. Anyone want to volunteer to write it, for fame and glory and suchlike? :slight_smile:

– e
You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from ite, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.