Integrating AWS EC2 information into Promtail Job?

Hello:

I hope this query finds you well.

I want to integrate EC2 information into my Promtail Jobs. I am following the tutorial at https://grafana.com/docs/loki/latest/clients/aws/ec2/.

I don’t see even a crumb of EC2 information when I examine the logs in Grafana, particularly not in the “Edit Panel” UI’s “Log labels” tree-menu. Too, I confirmed that new log entries are indeed reaching Grafana.

Neither my Promtail log nor my Loki log contain any error entries (and the Promtail log contains only one reference to EC2, while in debug mode).

Here is my redacted promtail-local-config.yaml:

server:
  http_listen_port: 41000
  grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml

scrape_configs:
- job_name: system
  static_configs:
  - targets:
      - localhost
    labels:
      job: varlogs
      __path__: /var/log/*log
- job_name: journal
  journal:
    json: false
    max_age: 12h
    path: /var/log/journal
    labels:
      job: systemd-journal
  relabel_configs:
    - source_labels: ['__journal__systemd_unit']
      target_label: 'unit'
- job_name: ec2-logs
  ec2_sd_configs:
    - region: us-moon-1
      access_key: AKIAFFFFFFFFFFFF
      secret_key: ***************************************
  relabel_configs:
    - source_labels: [__meta_ec2_tag_Name]
      target_label: name
      action: replace
    - source_labels: [__meta_ec2_instance_id]
      target_label: instance
      action: replace
    - source_labels: [__meta_ec2_availability_zone]
      target_label: zone
      action: replace
    - action: replace
      replacement: /var/log/**.log
      target_label: __path__
    - source_labels: [__meta_ec2_private_dns_name]
      regex: "(.*)"
      target_label: __host__

clients:
  - url: "http://172.3.4.5:5000/loki/api/v1/push"

Even if I should completely discarding this tutorial, how can I integrate EC2 information into my Promtail Jobs?

|
Graffana

PS: I searched elsewhere at length and could not find a treatment.