public abstract class HealthAndAlertInfoPojo extends Object
It contains the common attributes to all 'health' status/reports documents stored in Elasticsearch by the PunchPlatform monitoring micro-services.
In case you want to use a single index for all your document types,
the 'doc_type' field will hold a string representing your document type (the short class name, unless
you have used a JsonTypeName annotation to override this on your subclass;)
This property can be used by Kibana dashboard to filter specific subclasses of HealthAndAlertInfoPojo
, and
will be used by Jackson in order to polymorphically de-serialize subclasses of HealthAndAlertInfoPojo
with
appropriate class.
Modifier and Type | Field and Description |
---|---|
List<AlertPojo> |
alerts
List of alert codes and messages explaining the current status of the partition
|
HealthLevel |
health
Overall health status, as computed taking into account the worse alert registered
(cf.
|
int |
health_code
Health status code as int
For example, GREEN is 0 and RED is 2
|
String |
tenant
The tenant name
|
static String |
TYPE_PROPERTY_NAME
This is the name of the special property used in our Elasticsearch Pojos to allow discriminating between subclasses
of
HealthAndAlertInfoPojo in Kibana Dashboards, or when Jackson is used to polymorphically deserialize subclasses
of HealthAndAlertInfoPojo . |
ZonedDateTime |
update_ts
The time at which this object was created, or enriched through addAlert(Health, String, Object...)
|
Constructor and Description |
---|
HealthAndAlertInfoPojo()
Constructor for deserialization purpose.
|
HealthAndAlertInfoPojo(String tenant)
The overall health is initially GREEN until explicitly set otherwise,
or implicitly down graded by calls to addAlert(Health, String, Object...)
|
Modifier and Type | Method and Description |
---|---|
abstract String |
getAsKeyValuesStringForLogs()
Must be provided by concrete subclasses, in order to include all appropriate
fields to the user for
troubleshooting purpose
health level and alerts should not be reported, because their logging is usually
sufficiently done through the addAlert(Health, String, Object...) method.
|
public static final String TYPE_PROPERTY_NAME
HealthAndAlertInfoPojo
in Kibana Dashboards, or when Jackson is used to polymorphically deserialize subclasses
of HealthAndAlertInfoPojo
.
this property will be generated by Kackson, and will hold a string representing your document type (the short class name, unless you have used a JsonTypeName annotation to override this on your subclass;)
public HealthLevel health
public int health_code
public List<AlertPojo> alerts
public ZonedDateTime update_ts
public String tenant
public HealthAndAlertInfoPojo(String tenant)
tenant
- the tenant namepublic HealthAndAlertInfoPojo()
public abstract String getAsKeyValuesStringForLogs()
Copyright © 2014–2022. All rights reserved.