Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon logs requests #5795

Open
bohendo opened this issue Nov 24, 2018 · 2 comments
Open

daemon logs requests #5795

bohendo opened this issue Nov 24, 2018 · 2 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@bohendo
Copy link

bohendo commented Nov 24, 2018

Version information:

I'm running docker image ipfs/go-ipfs:latest aka

$ ipfs version --all
go-ipfs version: 0.4.18-6f19dd5
Repo version: 7
System version: amd64/linux
Golang version: go1.11.1

Type:

Feature (+ related bug)

Description:

I'm preparing to administer an IPFS node & am having trouble with logs. The logs that I'm interested in are: Timestamp, HTTP endpoint, result, latency. The goal is to monitor the interactions this IPFS node has with it's clients. For example, something like this would be awesome:

181124T06:58:22Z api/v0/add - success in 123 ms
181124T06:59:22Z api/v0/pin - failure: forbidden 403 in 23 ms 

Looks like the current system does not provide any option to start the daemon in a way that provides useful logs like this & would be overjoyed if a feature was added that provided this functionality.

Seems like my current options are:

According to ipfs daemon --help and ipfs help, I don't have any options. Some options are available though & I'd prefer to be able to discover them via this help interface.

I discovered ipfs daemon --verbose from issue #1816 which has a signal-to-noise ratio of almost 0

The same issue also introduced ipfs log level which I'm trying to use like so:

ipfs log level all critical # I expect this to turn off all logs besides critical ones
ipfs log level eventlog info # I expect this to only turn on logs for the "eventlog" module
ipfs log tail # I expect this to print logs according to my log level changes above

But the above set of commands seems to ignore the log level updates & just print out everything. For example, most of the logs that are printed include stuff like "system":"dht" and "system":"addrutil" which suggests that logs other than those from the eventlog system are being printed. This may be a bug or potentially a misunderstanding on my end.

I also don't know if "eventlog" is the system that contains the logs I want. "cmds/http" Also sounds promising but I don't know where the documentation is that would explain this, any guidance would be greatly appreciated.

IPFS is going to change the world, thank you for all the work you've put into this project 😁

@bohendo
Copy link
Author

bohendo commented Nov 24, 2018

Further discussion & advice would be greatly appreciated 😄

https://discuss.ipfs.io/t/how-to-administer-an-ipfs-node-to-decentralize-dao-data/4328

@Stebalien Stebalien added the kind/enhancement A net-new feature or improvement to an existing feature label Nov 29, 2018
@Stebalien
Copy link
Member

Stebalien commented Nov 29, 2018

At the moment, the best way to do this is with an nginx reverse proxy. You can also poll ipfs diag cmds but that's obviously a bit messy.

Really, you shouldn't be exposing the API to the public internet without sticking some reverse proxy out in front to restrict requests to some allowed set.

@momack2 momack2 added this to Inbox in ipfs/go-ipfs May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
No open projects
Development

No branches or pull requests

2 participants