Skip to content

Commit

Permalink
removed fleet server hosts info
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaElastic committed Nov 21, 2022
1 parent f12a872 commit b29541b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
12 changes: 1 addition & 11 deletions x-pack/plugins/fleet/server/collectors/fleet_server_collector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,14 @@ export const getFleetServerUsage = async (
};

export const getFleetServerConfig = async (soClient: SavedObjectsClient): Promise<any> => {
const fleetServerHosts = await listFleetServerHosts(soClient);
const hosts = fleetServerHosts.items.map((item) => ({
...item,
proxy_id: (item as any).proxy_id ?? '',
}));

const res = await packagePolicyService.list(soClient, {
page: 1,
perPage: SO_SEARCH_LIMIT,
kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name:fleet_server`,
});
const policies = res.items.map((item) => ({
id: item.id,
name: item.name,
enabled: item.enabled,
policy_id: item.policy_id,
input_config: (item.inputs[0] ?? {}).compiled_input,
}));

return { hosts, policies };
return { policies };
};
Original file line number Diff line number Diff line change
Expand Up @@ -115,32 +115,10 @@ export const fleetUsagesSchema: RootSchema<any> = {
},
fleet_server_config: {
properties: {
hosts: {
type: 'array',
items: {
properties: {
id: { type: 'keyword' },
name: { type: 'keyword' },
host_urls: {
type: 'array',
items: {
type: 'keyword',
},
},
is_default: { type: 'boolean' },
is_preconfigured: { type: 'boolean' },
proxy_id: { type: 'keyword' },
},
},
},
policies: {
type: 'array',
items: {
properties: {
id: { type: 'keyword' },
name: { type: 'keyword' },
enabled: { type: 'boolean' },
policy_id: { type: 'keyword' },
input_config: { type: 'pass_through' },
},
},
Expand Down

0 comments on commit b29541b

Please sign in to comment.