charlie-haley / omada_exporter

Prometheus Exporter for TP-Link Omada Controller SDN.
MIT License
88 stars 14 forks source link

unable to log in with controller v5.3 and exporter v0.5.0 #39

Closed rssnyder closed 2 years ago

rssnyder commented 2 years ago

Hello!

I am running omada controller v5.3 on x86 via mbentley/omada-controller:5.3.

In an attempt to get the exporter working I am using ghcr.io/charlie-haley/omada_exporter:0.5.0.

I have all the connection info working but am getting this when attempting to start the container:

time="2022-05-25T21:12:53Z" level=info msg="not logged in, logging in with user: docker"
time="2022-05-25T21:12:53Z" level=fatal msg="failed to login: %!s(<nil>)"

I verified the login was correct by logging in myself with it. I have also tried my admin user with no success.

I saw https://github.com/charlie-haley/omada_exporter/issues/7 which was from changes introduced in controller v5. Where did you spot those changes at, I can give it a look to see if anything has changed in auth since then.

My full config is as follows:

  omada:
    container_name: omada
    image: mbentley/omada-controller:5.3
    environment:
      - MANAGE_HTTP_PORT=8088
      - MANAGE_HTTPS_PORT=8043
      - PORTAL_HTTP_PORT=8088
      - PORTAL_HTTPS_PORT=8843
      - SHOW_SERVER_LOGS=true
      - SHOW_MONGODB_LOGS=false
      - TZ='America/Chicago'
    volumes:
      - /home/riley/appdata/omada/data:/opt/tplink/EAPController/data
      - /home/riley/appdata/omada/work:/opt/tplink/EAPController/work
      - /home/riley/appdata/omada/logs:/opt/tplink/EAPController/logs    
    network_mode: host
    restart: unless-stopped

  omada_exporter:
    image: ghcr.io/charlie-haley/omada_exporter:0.5.0
    container_name: "omada_exporter"
    ports:
      - 9202:9202
    environment:
      - OMADA_HOST=http://192.168.0.11:8088
      - OMADA_USER=docker
      - OMADA_PASS=supersecretrealpassword
      - OMADA_SITE=Default
      - OMADA_INSECURE=true

Let me know if there is anything else I can share to help. I know a bit of go and can try and lend a hand if needed as well. Thanks for an awesome project!

rssnyder commented 2 years ago

Literally figured it out 60s after posting. I wasn't using the management port but the portal port. Changed to https://192.168.0.11:8043 and it worked!