Specific API unit not working or docs wrong
-
In this doc: https://docs.cloudron.io/api/download-system-logs
its written:
Systemd unit name (e.g., box, nginx, mysql).however:
# curl -s "https://my.***.nl/api/v1/system/logs/nginx?access_token=***" | head -5 { "status": "Bad Request", "message": "No such unit 'nginx'" } # curl -s "https://my.***.nl/api/v1/system/logs/box?access_token=***" | head -5 {"realtimeTimestamp":1774683967027000,"message":"apphealthmonitor: setHealth: 3028ad69-1c5f-44c7-ae4c-f61a3f194df3 (***redacted***) waiting for 1186.973 to update health","source":"box"} # curl -s "https://my.***.nl/api/v1/system/logs/mysql?access_token=***" | head -5 { "status": "Bad Request", "message": "No such unit 'mysql'" }Because of the fact that Cloudron is not logging any 'failed logins' in the box.log (except succeeded) I need to extract them from the NGINX logs but then the API must work.
p.s.: the stream version does work but is not really suitable -
So for services like nginx or so you have to use the services API https://docs.cloudron.io/api/download-service-logs
The logs used to served up under the system API namespace but have moved to services some time ago. I will update the docs to not talk about those other services in the systems route.
-
N nebulon marked this topic as a regular topic
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login