Report questions
-
Under inventory reports I’m noticing that if you choose a model name to search for it only lists hosts that are part of a group. This is without choosing a group. Does the inventory report only deal with groups? I’d like to see a list of all hosts of a specific model whether they’re in a group or not.
I also notice there are a bunch of models in the drop down list that have been removed from the system. I took a look at the database itself and the inventory table seems to have hosts still listed that have been removed. Is this table supposed to be updated when a host is removed?
Thanks
-
@chunter2 said:
Under inventory reports I’m noticing that if you choose a model name to search for it only lists hosts that are part of a group. This is without choosing a group. Does the inventory report only deal with groups? I’d like to see a list of all hosts of a specific model whether they’re in a group or not.
This is known and fixed in the
dev-branch
already.I also notice there are a bunch of models in the drop down list that have been removed from the system. I took a look at the database itself and the inventory table seems to have hosts still listed that have been removed. Is this table supposed to be updated when a host is removed?
@Tom-Elliott Would you know more about this?
Moving this to bug reports.
-
@Sebastian-Roth in 1.6 reporting is much different, but I’m not aware of any issues. As for old entries, this may be correct from older times, though I can’t tell you when. When a host is deleted now, the inventory record should go with it l.
-
@chunter2 Which version of FOG do you currently have. Have you used an older version before? Probably something I have asked in another topic already but …
-
@Sebastian-Roth I was on 1.2.0 and upgraded to 1.5.6. So removing the old entries manually should be fine then?
-
@chunter2 said in Report questions:
I was on 1.2.0 and upgraded to 1.5.6. So removing the old entries manually should be fine then?
Ah right! Yes removing old entries that don’t match any existing host ID is fine. I’d just make sure you have a proper backup (snapshot or full DB dump) before you clean it up.
Here is a list of mysql queries doing some cleaning: https://wiki.fogproject.org/wiki/index.php/Troubleshoot_MySQL#Database_Maintenance_Commands
Though this one doesn’t clean up the inventory you can still see how you might be able to do the manual cleanup fairly easy. Something along those lines using the sub query as in
DELETE FROM groupMembers WHERE gmHostID NOT IN (SELECT hostID FROM hosts);
should help you. -
@Sebastian-Roth Now that I’ve upgraded my system to 1.5.9 I tried out the Inventory Report again. If I choose a model name from the list but not a group name I seem to get all machines instead of just the specific model. The list seems to be the same as when I don’t choose any model name or group. Should I be able to choose a model without a group?
Thanks
-
@chunter2 Thanks for reporting. I just pushed a fix to dev-branch which should take care of this issue.
-
@Sebastian-Roth Just tested this out and it works. I just modified the inventory_report.report.php file to match your change.
Thanks