1.Grafana Alloy
config.alloy
local.file_match "app" {
path_targets = [{ __path__ = "/var/log/myapp/*.log", service = "myapp", env = "prod" }]
}
loki.source.file "app" {
targets = local.file_match.app.targets
forward_to = [loki.write.uptimeeye.receiver]
}
loki.write "uptimeeye" {
endpoint {
url = "https://logs.uptimeeye.com/v1/ingest/loki/api/v1/push"
bearer_token = sys.env("UPTIMEEYE_KEY")
}
external_labels = { host = constants.hostname }
}2.Promtail
promtail.yaml
clients:
- url: https://logs.uptimeeye.com/v1/ingest/loki/api/v1/push
bearer_token: ue_ingest_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
external_labels:
env: prod
scrape_configs:
- job_name: myapp
static_configs:
- targets: [localhost]
labels:
service: myapp
__path__: /var/log/myapp/*.log3.Search
Labels arrive as fields and as the stream: service:=myapp, or _stream:{service="myapp",env="prod"} for the fastest possible filter.
Fields you get
These show up in the fields panel and can be used in every filter:
- every Loki label (
service,env,host,job,filename) - structured metadata, when your pipeline sets it
Tips
- Keep label cardinality low, exactly as you would for Loki. Put request ids and user ids into the line, not into labels.
- Alloy's
loki.processstages (stage.multiline,stage.json) run before the write, so parsed fields reach UptimeEye as fields.
FAQ
- Can I send to Loki and UptimeEye at the same time?
- Yes. List both under
clients:in Promtail, or forward to twoloki.writecomponents in Alloy. - Where do I get the ingest key?
- In the app under API Keys → New API Key → type “Log ingest”. The key starts with
ue_ingest_and is shown once. Management keys (ue_live_) are refused by the ingest endpoint. - How do I check that logs arrive?
- Open Logs in the app, pick the 15m range and search for
service:=<your service>. New lines are searchable within about a second; Live tail shows them with a ~6 s delay.
Related
DockerSend the logs of all containers on a Docker host to UptimeEye Logs: one Vector container on the Docker socket, or the Loki logging driver per container..VectorUse Vector to collect files, journald, Docker or Kubernetes logs, reshape them with VRL and send them to UptimeEye Logs with disk buffering..Log files / plain textSend plain-text logs — Spring, log4j, nginx, syslog, any pattern layout — to UptimeEye Logs without an agent.Searching logsNow that lines arrive: filters, fields, time ranges and live tail.