Using foreman_discovery plugin, can I list the value of 'memorysize' for all of my discovered hosts?

I am using the Foreman Discovery plugin with FDI 2.0.

I have used the Discovery plugin to "discover" 10 unprovisioned hosts. I
would like to list the amount of RAM in all of these hosts, in one page. I
believe the Puppet fact is 'memorysize'. Can I do this through the
"Discovered hosts" page?

Thank you,

-= Stefan

> I have used the Discovery plugin to "discover" 10 unprovisioned hosts. I
> would like to list the amount of RAM in all of these hosts, in one page. I
> believe the Puppet fact is 'memorysize'. Can I do this through the
> "Discovered hosts" page?

Hey,

unfortunately not at the moment. But good news is - next week we are
releasing Discovery 2.0 which will by default show you this on the front
page (and more).

If you want, try our develop branch from git. It should work with
Foreman 1.7 with this patch applied
(https://github.com/theforeman/foreman_discovery/pull/120).

Or wait until the RC1 next week.

··· -- Later, Lukas #lzap Zapletal

I'm trying Discovery 2.0 and now I can see that information. Thanks!

I also discovered that I can go to "Monitor > Facts" and search for name = memorysize. My unprovisioned hosts show up there with a "Host" of "N/A".
Anyone know how to search specifically for hosts without a name? I have
tried a few things, like host = "" and host !~ %.example.gov ("Show me
hosts which don't match a pattern like 'foo.example.gov").

Thanks!

-= Stefan

··· On Friday, January 16, 2015 at 3:25:53 AM UTC-8, Lukas Zapletal wrote: > > > I have used the Discovery plugin to "discover" 10 unprovisioned hosts. I > > would like to list the amount of RAM in all of these hosts, in one page. > I > > believe the Puppet fact is 'memorysize'. Can I do this through the > > "Discovered hosts" page? > > Hey, > > unfortunately not at the moment. But good news is - next week we are > releasing Discovery 2.0 which will by default show you this on the front > page (and more). > > If you want, try our develop branch from git. It should work with > Foreman 1.7 with this patch applied > (https://github.com/theforeman/foreman_discovery/pull/120). > > Or wait until the RC1 next week. > > -- > Later, > Lukas #lzap Zapletal >

> I also discovered that I can go to "Monitor > Facts" and search for name = > memorysize. My unprovisioned hosts show up there with a "Host" of "N/A".
> Anyone know how to search specifically for hosts without a name? I have
> tried a few things, like host = "" and host !~ %.example.gov ("Show me
> hosts which don't match a pattern like 'foo.example.gov").

Hello,

this is expected behavior, fact reports only search and show Managed
Hosts. Since discovered hosts are not (yet) managed, all the operations
are not possible there.

What do you need to do with facts in this case?

··· -- Later, Lukas #lzap Zapletal

Well at the time I was hoping to locate hosts which had a particular amount
of RAM, disks and model number. But as you pointed out, now that
information is available in the updated Discovery 2.0 plugin.

Now, I just think it would be handy to sort through all of my hosts,
provisioned and unprovisioned, for various facts. I'd like to see all MAC
addresses or servers with more then 4 cores (facts.processorcount >= 4)
for example. However, the most of my use case was resolved with the new
Discovery 2.0.

-= Stefan

··· On Friday, January 23, 2015 at 2:09:25 AM UTC-8, Lukas Zapletal wrote:

What do you need to do with facts in this case?

> Now, I just think it would be handy to sort through all of my hosts,
provisioned and unprovisioned, for various facts.

And just to clarify, I think that the current fact browser, like "Monitor >
Facts" does work for much of what I need, it's just that I'd like a way to
limit my search to hosts which do not have a hostname. The Web UI shows
these hosts with an "N/A" in the Host column.

Thanks,

-= Stefan

> Now, I just think it would be handy to sort through all of my hosts,
> provisioned and unprovisioned, for various facts. I'd like to see all MAC
> addresses or servers with more then 4 cores (facts.processorcount >= 4)
> for example. However, the most of my use case was resolved with the new
> Discovery 2.0.

You can create a custom fact concatenating all the info you want to see
and than use the "custom column" feature (Global Settings - Discovery)
to show this custom fact on the list.

··· -- Later, Lukas #lzap Zapletal

Hi,

In our test environment I have too many puppet classes to remove
manually and they are all assigned to all environments.

So I want to get rid of all of them and import again. Is there an easy
way to purge all of them?

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts

··· ----------------
Tel: 053 20 30 270 	info@netbulae.eu 	Staalsteden 4-3A 	KvK 08198180
Fax: 053 20 30 271 	www.netbulae.eu 	7547 TA Enschede 	BTW NL821234584B01

> And just to clarify, I think that the current fact browser, like "Monitor >
> Facts" does work for much of what I need, it's just that I'd like a way to
> limit my search to hosts which do not have a hostname. The Web UI shows
> these hosts with an "N/A" in the Host column.

I understand, unfortunately the change is not easy. I filed a Feature
ticket for future versions:

http://projects.theforeman.org/issues/9137

··· -- Later, Lukas #lzap Zapletal

It appears I cannot even delete them manually, one by one:

  Oops, we're sorry but something went wrong


        Warning!

ERROR: update or delete on table "puppetclasses" violates foreign
key constraint "environment_classes_puppetclass_id_fk" on table
"environment_classes" DETAIL: Key (id)=(135) is still referenced
from table "environment_classes".

I haven't assigned the class to any host or hostgroup and the
environment is non editable. So they are kind of stuck. I know a
workaround is removing everything from the /etc/puppet/modules and using
import again so it deletes them but I have some puppet modules already
being used in another environement/organization.

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts

··· On 01/26/2015 10:18 AM, Jorick Astrego wrote: > Hi, > > In our test environment I have too many puppet classes to remove > manually and they are all assigned to all environments. > > So I want to get rid of all of them and import again. Is there an easy > way to purge all of them? > ----------------
Tel: 053 20 30 270 	info@netbulae.eu 	Staalsteden 4-3A 	KvK 08198180
Fax: 053 20 30 271 	www.netbulae.eu 	7547 TA Enschede 	BTW NL821234584B01