mlm_insights.core.post_processors.monitoring.interfaces package

Submodules

mlm_insights.core.post_processors.monitoring.interfaces.monitoring_client module

class mlm_insights.core.post_processors.monitoring.interfaces.monitoring_client.MonitoringClient

Bases: ABC

Abstract Class for defining Monitoring Clients like OCI Monitoring, Grafana, etc.

This class serves as a blueprint for creating and connecting to different monitoring services. Implementations of this class should provide specific logic for posting payloads to their respective services.

classmethod get_name() str

Gets the name of the monitoring client class.

Returns

str

The name of the class. This can be useful for identifying the type of monitoring client being used, especially in logging and debugging scenarios.

abstract post_payload(payload: Any, **kwargs: Any) None

Posts the payload to the monitoring service.

Parameters

payloadAny

The payload to be posted. This can be any type of data that needs to be monitored, such as metrics, logs, or alerts.

**kwargsAny

Additional keyword arguments that may be required for posting the payload. These can include authentication tokens, request headers, etc.

Raises

NotImplementedError

If the method is not implemented by a subclass.

mlm_insights.core.post_processors.monitoring.interfaces.payload_manager module

class mlm_insights.core.post_processors.monitoring.interfaces.payload_manager.MonitoringPayloadManager

Bases: ABC

Abstract Class for defining Payload Manager for various monitoring services.

This class serves as a blueprint for creating payload manager that can validate and map payloads to the format required by different monitoring services.

classmethod get_name() str

Gets the name of the payload mapper class.

Returns

str

The name of the class. This can be useful for identifying the type of payload manager being used, especially in logging and debugging scenarios.

abstract map(payload: PostProcessorRequest, **kwargs: Any) Any

Maps the payload to the required format.

Parameters

payloadPostProcessorRequest

The payload to be mapped.

**kwargsAny

Additional keyword arguments that may be required for mapping. These can include payload data, mapping rules, configuration settings, etc.

Returns

Any

The mapped payload in the required format for the specific monitoring service.

Raises

NotImplementedError

If the method is not implemented by a subclass.

abstract validate(payload: PostProcessorRequest, **kwargs: Any) None

Validates the payload or mapping parameters.

Parameters

payloadPostProcessorRequest

The payload to be validated.

**kwargsAny

Additional keyword arguments that may be required for validation. These can include payload data, configuration settings, etc.

Raises

NotImplementedError

If the method is not implemented by a subclass.

Module contents