|
1 | 1 | # ----------------------------------------------------------------------------- |
2 | 2 | # Agent signal sources. |
3 | 3 | # |
4 | | -# Loaded by the main config when `agent.sources_path` points at this file. |
5 | | -# Keeping sources separate makes it easy to swap fixtures (file → ES) and to |
6 | | -# manage per-environment source lists without touching the rest of the config. |
| 4 | +# Loaded automatically by Versus when this file sits next to the main |
| 5 | +# config file (path is hardcoded — no `sources_path` setting). Drop the |
| 6 | +# file or rename it to disable all sources without editing config.yaml. |
7 | 7 | # |
8 | 8 | # Each entry must have: |
9 | 9 | # name: unique identifier (used in cursor keys and admin views) |
10 | | -# type: "file" or "elasticsearch" |
| 10 | +# type: "file" | "elasticsearch" | "loki" | "cloudwatchlogs" |
11 | 11 | # enable: true | false |
12 | | -# Plus one of `file:` / `elasticsearch:` blocks depending on `type`. |
| 12 | +# Plus the matching block (`file:` / `elasticsearch:` / `loki:` / |
| 13 | +# `cloudwatchlogs:`) for the chosen type. |
13 | 14 | # ----------------------------------------------------------------------------- |
14 | 15 | sources: |
15 | 16 | # File source — easiest way to test the agent end-to-end. Drop a log file |
@@ -72,3 +73,36 @@ sources: |
72 | 73 | # - host.name |
73 | 74 | # - error.stack_trace |
74 | 75 | # page_size: 500 |
| 76 | + |
| 77 | + # Grafana Loki source. |
| 78 | + # - name: loki-prod |
| 79 | + # type: loki |
| 80 | + # enable: false |
| 81 | + # loki: |
| 82 | + # address: http://loki:3100 # or https://logs-prod-...grafana.net for Grafana Cloud |
| 83 | + # # tenant_id: ${LOKI_TENANT_ID} # multi-tenant Loki / Grafana Cloud |
| 84 | + # # username: ${LOKI_USERNAME} # Grafana Cloud: instance ID |
| 85 | + # # password: ${LOKI_PASSWORD} # Grafana Cloud: API token |
| 86 | + # # bearer_token: ${LOKI_TOKEN} # alternative to user/pass |
| 87 | + # # insecure_skip_verify: false |
| 88 | + # query: '{app="api",env="prod"} |= "error"' |
| 89 | + # severity_field: level # read from stream labels |
| 90 | + # extra_labels: |
| 91 | + # - app |
| 92 | + # - namespace |
| 93 | + # page_size: 500 |
| 94 | + |
| 95 | + # AWS CloudWatch Logs source. |
| 96 | + # Auth uses the standard AWS SDK chain (env vars, ~/.aws/credentials, |
| 97 | + # IAM instance/task role). Required IAM: |
| 98 | + # logs:FilterLogEvents on the target log group. |
| 99 | + # - name: cwlogs-lambda |
| 100 | + # type: cloudwatchlogs |
| 101 | + # enable: false |
| 102 | + # cloudwatchlogs: |
| 103 | + # region: us-east-1 |
| 104 | + # log_group_name: /aws/lambda/my-function |
| 105 | + # # log_stream_prefix: 2026/05/12 # narrow to recent streams (cheaper) |
| 106 | + # # filter_pattern: '?ERROR ?Exception' # CloudWatch filter syntax (NOT regex) |
| 107 | + # page_size: 500 |
| 108 | + |
0 commit comments