Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Specific API unit not working or docs wrong

Specific API unit not working or docs wrong

Scheduled Pinned Locked Moved Support
api
2 Posts 2 Posters 25 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • imc67I Offline
    imc67I Offline
    imc67
    translator
    wrote last edited by james
    #1

    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

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote last edited by
      #2

      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.

      1 Reply Last reply
      1
      • nebulonN 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
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search