BIDMCDigitalPsychiatry / LAMP-platform

The LAMP Platform (issues and documentation).
https://docs.lamp.digital/
Other
12 stars 10 forks source link

Push notification analytics data missing in the sensor event couchdb database #678

Closed jeydude closed 1 year ago

jeydude commented 1 year ago

If we schedule any activities in the mindLAMP dashboard, during the actual schedule time study users are getting push notification messages in their phone for their scheduled activities, but I am not seeing the "lamp.analytics" entry with data type='notification" in the sensor_event database in the CouchDB. This analytics data missing for quite sometime, i just noticed it because one of the study user is not getting push notification, we are getting other analytics data (open_page/login/logout) in the sensor_event database.

Is there anything do we need to enable?

Here are the sensors data I am collecting for the study: image

Here is my schedule activity: image

Here is my stack yaml

version: '3.7'
services:
  server:
    image: ghcr.io/bidmcdigitalpsychiatry/lamp-server:latest
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:3000 || exit 1
    environment:
      HTTPS: 'off'
      SCHEDULER: 'on'
      ROOT_KEY: 'YOUR ROOT_KEY'
      CDB: 'http://admin:COUCHDBPASSWORD@database:5984/'
      APP_GATEWAY: 'app-gateway.lamp.digital'
      PUSH_API_KEY: 'PUSH_API_KEY'
      DASHBOARD_URL: 'dashboard.lamp.digital'
      REDIS_HOST: 'redis://cache:6379/0'
      NATS_SERVER: 'message_queue:4222'
      CACHE_SIZE: 200
      CACHE_FLUSH_ALL: 'true'
    networks:
      - default
      - public
    logging:
      options:
        max-size: "10m"
        max-file: "3"
    deploy:
      mode: replicated
      update_config:
        order: start-first
        failure_action: rollback
      labels:
         traefik.enable: 'true'
         traefik.http.routers.lamp_server.entryPoints: 'websecure'
         traefik.http.routers.lamp_server.rule: 'Host(`LAMPAPIHOSTURL`)'
         traefik.http.routers.lamp_server.tls.certresolver: 'default'
         traefik.http.services.lamp_server.loadbalancer.server.port: 3000
         traefik.docker.network: 'public'
      placement:
        constraints:
          - node.role == manager 
  database:
    image: mlpcouchdb
    healthcheck:
      test: curl --fail --silent http://localhost:5984/_up || exit 1
    environment:
      COUCHDB_USER: 'admin'
      COUCHDB_PASSWORD: 'COUCHDBPASSWORD'
    volumes:
      - /apps/mindLAMP/data/couchdb:/opt/couchdb/data
    networks:
      - public
    deploy:
      mode: replicated
      update_config:
        order: stop-first
        failure_action: rollback
      placement:
        constraints:
          - node.role == manager
    ports:
    - "4369:4369/tcp"
    - "5984:5984/tcp"
    - "9100:9100/tcp"
    labels:
      traefik.enable: 'true'
      traefik.http.routers.lamp_database.entryPoints: 'websecure'
      traefik.http.routers.lamp_database.rule: 'Host(`COUCHDBHOSTURL`)'
      traefik.http.routers.lamp_database.tls.certresolver: 'default'
      traefik.http.services.lamp_database.loadbalancer.server.port: 5984
  cache:
    image: redis:6.0.8-alpine
    healthcheck:
      test: redis-cli ping
    deploy:
      mode: replicated
      update_config:
        order: stop-first
        failure_action: rollback
      placement:
        constraints:
          - node.role == manager
  message_queue:
    image: nats:2.1.9-alpine3.12
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:8222/varz || exit 1
    deploy:
      mode: replicated
      update_config:
        order: start-first
        failure_action: rollback
      placement:
        constraints:
          - node.role == manager
  worker:
    image: ghcr.io/bidmcdigitalpsychiatry/lamp-worker:2022
    environment:
      DASHBOARD_URL: 'dashboard.lamp.digital'
      PORT: '3000'
      NATS_SERVER: 'message_queue:4222'
      APP_GATEWAY: 'app-gateway.lamp.digital'
      REDIS_HOST: 'redis://cache:6379/0'
      PUSH_API_KEY: 'PUSH_API_KEY'
      DOCKER_ADDR: '127.0.0.1:2375'
      LAMP_SERVER: 'LAMPAPIHOSTURL'
      LAMP_AUTH: 'admin:ADMISPASSWORD'
      TIMEZONE: 'America/New_York'
      SCHEDULER: 'on'
      NODE_TLS_REJECT_UNAUTHORIZED: 0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - default
      - public
networks:
  public:
    external: true
Linoy339 commented 1 year ago

@jeydude . Can we confirm that:

carlan1 commented 1 year ago

@jeydude Do you have updates regarding this issue?