Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upwhere can I find prometheus logs? #2363
Comments
This comment has been minimized.
This comment has been minimized.
|
I set up prometheus in docker container { |
This comment has been minimized.
This comment has been minimized.
|
Now I need to centralise the logs from prometheus to ELK, but for now, I can only see logs from "docker logs" command, which can not be filter to logstash. |
This comment has been minimized.
This comment has been minimized.
andrewhowdencom
commented
Jan 24, 2017
•
|
I think Docker already writes these logs to disk. Check
(Note: In my case, I puppet docker through k8s, so it might be different) |
This comment has been minimized.
This comment has been minimized.
|
@andrewhowdencom Can we just map this log to another place when set up prometheus by config? |
This comment has been minimized.
This comment has been minimized.
andrewhowdencom
commented
Jan 24, 2017
|
You could get Prometheus to log to disk and mount in a host volume |
This comment has been minimized.
This comment has been minimized.
|
@andrewhowdencom Thanks for your advice. BTW, do you know the config item in prometheus which will map a host volume to provide it to log? |
This comment has been minimized.
This comment has been minimized.
andrewhowdencom
commented
Jan 24, 2017
•
|
The host volume stuff you'll have to do in Docker, but the Prometheus configuration is via the CLI.
Edit: Alternatively, I'd think about just piping that output to disk somewhere in a parent process.
|
This comment has been minimized.
This comment has been minimized.
|
@andrewhowdencom thanks very much. I will try it. Maybe syslog can be a good channel to logstash. If not, I will use disk volume mapping. |
brian-brazil
closed this
Mar 27, 2017
This comment has been minimized.
This comment has been minimized.
burka
commented
Jul 6, 2017
|
You can always use another docker logging-driver to collect all docker logs and send them to ELK. |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
xixikaikai commentedJan 24, 2017
What did you do?
where can I find prometheus log?
What did you expect to see?
logs
Linux 3.10.0-514.2.2.el7.x86_64 x86_64
1.4.1
$ docker logs 86dfa5a
time="2017-01-24T07:50:47Z" level=info msg="Starting prometheus (version=1.4.1, branch=master, revision=2a89e8733f240d3cd57a6520b52c36ac4744ce12)" source="main.go:77"
time="2017-01-24T07:50:47Z" level=info msg="Build context (go=go1.7.3, user=root@e685d23d8809, date=20161128-09:59:22)" source="main.go:78"
time="2017-01-24T07:50:47Z" level=info msg="Loading configuration file /etc/prometheus/prometheus.yml" source="main.go:250"
time="2017-01-24T07:50:47Z" level=info msg="Loading series map and head chunks..." source="storage.go:354"
time="2017-01-24T07:50:47Z" level=info msg="0 series loaded." source="storage.go:359"
time="2017-01-24T07:50:47Z" level=info msg="Starting target manager..." source="targetmanager.go:63"
time="2017-01-24T07:50:47Z" level=info msg="Listening on :9090" source="web.go:248"
time="2017-01-24T07:55:47Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T07:55:47Z" level=info msg="Done checkpointing in-memory metrics and chunks in 59.669376ms." source="persistence.go:573"
time="2017-01-24T08:00:47Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:00:47Z" level=info msg="Done checkpointing in-memory metrics and chunks in 58.828337ms." source="persistence.go:573"
time="2017-01-24T08:05:47Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:05:47Z" level=info msg="Done checkpointing in-memory metrics and chunks in 58.198574ms." source="persistence.go:573"
time="2017-01-24T08:10:47Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:10:47Z" level=info msg="Done checkpointing in-memory metrics and chunks in 59.811229ms." source="persistence.go:573"
time="2017-01-24T08:15:47Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:15:47Z" level=info msg="Done checkpointing in-memory metrics and chunks in 57.654694ms." source="persistence.go:573"
time="2017-01-24T08:20:47Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:20:48Z" level=info msg="Done checkpointing in-memory metrics and chunks in 58.830557ms." source="persistence.go:573"
time="2017-01-24T08:25:48Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:25:48Z" level=info msg="Done checkpointing in-memory metrics and chunks in 57.968977ms." source="persistence.go:573"
time="2017-01-24T08:30:48Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:30:48Z" level=info msg="Done checkpointing in-memory metrics and chunks in 58.804957ms." source="persistence.go:573"
time="2017-01-24T08:35:48Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:35:48Z" level=info msg="Done checkpointing in-memory metrics and chunks in 59.490262ms." source="persistence.go:573"
time="2017-01-24T08:40:48Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:40:48Z" level=info msg="Done checkpointing in-memory metrics and chunks in 58.052496ms." source="persistence.go:573"
time="2017-01-24T08:45:48Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:45:48Z" level=info msg="Done checkpointing in-memory metrics and chunks in 62.90804ms." source="persistence.go:573"
time="2017-01-24T08:50:48Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:549"
time="2017-01-24T08:50:48Z" level=info msg="Done checkpointing in-memory metrics and chunks in 60.801515ms." source="persistence.go:573"
$ docker exec -it 86dfa5a /bin/bash
rpc error: code = 2 desc = oci runtime error: exec failed: exec: "/bin/bash": stat /bin/bash: no such file or directory