More in Access to your live system

CloudWatch, Azure Monitor and Cloud Logging

Let the agent search your cloud's own logs (Amazon CloudWatch, Azure Monitor or Google Cloud Logging), read with the cloud account you connected, with no extra keys.

In the appPlatformSettingsLive system, or SettingsAccounts and cloud

If your logs are in your cloud's own log store, the agent can search them there:

They need no keys of their own: they read with the cloud account, connected first under Settings › Accounts and cloud. For each search, the agent gets a short-lived pass that can only read, never the account's key.

The agent searches up to the last 7 days, and gets at most 1,000 entries per search. Values that look like secrets are removed from every entry before the agent sees it. The log watcher uses the same connection.

One log source per platform

A platform reads its logs from one place: Loki, Elasticsearch, OpenSearch, Datadog, Better Stack, ClickHouse, Graylog, CloudWatch, Azure Monitor or Google Cloud Logging. On Live system, disconnect the one that is connected before choosing another. On Accounts and cloud, the switch says which one it replaces before you save, and saving removes that one's settings and keys.

Connect it#

  1. 1

    Connect the cloud account under Settings › Accounts and cloud, if it isn't yet.

  2. 2

    Under that cloud's settings, turn on Use CloudWatch for logs (or Use Azure Monitor for logs, or Use Cloud Logging for logs). Or go to Settings › Live system, click Connect a cluster or logs, and choose it there.

  3. 3

    Fill in where to look (below).

  4. 4

    Describe your logs in How your logs are labelled.

  5. 5

    Click Save, then Check connection.

StoreWhere to lookWhat the account needs
CloudWatchLog groups: one per line. A * matches the rest of a name, for example /aws/lambda/payments-*. They are read in the regions ticked for Amazon Web Services, at most 20 log groups.To read logs (logs:DescribeLogGroups, logs:FilterLogEvents). Amazon's ReadOnlyAccess policy has both.
Azure MonitorLog Analytics workspace: chosen from the workspaces in your subscriptions (or its workspace ID, typed). Tables (optional): which tables to search. Empty: containers (ContainerLogV2), Application Insights (AppTraces, AppExceptions), App Service, Functions, machines (Syslog, Event) and AzureDiagnostics.The Log Analytics Reader role on the workspace.
Cloud LoggingOnly this platform's logs (optional): a filter in Google's own words that every search also gets, for example resource.type="k8s_container". The logs are read in the projects ticked for Google Cloud.The Logs Viewer role (roles/logging.viewer) in each project.

If the platform lists namespaces (on the Kubernetes card of Live system), every search is limited to them:

  • CloudWatch: your log groups are already this platform's own, so only a line that names another namespace is left out. Plain-text and Lambda lines stay.
  • Azure Monitor and Cloud Logging: a workspace or project may hold other platforms' logs, so only entries from those namespaces are read. An entry that names no namespace is left out.

How the agent searches#

The agent writes plain words or "quoted phrases"; an entry must have all of them. It can't write the store's own query: we write it, and the words go in as text that can't change it. So a search never reaches past your log groups, workspace, projects or namespaces.

  • CloudWatch matches the words exactly, case included. A word can't hold " or \.
  • Azure Monitor matches them anywhere in the message, in any case.
  • Cloud Logging matches them in any field, in any case.

Which entries are errors#

For the log watcher, an error is an entry whose level says so (error, fatal, critical, alert, emergency or panic). An entry with no level counts only when its message says error, exception, fatal, critical, traceback or panic. So INFO retrying after error is not an error. On Cloud Logging, Google's own audit logs are left out.

CloudWatch and Cloud Logging limit how often their logs can be searched, so the log watcher there doesn't read the lines around each error again. Azure Monitor does.

With your own runner

When the agent runs on your own runner and the cloud account's key is kept there (or AWS signs in as your runner's own role), your runner signs in and reads the logs for the check and the log watcher. It needs runner 0.16.0 or later.