Giter Club home page Giter Club logo

addon-promtail's People

Contributors

dependabot[bot] avatar mdegat01 avatar pdecat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

addon-promtail's Issues

Multi-tenant Loki does not work

Is your feature request related to a problem? Please describe.
When multi-tenancy is configure in Loki, its name should be also configured in Promtail

Describe the solution you'd like
Add user configurable variable for tenant_id. This should go to the end of base_config.yaml after url parameter.

Describe alternatives you've considered

docker exec -ti addon_39bd2704_promtail bash
echo "    tenant_id: tenantname" >> /etc/promtail/base_config.yaml
exit
docker restart addon_39bd2704_promtail

Additional context
I guess that it should be added to the template. Just adding one more line at the end of base_config.yaml could break old Loki configurations. However, I haven't tested if this is a problem with non-tenant Loki server if there will be additional X-Scope-OrgID: header in the HTTP request. Maybe it doesn't matter and the change could be a trivial one line plus one new env variable.

Addon stopped sending/collecting logs

Describe the bug
This might or might not be related to me going from my old RPi4 hw to a Yellow and also upgrading Homeassistant OS to 10.2. I have a hard time to pinpoint when this happened.

http://loki.mypersonaldomain.com:3100/loki/api/v1/push

To Reproduce
Steps to reproduce the behavior:

  1. Configuring the addon with the loki url like this: http://loki.mypersonaldomain.com:3100/loki/api/v1/push. Loki instance is on another machine and confirmed working and reachable. (This is the configuration made to the addon by me.)
  2. Starting addon.
  3. Addon starts normally.
  4. No logs lines seems to be ingested or posted to loki.

Expected behavior
Add-on starts normally but no log files seems to be ingested. Nor transmitted to my Loki instance.

Logs
Debug-level logs

grpc_server_max_send_msg_size: 4194304
  grpc_server_max_concurrent_streams: 100
  grpc_server_max_connection_idle: 2562047h47m16.854775807s
  grpc_server_max_connection_age: 2562047h47m16.854775807s
  grpc_server_max_connection_age_grace: 2562047h47m16.854775807s
  grpc_server_keepalive_time: 2h0m0s
  grpc_server_keepalive_timeout: 20s
  grpc_server_min_time_between_pings: 5m0s
  grpc_server_ping_without_stream_allowed: false
  log_format: logfmt
  log_level: debug
  log_source_ips_enabled: false
  log_source_ips_header: ""
  log_source_ips_regex: ""
  log_request_at_info_level_enabled: false
  http_path_prefix: ""
  external_url: ""
  health_check_target: null
  disable: false
client:
  url: ""
  batchwait: 1s
  batchsize: 1048576
  follow_redirects: false
  backoff_config:
    min_period: 500ms
    max_period: 5m0s
    max_retries: 10
  timeout: 10s
  tenant_id: ""
  stream_lag_labels: ""
clients:
- url: http://loki.mypersonaldomain.com:3100/loki/api/v1/push
  batchwait: 1s
  batchsize: 1048576
  follow_redirects: false
  backoff_config:
    min_period: 500ms
    max_period: 5m0s
    max_retries: 10
  timeout: 10s
  tenant_id: ""
  stream_lag_labels: ""
positions:
  sync_period: 10s
  filename: /data/promtail/positions.yaml
  ignore_invalid_yaml: false
scrape_configs:
- job_name: journal
  pipeline_stages:
  - match:
      selector: '{container_name=~"homeassistant|hassio_supervisor"}'
      stages:
      - multiline:
          firstline: ^\x{001b}
  journal:
    max_age: 12h
    json: false
    labels:
      job: systemd-journal
    path: /var/log/journal
  relabel_configs:
  - source_labels: [__journal__systemd_unit]
    separator: ;
    regex: (.*)
    target_label: unit
    replacement: $1
    action: replace
  - source_labels: [__journal__hostname]
    separator: ;
    regex: (.*)
    target_label: nodename
    replacement: $1
    action: replace
  - source_labels: [__journal_syslog_identifier]
    separator: ;
    regex: (.*)
    target_label: syslog_identifier
    replacement: $1
    action: replace
  - source_labels: [__journal_container_name]
    separator: ;
    regex: (.*)
    target_label: container_name
    replacement: $1
    action: replace
  static_configs: []
target_config:
  sync_period: 10s
  stdin: false
limits_config:
  readline_rate: 10000
  readline_burst: 10000
  readline_rate_drop: true
level=info ts=2023-06-04T11:46:02.937566817Z caller=server.go:288 http=[::]:9080 grpc=[::]:45583 msg="server listening on addresses"
level=info ts=2023-06-04T11:46:02.93844613Z caller=main.go:121 msg="Starting Promtail" version="(version=2.6.1, branch=HEAD, revision=6bd05c9)"
level=debug ts=2023-06-04T11:46:04.358253927Z caller=logging.go:76 msg="GET /ready (200) 183.292µs"
level=debug ts=2023-06-04T11:48:04.36709367Z caller=logging.go:76 msg="GET /ready (200) 106.202µs"

Environment (please complete the following information):

Add-on version: 2.2.0
Home Assistant 2023.5.4
Supervisor 2023.04.1
Operating System 10.2
Frontend-version: 20230503.3

Additional context
This plugin has previously worked fine with this configuration.

Error reading journal position

Describe the bug
Recently Promtail stopped sending data to my Loki instance.

To Reproduce
Start Promtail addon.

Expected behavior
Promtail sends data to the configured Loki endpoint.

Logs

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
 Add-on: Promtail
 Promtail for Home Assistant
-----------------------------------------------------------
 Add-on version: 2.2.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.1  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2023.5.2
 Home Assistant Supervisor: 2023.04.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
Log level is set to INFO
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/02-set-timezone.sh
[21:22:46] INFO: Configuring timezone
cont-init: info: /etc/cont-init.d/02-set-timezone.sh exited 0
cont-init: info: running /etc/cont-init.d/promtail_setup.sh
[21:22:46] INFO: Setting base config for promtail...
cont-init: info: /etc/cont-init.d/promtail_setup.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun promtail (no readiness notification)
s6-rc: info: service legacy-services successfully started
[21:22:47] INFO: Starting Promtail...
[21:22:48] INFO: Promtail log level set to info
[21:22:48] INFO: Handing over control to Promtail...
level=error ts=2023-05-07T19:22:48.362033984Z caller=journaltarget.go:246 msg="received error reading saved journal position" err="failed to get realtime timestamp: cannot assign requested address"
level=info ts=2023-05-07T19:22:48.367774421Z caller=server.go:288 http=[::]:9080 grpc=[::]:36197 msg="server listening on addresses"
level=info ts=2023-05-07T19:22:48.368369211Z caller=main.go:121 msg="Starting Promtail" version="(version=2.6.1, branch=HEAD, revision=6bd05c9)"

Environment:

  • Add-on version: 2.2.0
  • Supervisor version: supervisor-2023.04.1
  • Operating system Home Assistant OS 10.1

Additional context
It could be related to grafana/loki#8163, but I'm not very familiar with Promtail so I can't tell for sure. I tried deleteting positions.yaml and restarting the addon as suggested in grafana/loki#8163 (comment), but that didn't solve the problem for me.

Upgrade to 1.9.0 and now it is broken

Describe the bug

~ docker logs 52f79bcbb50f -f
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] permissions: applying...
=[fix-attrs.d] permissions: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
 Add-on: Loki
 Loki for Home Assistant
-----------------------------------------------------------
 Add-on version: 1.9.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 6.6  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2021.11.2
 Home Assistant Supervisor: 2021.10.8
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing...
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[23:05:53] INFO: Starting Loki...
[23:05:53] INFO: Using default config
[23:05:54] INFO: Retention period set to 14d
[23:05:54] INFO: Loki log level set to info
[23:05:54] INFO: Handing over control to Loki...
2021-11-10 23:05:54.723154 I | proto: duplicate proto type registered: purgeplan.DeletePlan
2021-11-10 23:05:54.723659 I | proto: duplicate proto type registered: purgeplan.ChunksGroup
2021-11-10 23:05:54.723674 I | proto: duplicate proto type registered: purgeplan.ChunkDetails
2021-11-10 23:05:54.723688 I | proto: duplicate proto type registered: purgeplan.Interval
2021-11-10 23:05:54.758790 I | proto: duplicate proto type registered: grpc.PutChunksRequest
2021-11-10 23:05:54.758844 I | proto: duplicate proto type registered: grpc.GetChunksRequest
2021-11-10 23:05:54.758861 I | proto: duplicate proto type registered: grpc.GetChunksResponse
2021-11-10 23:05:54.758878 I | proto: duplicate proto type registered: grpc.Chunk
2021-11-10 23:05:54.758892 I | proto: duplicate proto type registered: grpc.ChunkID
2021-11-10 23:05:54.758908 I | proto: duplicate proto type registered: grpc.DeleteTableRequest
2021-11-10 23:05:54.758926 I | proto: duplicate proto type registered: grpc.DescribeTableRequest
2021-11-10 23:05:54.758943 I | proto: duplicate proto type registered: grpc.WriteBatch
2021-11-10 23:05:54.758960 I | proto: duplicate proto type registered: grpc.WriteIndexRequest
2021-11-10 23:05:54.758976 I | proto: duplicate proto type registered: grpc.DeleteIndexRequest
2021-11-10 23:05:54.758992 I | proto: duplicate proto type registered: grpc.QueryIndexResponse
2021-11-10 23:05:54.759107 I | proto: duplicate proto type registered: grpc.Row
2021-11-10 23:05:54.759131 I | proto: duplicate proto type registered: grpc.IndexEntry
2021-11-10 23:05:54.759146 I | proto: duplicate proto type registered: grpc.QueryIndexRequest
2021-11-10 23:05:54.759163 I | proto: duplicate proto type registered: grpc.UpdateTableRequest
2021-11-10 23:05:54.759216 I | proto: duplicate proto type registered: grpc.DescribeTableResponse
2021-11-10 23:05:54.759238 I | proto: duplicate proto type registered: grpc.CreateTableRequest
2021-11-10 23:05:54.759252 I | proto: duplicate proto type registered: grpc.TableDesc
2021-11-10 23:05:54.759270 I | proto: duplicate proto type registered: grpc.TableDesc.TagsEntry
2021-11-10 23:05:54.759286 I | proto: duplicate proto type registered: grpc.ListTablesResponse
2021-11-10 23:05:54.759303 I | proto: duplicate proto type registered: grpc.Labels
2021-11-10 23:05:54.759766 I | proto: duplicate proto type registered: storage.Entry
2021-11-10 23:05:54.759806 I | proto: duplicate proto type registered: storage.ReadBatch
level=info ts=2021-11-10T22:05:54.785087222Z caller=main.go:94 msg="Starting Loki" version="(version=2.4.1, branch=HEAD, revision=f61a4d261)"
level=info ts=2021-11-10T22:05:54.787307014Z caller=server.go:260 http=127.0.0.1:8080 grpc=[::]:9095 msg="server listening on addresses"
level=info ts=2021-11-10T22:05:54.787750547Z caller=modules.go:573 msg="RulerStorage is not configured in single binary mode and will not be started."
level=warn ts=2021-11-10T22:05:54.790288354Z caller=experimental.go:19 msg="experimental feature in use" feature="In-memory (FIFO) cache"
level=info ts=2021-11-10T22:05:54.792061762Z caller=table_manager.go:241 msg="loading table index_18941"
level=info ts=2021-11-10T22:05:54.819561444Z caller=table_manager.go:171 msg="uploading tables"
level=info ts=2021-11-10T22:05:54.819781664Z caller=table_manager.go:340 msg="loading local table index_18941"
level=info ts=2021-11-10T22:05:54.820450212Z caller=table.go:335 msg="uploading table index_18941"
level=info ts=2021-11-10T22:05:54.822440933Z caller=shipper_index_client.go:108 msg="starting boltdb shipper in 0 mode"
level=info ts=2021-11-10T22:05:54.836324235Z caller=worker.go:109 msg="Starting querier worker using query-scheduler and scheduler ring for addresses"
level=error ts=2021-11-10T22:05:54.83851138Z caller=log.go:106 msg="error running loki" err="mkdir wal: permission denied\nerror initialising module: ingester\ngithub.com/grafana/dskit/modules.(*Manager).initModule\n\t/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:108\ngithub.com/grafana/dskit/modules.(*Manager).InitModuleServices\n\t/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:78\ngithub.com/grafana/loki/pkg/loki.(*Loki).Run\n\t/src/loki/pkg/loki/loki.go:285\nmain.main\n\t/src/loki/cmd/loki/main.go:96\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1130"
[23:05:54] INFO: Starting NGinx...
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Logs

Include any relevant logs

Environment (please complete the following information):

  • Add-on version: 1.9.0
  • Operating system [e.g. Home Assistant OS 5.12]
  • OS Version: Home Assistant OS 6.6
    Home Assistant Core: 2021.11.2

Additional context
Add any other context about the problem here.

Add a prefix to logs/jobs

Is your feature request related to a problem? Please describe.
My problem is, that I have two HA server logging to the same loki docker instance.
My problem is, that I now can’t distinguish from witch HA the messages are coming from.
Is there a way to add a prefix or something that I can use to filter?

Describe the solution you'd like
A way to add a prefix to the log or job or something I can filter for within grafana

Thank you!

Access /config directory

First, thank you for bringing up Loki to Home Assistant.
I'm trying to ingest some syslog streams with promtail so I would like to add an additional scrape config. I find counterintuitive that the addon does not have /config mapped. Probably read-only is enough to hold /config/promtail/syslog.yaml or similar. I don't really know if there is some official recommendation on using /share over /config. For me is more intuitive to have these kind of files in /config (just as esphome, appdaemon, etc)

Thanks!

Opening ca-certificates permission denied (possible app armour)

Describe the bug
When running Promtail using grafana cloud an error is generated for permission denied on the ca-certificate file.

To Reproduce
Configure Promtail to use Grafana cloud.

Expected behavior
The application should work and send logs to GC.

Logs

-----------------------------------------------------------
 Add-on: Promtail
 Promtail for Home Assistant
-----------------------------------------------------------
 Add-on version: 1.8.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 6.4  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2021.9.6
 Home Assistant Supervisor: 2021.09.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] promtail_setup.sh: executing... 
[14:27:50] INFO: Setting base config for promtail...
[14:27:50] INFO: Adding basic auth to client config...
[cont-init.d] promtail_setup.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[14:27:52] INFO: Starting Promtail...
[14:27:52] INFO: Promtail log level set to info
[14:27:52] INFO: Handing over control to Promtail...
level=info ts=2021-09-21T13:27:52.762024759Z caller=server.go:239 http=[::]:9080 grpc=[::]:44627 msg="server listening on addresses"
level=info ts=2021-09-21T13:27:52.762986001Z caller=main.go:119 msg="Starting Promtail" version="(version=, branch=, revision=)"
level=warn ts=2021-09-21T13:27:53.94131226Z caller=client.go:344 component=client host=logs-prod-us-central1.grafana.net msg="error sending batch, will retry" status=-1 error="Post \"https://99800:***@logs-prod-us-central1.grafana.net/api/prom/push\": x509: failed to load system roots and no roots provided; open /etc/ssl/certs/ca-certificates.crt: permission denied"

Additional context
Previously spoke to @mdegat01 on Discord regarding this.

Lots of `apparmor="DENIED"` messages for the promtail process in system logs

Describe the bug

Upgraded from v1.9.3 to v2.0.1, and I'm now seing lots of apparmor="DENIED" messages for the promtail process in system logs.

To Reproduce
Steps to reproduce the behavior:

  1. Start promtail addon
  2. Watch system logs with sudo dmesg -T --follow

Expected behavior

No such messages should appear in system logs.

Logs

[Thu Apr 28 14:42:40 2022] audit: type=1400 audit(1651149761.593:1588): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml527638532" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[Thu Apr 28 14:42:53 2022] audit: type=1400 audit(1651149774.733:1589): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml3759942623" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[Thu Apr 28 14:42:59 2022] audit: type=1400 audit(1651149781.269:1590): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml921237687" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[Thu Apr 28 14:43:11 2022] audit: type=1400 audit(1651149793.085:1591): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml3880271902" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[Thu Apr 28 14:43:19 2022] audit: type=1400 audit(1651149801.281:1592): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml3013761889" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[Thu Apr 28 14:43:29 2022] audit: type=1400 audit(1651149811.261:1593): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml707310905" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[Thu Apr 28 14:43:39 2022] audit: type=1400 audit(1651149821.266:1594): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml3302321092" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[Thu Apr 28 14:43:49 2022] audit: type=1400 audit(1651149831.262:1595): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml3059055837" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[Thu Apr 28 14:44:00 2022] audit: type=1400 audit(1651149841.694:1596): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml3483202010" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[Thu Apr 28 14:44:09 2022] audit: type=1400 audit(1651149851.270:1597): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml3143308654" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[Thu Apr 28 14:44:19 2022] audit: type=1400 audit(1651149861.274:1598): apparmor="DENIED" operation="mknod" profile="39bd2704_promtail//promtail" name="/tmp/.positions.yaml2710608565" pid=2433987 comm="promtail" requested_mask="c" denied_mask="c" fsuid=0 ouid=0

Environment (please complete the following information):

  • Add-on version: v2.0.1
  • Supervisor version: supervisor-2022.04.0
  • Operating system: Debian 11 amd64/x86_64

Additional context
N/A

Not working after HA upgrade to 2021.10.01

Describe the bug
The addon is no longer able to start, after upgrading HA. The log below is all I got. I am not sure if it is capped.

Logs

	/src/loki/clients/pkg/logentry/stages/multiline.go:109 +0x9c
created by github.com/grafana/loki/clients/pkg/logentry/stages.(*multilineStage).Run
	/src/loki/clients/pkg/logentry/stages/multiline.go:103 +0x50
goroutine 76 [chan receive]:
github.com/grafana/loki/clients/pkg/logentry/stages.(*matcherStage).runKeep.func1(0x5594dc0, 0x5594e40)
	/src/loki/clients/pkg/logentry/stages/match.go:160 +0x9c
created by github.com/grafana/loki/clients/pkg/logentry/stages.(*matcherStage).runKeep
	/src/loki/clients/pkg/logentry/stages/match.go:158 +0x8c
goroutine 77 [chan receive]:
github.com/grafana/loki/clients/pkg/logentry/stages.(*matcherStage).runKeep.func2(0x5594d80, 0x5594d40, 0x54a5710, 0x5594dc0)
	/src/loki/clients/pkg/logentry/stages/match.go:166 +0x60
created by github.com/grafana/loki/clients/pkg/logentry/stages.(*matcherStage).runKeep
	/src/loki/clients/pkg/logentry/stages/match.go:164 +0xc0
goroutine 78 [chan receive]:
github.com/grafana/loki/clients/pkg/logentry/stages.(*Pipeline).Wrap.func1(0x54c9610, 0x5594dc0, 0x5594780)
	/src/loki/clients/pkg/logentry/stages/pipeline.go:101 +0x8c
created by github.com/grafana/loki/clients/pkg/logentry/stages.(*Pipeline).Wrap
	/src/loki/clients/pkg/logentry/stages/pipeline.go:99 +0x104
goroutine 79 [chan receive]:
github.com/grafana/loki/clients/pkg/logentry/stages.(*Pipeline).Wrap.func2(0x54c9610, 0x5594d00, 0x5594cc0)
	/src/loki/clients/pkg/logentry/stages/pipeline.go:108 +0xc8
created by github.com/grafana/loki/clients/pkg/logentry/stages.(*Pipeline).Wrap
	/src/loki/clients/pkg/logentry/stages/pipeline.go:105 +0x130
goroutine 80 [runnable]:
github.com/coreos/go-systemd/sdjournal._Cfunc_my_sd_journal_next(0x63bc4629, 0x65802b48)
	_cgo_gotypes.go:318 +0x34
github.com/coreos/go-systemd/sdjournal.(*Journal).Next.func1(0x63bc4629, 0x54c98a0)
	/src/loki/vendor/github.com/coreos/go-systemd/sdjournal/journal.go:561 +0x7c
github.com/coreos/go-systemd/sdjournal.(*Journal).Next(0x54c98a0)
	/src/loki/vendor/github.com/coreos/go-systemd/sdjournal/journal.go:561 +0x6c
github.com/coreos/go-systemd/sdjournal.(*JournalReader).Read(0x54bb170, {0x56ce000, 0x10000, 0x10000})
	/src/loki/vendor/github.com/coreos/go-systemd/sdjournal/read.go:142 +0x34
github.com/coreos/go-systemd/sdjournal.(*JournalReader).Follow(0x54bb170, 0x5594e80, {0x26d52e0, 0x3857bf0})
	/src/loki/vendor/github.com/coreos/go-systemd/sdjournal/read.go:210 +0xb8
github.com/grafana/loki/clients/pkg/promtail/targets/journal.journalTargetWithReader.func1(0x541fec0, 0x5594e80)
	/src/loki/clients/pkg/promtail/targets/journal/journaltarget.go:181 +0x48
created by github.com/grafana/loki/clients/pkg/promtail/targets/journal.journalTargetWithReader
	/src/loki/clients/pkg/promtail/targets/journal/journaltarget.go:179 +0x3c8
goroutine 102 [running]:
	goroutine running on other thread; stack unavailable
created by github.com/weaveworks/common/server.(*Server).Run
	/src/loki/vendor/github.com/weaveworks/common/server/server.go:383 +0x4c
goroutine 103 [IO wait]:
internal/poll.runtime_pollWait(0x65914b88, 0x72)
	/usr/local/go/src/runtime/netpoll.go:229 +0xac
internal/poll.(*pollDesc).wait(0x5754154, 0x72, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x30
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0x5754140)
	/usr/local/go/src/internal/poll/fd_unix.go:402 +0x234
net.(*netFD).accept(0x5754140)
	/usr/local/go/src/net/fd_unix.go:173 +0x20
net.(*TCPListener).accept(0x54bb6b0)
	/usr/local/go/src/net/tcpsock_posix.go:140 +0x20
net.(*TCPListener).Accept(0x54bb6b0)
	/usr/local/go/src/net/tcpsock.go:262 +0x30
github.com/weaveworks/common/middleware.(*countingListener).Accept(0x54bb6d0)
	/src/loki/vendor/github.com/weaveworks/common/middleware/counting_listener.go:22 +0x28
net/http.(*Server).Serve(0x5616630, {0x26f07d4, 0x54bb6d0})
	/usr/local/go/src/net/http/server.go:3001 +0x320
github.com/weaveworks/common/server.(*Server).Run.func2(0x562cd80, 0x5697600)
	/src/loki/vendor/github.com/weaveworks/common/server/server.go:394 +0x80
created by github.com/weaveworks/common/server.(*Server).Run
	/src/loki/vendor/github.com/weaveworks/common/server/server.go:391 +0x70
trap    0x0
error   0x0
oldmask 0x0
r0      0x0
r1      0x64ffd9b4
r2      0x0
r3      0x8
r4      0x0
r5      0x64ffd9b4
r6      0x1
r7      0xaf
r8      0x5490000
r9      0xf0
r10     0x54920f0
fp      0x37c10f4
ip      0xaf
sp      0x64ffd9a8
lr      0x76e28ea1
pc      0x76e19c66
cpsr    0x70030
fault   0x0
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Environment (please complete the following information):

  • Add-on version: 1.8.1
  • Supervisor version: 2021.09.6
  • Operating system: Home Assistant OS 6.4

Unable to start promtail on home assistant 2021.12.10

Describe the bug
I cannot start the promtail addon.

To Reproduce
Steps to reproduce the behavior:

  1. Add the repository to HA.
  2. Install the promtail add-on.
  3. Configure the add-on to point to your respective loki instance.
  4. Start the add-on.

Expected behavior
The add-on should start running without error.

Logs

s6-hiercopy: fatal: unable to copy hierarchy from /etc/s6/init/env to /var/run/s6/env-stage1: Permission denied

Environment (please complete the following information):

  • Add-on version: v1.9.1
  • Supervisor version: 2021.12.2
  • Operating system: Debian 10
  • Docker Version: 20.10.12

Additional context
None

Add custom ports from additional scrape configs like syslog listener

Is your feature request related to a problem? Please describe.

I would like to have Promtail as receiver of syslog logs

Describe the solution you'd like

In the additional scrape configs I have enabled syslog listerner. This listens at the port 1541 receiving logs from a forwarder. It is necessary to make this addon aware of this port.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Promtail saturates CPU

Describe the bug
Promtail saturates CPU

To Reproduce
Steps to reproduce the behavior:

  1. Install Promtail
  2. Start it
  3. Run Loki
  4. Check CPU usage of the Promtail container

Expected behavior

Promtail should not saturate

Logs

Include any relevant logs

Environment (please complete the following information):

  • Add-on version: 1.6.1
  • Supervisor version: supervisor-2021.06.8
  • Operating system Home Assistant OS 5.4.83-v8

Additional context

Screenshot 2021-08-07 at 12 19 53

I would need to troubleshoot promtail process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.