mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Usage Collection] [schema] infra
(#78581)
This commit is contained in:
parent
4525f0cfab
commit
97ac553d03
3 changed files with 46 additions and 2 deletions
|
@ -5,7 +5,6 @@
|
|||
"plugins/actions/server/usage/actions_usage_collector.ts",
|
||||
"plugins/alerts/server/usage/alerts_usage_collector.ts",
|
||||
"plugins/apm/server/lib/apm_telemetry/index.ts",
|
||||
"plugins/infra/server/usage/usage_collector.ts",
|
||||
"plugins/maps/server/maps_telemetry/collectors/register.ts"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -14,6 +14,17 @@ interface InfraopsSum {
|
|||
logs: number;
|
||||
}
|
||||
|
||||
interface Usage {
|
||||
last_24_hours: {
|
||||
hits: {
|
||||
infraops_hosts: number;
|
||||
infraops_docker: number;
|
||||
infraops_kubernetes: number;
|
||||
logs: number;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export class UsageCollector {
|
||||
public static registerUsageCollector(usageCollection: UsageCollectionSetup): void {
|
||||
const collector = UsageCollector.getUsageCollector(usageCollection);
|
||||
|
@ -21,12 +32,22 @@ export class UsageCollector {
|
|||
}
|
||||
|
||||
public static getUsageCollector(usageCollection: UsageCollectionSetup) {
|
||||
return usageCollection.makeUsageCollector({
|
||||
return usageCollection.makeUsageCollector<Usage>({
|
||||
type: 'infraops',
|
||||
isReady: () => true,
|
||||
fetch: async () => {
|
||||
return this.getReport();
|
||||
},
|
||||
schema: {
|
||||
last_24_hours: {
|
||||
hits: {
|
||||
infraops_hosts: { type: 'long' },
|
||||
infraops_docker: { type: 'long' },
|
||||
infraops_kubernetes: { type: 'long' },
|
||||
logs: { type: 'long' },
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -242,6 +242,30 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"infraops": {
|
||||
"properties": {
|
||||
"last_24_hours": {
|
||||
"properties": {
|
||||
"hits": {
|
||||
"properties": {
|
||||
"infraops_hosts": {
|
||||
"type": "long"
|
||||
},
|
||||
"infraops_docker": {
|
||||
"type": "long"
|
||||
},
|
||||
"infraops_kubernetes": {
|
||||
"type": "long"
|
||||
},
|
||||
"logs": {
|
||||
"type": "long"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ingest_manager": {
|
||||
"properties": {
|
||||
"fleet_enabled": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue