Skip to content

Commit

Permalink
Adding fields to get kibana cards rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
matschaffer committed Nov 25, 2021
1 parent 98114bd commit 90dc633
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class Cluster extends Entity<StackMonitoringFields> {
return new Kibana({
cluster_uuid: this.fields.cluster_uuid,
'kibana_stats.kibana.name': name,
'kibana_stats.kibana.uuid': generateShortId(),
'kibana_stats.kibana.index': index,
type: 'kibana_stats',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export class KibanaStats extends Serializable<StackMonitoringFields> {
timestamp(timestamp: number) {
super.timestamp(timestamp);
this.fields['kibana_stats.timestamp'] = new Date(timestamp).toISOString();
this.fields['kibana_stats.response_times.max'] = 250;
this.fields['kibana_stats.kibana.status'] = 'green';
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ export type StackMonitoringFields = Fields &
'license.status': string;

'kibana_stats.kibana.name': string;
'kibana_stats.kibana.uuid': string;
'kibana_stats.kibana.status': string;
'kibana_stats.kibana.index': string;
'kibana_stats.requests.disconnects': number;
'kibana_stats.requests.total': number;
'kibana_stats.timestamp': string;
'kibana_stats.response_times.max': number;
}>;

0 comments on commit 90dc633

Please sign in to comment.