Skip to content

Commit

Permalink
feat: add fs type filter to disable invalid storage types
Browse files Browse the repository at this point in the history
  • Loading branch information
MauriceNino committed Jul 6, 2022
1 parent a15cee8 commit 3ecd8b8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/api/src/config.ts
Expand Up @@ -16,6 +16,7 @@ export const CONFIG: Config = {
running_in_docker: penv('RUNNING_IN_DOCKER') === 'true',
accept_ookla_eula: penv('ACCEPT_OOKLA_EULA') === 'true',
use_network_interface: penv('USE_NETWORK_INTERFACE') ?? '',
fs_type_filter: lst(penv('FS_TYPE_FILTER') ?? ''),
disable_integrations: penv('DISABLE_INTEGRATIONS') === 'true',

show_host: penv('SHOW_HOST') === 'true',
Expand Down
7 changes: 6 additions & 1 deletion apps/api/src/dynamic-info.ts
Expand Up @@ -87,7 +87,12 @@ export const getDynamicServerInfo = () => {
}
);

const INVALID_FS_TYPES = ['cifs', '9p', 'fuse.rclone', 'fuse.mergerfs'];
const INVALID_FS_TYPES = [
'cifs',
'9p',
'fuse.rclone',
'fuse.mergerfs',
].concat(CONFIG.fs_type_filter);

const storageObs = createBufferedInterval(
'Storage',
Expand Down
9 changes: 9 additions & 0 deletions apps/docs/docs/config/index.mdx
Expand Up @@ -34,6 +34,15 @@ If dash. detects the wrong gateway as your default interface, you can provide a
- type: `string`
- default: `unset`

### `DASHDOT_FS_TYPE_FILTER`

If dash. detects network drives as internal drives, you can provide a list of ignored FS types here (e.g. `cifs,9p`).
Please also create a [bug ticket](https://github.com/MauriceNino/dashdot/issues/new/choose) on the
repository though, so that we can fix this problem for everyone.

- type: `string`
- default: `unset`

### `DASHDOT_DISABLE_INTEGRATIONS`

Disables support for integrations. This does two things: disable CORS and disable open API endpoints.
Expand Down
1 change: 1 addition & 0 deletions libs/common/src/index.ts
Expand Up @@ -86,6 +86,7 @@ export type Config = {
running_in_docker: boolean;
use_network_interface: string;
accept_ookla_eula: boolean;
fs_type_filter: string[];
disable_integrations: boolean;

show_host: boolean;
Expand Down

0 comments on commit 3ecd8b8

Please sign in to comment.