There needs to be a way to pass in the host filesystem location as an option to allow collection from the host machine when operating inside of Docker. This is equivalent to how Metricbeat allows the -system.hostfs CLI option.
This must not be set as a global variable as it is in both gosigar and gopsutil.
I'm thinking to have an API like sysinfo.New(opts types.Option) and have an option that can be used like types.HostFS("/hostfs"). sysinfo.New would return an interface that has methods like Host(), Processes(), Process(), and Self().
And I think only the Linux provider would actually honor this option.
There needs to be a way to pass in the host filesystem location as an option to allow collection from the host machine when operating inside of Docker. This is equivalent to how Metricbeat allows the
-system.hostfsCLI option.This must not be set as a global variable as it is in both gosigar and gopsutil.
I'm thinking to have an API like
sysinfo.New(opts types.Option)and have an option that can be used liketypes.HostFS("/hostfs").sysinfo.Newwould return an interface that has methods likeHost(),Processes(),Process(), andSelf().And I think only the Linux provider would actually honor this option.