If I need variables (methods) to extract BMC IP, BMC Addr, CPU cores, DIMM, Memory, DISK unit, DISK size, where do I find what variable or methods to use.
you can click Help tab where you have all available methods listed (without any help as of now). Search fr Host::Managed object, that list is applicable on host variable in your example. You may need host.bmc_nic that gives yous Nic::BMC object, on which you can call things like ip, mac. So for example host.bmc_nic.ip will give you you BMC IP. Other things can be read from facts, but beware, if you include all facts, the report may take very long time to process, depends on amount of data in your DB.
Oh, seems some of your hosts don’t have bmc_nic, in that case, try host.bmc_nic&.ip which will call ip method only in case bmc_nic is defined.
To get facts, try host.facts['processors::count'] just beware this can be really slow and mem consuming if you have a lot of hosts and facts. You may want to try load_hosts(preload: :fact_values).
In Foreman 1.24, it is recommended to fetch data from reported data facet, see example here. These are the data you can get so far in efficient way.
Do you have such facts in your Foreman? Does puppet or some other source of information provide number of DIMMs? The total capacity should be available as