monasca_log_api.monitoring package

Submodules

monasca_log_api.monitoring.client module

get_client(dimensions=None)[source]

Creates statsd client

Creates monasca-statsd client using configuration from config file and supplied dimensions.

Configuration is composed out of

[monitoring]
statsd_host = 192.168.10.4
statsd_port = 8125
statsd_buffer = 50

Dimensions are appended to following dictionary

{
    'service': 'monitoring',
    'component': 'monasca-log-api'
}
Note:
Passed dimensions do not override those specified in dictionary above
Parameters:dimensions (dict) – Optional dimensions
Returns:statsd client
Return type:monascastatsd.Client
LOGS_BULKS_REJECTED_METRIC = 'log.in_bulks_rejected'

Metric sent with amount of bulk packages that were rejected due to early stage validation (content-length, content-type). Only valid for v3.0.

LOGS_PROCESSING_TIME_METRIC = 'log.processing_time_ms'

Metric sent with time that log-api needed to process each received log. Metric does not include time needed to authorize requests.

LOGS_PUBLISHED_LOST_METRIC = 'log.out_logs_lost'

Metric sent with amount of logs that were lost due to critical error in publish phase.

LOGS_PUBLISHED_METRIC = 'log.out_logs'

Metric sent with amount of logs published to kafka

LOGS_PUBLISH_TIME_METRIC = 'log.publish_time_ms'

Metric sent with time that publishing took

LOGS_RECEIVED_BYTE_SIZE_METRICS = 'log.in_logs_bytes'

Metric sent with size of payloads(a.k.a. Content-Length) (in bytes) API receives

LOGS_RECEIVED_METRIC = 'log.in_logs'

Metrics sent with amount of logs (not requests) API receives

LOGS_REJECTED_METRIC = 'log.in_logs_rejected'

Metric sent with amount of logs that were rejected (i.e. invalid dimension)

LOGS_TRUNCATED_METRIC = 'log.out_logs_truncated_bytes'

Metric sent with amount of truncated bytes from log message