Skip to content

CloudWatch Integration

Cloud Watch can be used for monitoring BI Events and Internal Redis Queues.
BI Events are events or metrics that are collected whenever an user perform some action during Comet application usage.
Internal Redis queues monitoring is useful for investigating technical issues with the application

Cloud Watch BI Events/Metrics

In order to enable it, you may want to set the following environment variables. If its a Linux deployment, you can add them in your /etc/default/comet-ml file.

BI_ENABLED="True"
AWS_CLOUD_WATCH_KEY=""
AWS_CLOUD_WATCH_SECRET=""
AWS_CLOUD_WATCH_SOURCE="comet_onprem"
AWS_CLOUD_WATCH_BI_ENABLED="True"
AWS_CLOUD_WATCH_REGION="us-east-1"

When is a kubernetes deployment, add can append those variables in your backend.additionalConfigurations section in your values.yaml like:

backend:
  additionalConfigurations:
    BI_ENABLED: "true"
    AWS_CLOUD_WATCH_KEY: ""
    AWS_CLOUD_WATCH_SECRET: ""
    AWS_CLOUD_WATCH_SOURCE: "comet_onprem"
    AWS_CLOUD_WATCH_BI_ENABLED: "True"
    AWS_CLOUD_WATCH_REGION: "us-east-1"

Cloud Watch Redis Queue monitoring

To enable internal monitoring application Redis queues, the following variables are relevant

AWS_CLOUD_WATCH_MONITORING_ENABLED="True"
AWS_CLOUD_WATCH_KEY=""
AWS_CLOUD_WATCH_SECRET=""
AWS_CLOUD_WATCH_SOURCE="comet_onprem"

or

backend:
  additionalConfigurations:
    AWS_CLOUD_WATCH_MONITORING_ENABLED: "True"
    AWS_CLOUD_WATCH_KEY: ""
    AWS_CLOUD_WATCH_SECRET: ""
    AWS_CLOUD_WATCH_SOURCE: "comet_onprem"

Here's a JSON example to import in your CloudWatch dashboard

{
    "widgets": [
        {
            "height": 6,
            "width": 12,
            "y": 0,
            "x": 0,
            "type": "metric",
            "properties": {
                "metrics": [
                    [ "comet_onprem", "metrics-time-in-Q", { "region": "us-east-1" } ]
                ],
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 60,
                "title": "metrics-time-in-Q"
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 0,
            "x": 12,
            "type": "metric",
            "properties": {
                "metrics": [
                    [ "comet_onprem", "metrics-time-since-enqueued-", { "region": "us-east-1" } ]
                ],
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 60,
                "title": "metrics-time-since-enqueued-"
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 6,
            "x": 12,
            "type": "metric",
            "properties": {
                "metrics": [
                    [ "comet_onprem", "metrics-time-since-Q-empty-", { "region": "us-east-1" } ]
                ],
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 60,
                "title": "metrics-time-since-Q-empty-"
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 6,
            "x": 0,
            "type": "metric",
            "properties": {
                "metrics": [
                    [ "comet_onprem", "redis-logdata-time-in-Q", { "region": "us-east-1" } ]
                ],
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 60,
                "title": "redis-logdata-time-in-Q"
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 12,
            "x": 12,
            "type": "metric",
            "properties": {
                "metrics": [
                    [ "comet_onprem", "redis-logdata-time-since-Q-empty-", { "region": "us-east-1" } ]
                ],
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 60,
                "title": "redis-logdata-time-since-Q-empty-"
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 18,
            "x": 12,
            "type": "metric",
            "properties": {
                "metrics": [
                    [ "comet_onprem", "redis-logdata-time-since-enqueued-", { "region": "us-east-1" } ]
                ],
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 60,
                "title": "redis-logdata-time-since-enqueued-"
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 24,
            "x": 12,
            "type": "metric",
            "properties": {
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 300,
                "start": "-PT3H",
                "end": "P0D",
                "metrics": [
                    [ "comet_onprem", "redis-querybuilder-time-since-Q-empty-", { "region": "us-east-1" } ]
                ],
                "title": "redis-querybuilder-time-since-Q-empty-"
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 30,
            "x": 12,
            "type": "metric",
            "properties": {
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 300,
                "start": "-PT3H",
                "end": "P0D",
                "metrics": [
                    [ "comet_onprem", "redis-querybuilder-time-in-Q", { "region": "us-east-1" } ]
                ],
                "title": "redis-querybuilder-time-in-Q"
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 12,
            "x": 0,
            "type": "metric",
            "properties": {
                "metrics": [
                    [ "comet_onprem", "redis-querybuilder-time-since-enqueued-", { "region": "us-east-1" } ]
                ],
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 60,
                "title": "redis-querybuilder-time-since-enqueued-",
                "yAxis": {
                    "left": {
                        "label": "MS"
                    }
                }
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 18,
            "x": 0,
            "type": "metric",
            "properties": {
                "metrics": [
                    [ "comet_onprem", "stdout-time-in-Q", { "region": "us-east-1" } ]
                ],
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 60,
                "title": "stdout-time-in-Q"
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 24,
            "x": 0,
            "type": "metric",
            "properties": {
                "metrics": [
                    [ "comet_onprem", "stdout-time-since-Q-empty-", { "region": "us-east-1" } ]
                ],
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 60,
                "title": "stdout-time-since-Q-empty-"
            }
        },
        {
            "height": 6,
            "width": 12,
            "y": 30,
            "x": 0,
            "type": "metric",
            "properties": {
                "metrics": [
                    [ "comet_onprem", "stdout-time-since-enqueued-", { "region": "us-east-1" } ]
                ],
                "view": "timeSeries",
                "stacked": false,
                "region": "us-east-1",
                "stat": "Average",
                "period": 60,
                "title": "stdout-time-since-enqueued-"
            }
        }
    ]
}
Dec. 19, 2023