Coder Social home page Coder Social logo

Comments (9)

BigBoot avatar BigBoot commented on June 3, 2024 2

Hmm, looks like I harcoded the kuma label name to AutoKuma when resolving groups and forgot to read it from the config.

from autokuma.

BigBoot avatar BigBoot commented on June 3, 2024 1

The parent_name is referring to the autokuma id of the group, not the display name, so this should work:

      - kuma.${AUTOKUMA_GROUP_ID_MONITORING}.group.name=${AUTOKUMA_GROUP_NAME_MONITORING}
      - kuma.{{container_name}}-http.http.parent_name=${AUTOKUMA_GROUP_ID_MONITORING}
      - kuma.{{container_name}}-http.http.name=Portainer HTTP
      - kuma.{{container_name}}-http.http.url=http://port.$DOMAINNAME
      - kuma.{{container_name}}.docker.parent_name=${AUTOKUMA_GROUP_ID_MONITORING}
      - kuma.{{container_name}}.docker.name=Portainer
      - kuma.{{container_name}}.docker.docker_container={{container_name}}
      - kuma.{{container_name}}.docker.docker_host=1

from autokuma.

BigBoot avatar BigBoot commented on June 3, 2024 1

It's mentioned in the usage section of the readme and is handled purely by autokuma, I added this as a way to reference other monitors as there would be no way to get the actual id from uptime kuma before creating the parent, the MONITOR_TYPES.md is generated from uptime kuma source and therefore doesn't include it.

from autokuma.

radokristof avatar radokristof commented on June 3, 2024

The trick with removing parent_name now has different behavior. If I remove it, the monitor will be created (outside of the group of course) but adding it back will just cause another error:

INFO [autokuma::sync] Updating monitor: bitwarden
WARN [autokuma::sync] Encountered error during sync: No group named vault could be found

from autokuma.

radokristof avatar radokristof commented on June 3, 2024

I just changed it because multiple instances (servers) connect to the same uptime-kuma server. If I don't change it, it will interfere with each other.

from autokuma.

BigBoot avatar BigBoot commented on June 3, 2024

Should work now on latest master

from autokuma.

undaunt avatar undaunt commented on June 3, 2024

@BigBoot I'm still seeing this behavior on latest master. Could it be a combination of other factors?

  autokuma:
    image: ghcr.io/bigboot/autokuma:latest
    container_name: autokuma
    restart: unless-stopped
    profiles: ["all","kuma","morty"]
    networks:
      - $PROXY_NETWORK
      - $SOCKET_NETWORK
    depends_on:
      - uptime-kuma
    environment:
      - AUTOKUMA__KUMA__URL=http://uptime-kuma:3001
      - AUTOKUMA__KUMA__USERNAME=${KUMA_USER}
      - AUTOKUMA__KUMA__PASSWORD=${KUMA_PASSWORD}
      - AUTOKUMA__TAG_NAME=autokuma
      - DOCKER_HOST=http://socket-proxy:2375
    labels:
      - kuma.kuma.group.name=Kuma
      - kuma.{{container_name}}.docker.parent_name=kuma
      - kuma.{{container_name}}.docker.name=Autokuma
      - kuma.{{container_name}}.docker.docker_container={{container_name}}
      - kuma.{{container_name}}.docker.docker_host=1

Edit: I tried both parent_name as well as parent, with both Kuma and kuma.

Edit 2: Below is my new go to format (for now) and I'm leaving the parent lines commented out otherwise I get an error.

      #- kuma.${AUTOKUMA_GROUP_ID_MONITORING}.group.name=${AUTOKUMA_GROUP_NAME_MONITORING}
      #- kuma.{{container_name}}-http.http.parent_name=${AUTOKUMA_GROUP_NAME_MONITORING}
      - kuma.{{container_name}}-http.http.name=Portainer HTTP
      - kuma.{{container_name}}-http.http.url=http://port.$DOMAINNAME
      #- kuma.{{container_name}}.docker.parent_name=${AUTOKUMA_GROUP_NAME_MONITORING}
      - kuma.{{container_name}}.docker.name=Portainer
      - kuma.{{container_name}}.docker.docker_container={{container_name}}
      - kuma.{{container_name}}.docker.docker_host=1

from autokuma.

undaunt avatar undaunt commented on June 3, 2024

Following up on my prior, I noted that the groups do appear to work when they are lowercase.

This works

      - kuma.{{container_name}}.group.name=portainer
      #- kuma.{{container_name}}-http.http.parent_name=Portainer
      - kuma.{{container_name}}-http.http.name=Portainer Web
      - kuma.{{container_name}}-http.http.url=https://port.$DOMAINNAME
      - kuma.{{container_name}}-docker.docker.parent_name=portainer
      - kuma.{{container_name}}-docker.docker.name=Portainer Docker
      - kuma.{{container_name}}-docker.docker.docker_container={{container_name}}
      - kuma.{{container_name}}-docker.docker.docker_host=1

This fails

      - kuma.{{container_name}}.group.name=Portainer
      #- kuma.{{container_name}}-http.http.parent_name=Portainer
      - kuma.{{container_name}}-http.http.name=Portainer Web
      - kuma.{{container_name}}-http.http.url=https://port.$DOMAINNAME
      - kuma.{{container_name}}-docker.docker.parent_name=Portainer
      - kuma.{{container_name}}-docker.docker.name=Portainer Docker
      - kuma.{{container_name}}-docker.docker.docker_container={{container_name}}
      - kuma.{{container_name}}-docker.docker.docker_host=1

This also works, creating a capitalized group and assigning the members to the group, but I'm not sure why it works.

      - kuma.{{container_name}}.group.name=Portainer
      - kuma.{{container_name}}-http.http.parent_name=portainer
      - kuma.{{container_name}}-http.http.name=Portainer Web
      - kuma.{{container_name}}-http.http.url=https://port.$DOMAINNAME
      - kuma.{{container_name}}-docker.docker.parent_name=portainer
      - kuma.{{container_name}}-docker.docker.name=Portainer Docker
      - kuma.{{container_name}}-docker.docker.docker_container={{container_name}}
      - kuma.{{container_name}}-docker.docker.docker_host=1

from autokuma.

undaunt avatar undaunt commented on June 3, 2024

Awesome, that makes sense, super helpful. Is parent_name documented? I thought I saw parent in the attributes available.

from autokuma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.