Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api_url is incorrect when CachetHQ send a email in button "manage subscriptions" #45

Open
nasatome opened this issue Apr 4, 2018 · 6 comments
Assignees
Labels

Comments

@nasatome
Copy link

nasatome commented Apr 4, 2018

with the following docker-compose (I'm behind a reverse proxy: traefik)

version: "3"

services:
  postgres:
    image: postgres:10-alpine
    volumes:
      - ./db_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=postgress
      - POSTGRES_PASSWORD=postgress
      - POSTGRES_DB=postgress
    networks:
      - cachethq_internal
    restart: always

  cachet:
    image: cachethq/docker:2.3-latest
    networks:
      - ak_cachethq_outside
      - ak_cachethq_internal
#    environment:
#...
    depends_on:
      - postgres
    restart: always
  cachet_url_monitor:
    image: mtakaki/cachet-url-monitor
    networks:
      - ak_cachethq_internal
    depends_on:
      - cachet
    volumes:
      - ${PWD}/.config.yml:/usr/src/app/config/config.yml:ro
    restart: always

networks:
  cachethq_outside:
    external:
      name: traefik_proxy
  cachethq_internal:
    driver: bridge

And the following configuration:

endpoint:
  url: https://myworpresspage.com
  method: GET
  timeout: 1 # seconds
  expectation:
    - type: HTTP_STATUS
      status_range: 200-300
    - type: LATENCY
      threshold: 1
    - type: REGEX
      regex: ".*WORDPRESS FOOTER HOOK.*"
  allowed_fails: 0
cachet:
  api_url: http://cachet:8000/api/v1
  token: xxxxxxxxxxxxxxxxxxx
  component_id: 1
  metric_id: 1
  action:
    - CREATE_INCIDENT
    - UPDATE_STATUS
  public_incidents: true
frequency: 30
latency_unit: ms

It works perfectly, but when cachetHQ sends an email, in the URL inside the email, redirects me to http://cachet:8000/subscribe/manage/xxxxxxx instead of https://status.myworpresspage.com/subscribe/manage/xxxxxxx in button "manage subscriptions"

I do not understand the API very well, but you could place an API URL and a LINK (A hyperlink to the component)???

@nasatome nasatome changed the title API URL fails when send a email api_url is incorrect when CachetHQ send a email in button "manage subscriptions" Apr 4, 2018
@mtakaki
Copy link
Owner

mtakaki commented Nov 8, 2019

Lemme try understand this better. The hostname cachet is only available from your private network, but your public hostname is status.mywordpresspage?

@mtakaki mtakaki self-assigned this Nov 8, 2019
@nasatome
Copy link
Author

nasatome commented Nov 11, 2019

That's right.: The hostname cachet is only available from my private network, but my public hostname is status.mywordpresspage.com

@mtakaki
Copy link
Owner

mtakaki commented Jan 19, 2020

@nasatome did you figure this out?

@nasatome
Copy link
Author

That's right, that's why I mentioned it.
is a minor bug
so if you like, you can close this issue

@mtakaki
Copy link
Owner

mtakaki commented Jan 20, 2020

Have you tried setting up the Site URL under /dashboard/settings/setup? Have you tried putting the public hostname there? If that doesn't, I recommend you reaching out to the folks that owns CachetHQ. We own only until we create the incident on cachet and anything after that is under CachetHQ's ownership.

Would mind giving an update after you try this out?

@thomvaill
Copy link

I had the same issue, because APP_URL / Site URL is not taken into account.
Here is an ugly hotfix: cachethq/cachet#3952

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants