cachet-monitor icon indicating copy to clipboard operation
cachet-monitor copied to clipboard

Does not update component

Open eladbitton opened this issue 8 years ago • 5 comments

I am trying to use this project on ubuntu. My config file: { "api_url": "https://status.**.com/api/v1", "api_token": "**", "insecure_api": false, "monitors": [ { "name": "Main website", "url": "https://**.com", "component_id": 1, "interval": 10, "timeout": 30, "expected_status_code": 200, "strict_tls": false } ], "system_name": "** system-status" } Output example:

`System: ** system-status
API: https://status.**.com/api/v1
Monitors: 1
 Starting Main website: 10 seconds check interval
 - GET https://**.com
 - Expect HTTP 200
 - Update component id 1
Main website 0.00%/100.00% down at 1483290709
Main website 0.00%/100.00% down at 1483290719
Main website 0.00%/100.00% down at 1483290729
Main website 0.00%/100.00% down at 1483290739
Main website 0.00%/100.00% down at 1483290749
Main website 0.00%/100.00% down at 1483290759
Main website 0.00%/100.00% down at 1483290769
Main website 0.00%/100.00% down at 1483290779
Main website 0.00%/100.00% down at 1483290789
Main website is now saturated
Main website 0.00%/100.00% down at 1483290799`

Tried to change certificate parameters. Checked the api key.

The GET is getting to the server, the only problem its that it doesn't update the component.

Should it update the component that way?

eladbitton avatar Jan 01 '17 17:01 eladbitton

@eladbitton can you check with the latest release?

Thanks

matejkramny avatar Feb 13 '17 04:02 matejkramny

Same for me, doesn't update component with current version.

spiritix avatar May 08 '17 11:05 spiritix

Hello, What version are you using operating system using?? as I can't seem to recreate your issue.

lsinclair avatar Aug 18 '17 17:08 lsinclair

This issue is very old, cant help you with that. I ended up implementing a monitor myself.

eladbitton avatar Aug 18 '17 17:08 eladbitton

I'm also experiencing this issue, I am using the latest current version of Cachet-monitor v3.0
(dab2264)

I am using the latest cachet docker hub image https://hub.docker.com/r/cachethq/docker/

It is able to ping the cachet server and get responses from my endpoints, however the component statuses do not change and no incidents are created.

docker run -e CACHET_DEV=True -v $PWD/config.yml:/config.yml cachet-monitor

time="2018-05-08T07:04:11Z" level=debug msg="Configuration valid"
time="2018-05-08T07:04:11Z" level=info msg="System: 18f0984e7cbd"
time="2018-05-08T07:04:11Z" level=info msg="API: http://status.xxx.xxx.xxx:8000/api/v1"
time="2018-05-08T07:04:11Z" level=info msg="Monitors: 2\n"
time="2018-05-08T07:04:11Z" level=info msg="Pinging cachet"
time="2018-05-08T07:04:11Z" level=info msg="Ping OK"
time="2018-05-08T07:04:11Z" level=info msg="Starting Monitor #0: "
time="2018-05-08T07:04:11Z" level=info msg="Features: \n - Type: http\n - Name: Customer xxx dev-01 br\n - Method: GET"
time="2018-05-08T07:04:11Z" level=info msg="Starting Monitor #1: "
time="2018-05-08T07:04:11Z" level=info msg="Features: \n - Type: http\n - Name: Test\n - Method: GET"
time="2018-05-08T07:04:16Z" level=info msg="monitor down 100.00%/100.00%" monitor=Test time="08/05/2018 07:04:16 UTC"
time="2018-05-08T07:04:16Z" level=info msg="monitor is up" monitor="Customer xxx dev-01 br" time="08/05/2018 07:04:16 UTC"

this is what my config looks like

api:
  url: http://status.xxxxxx:8000/api/v1
  token: xxxxxx
  insecure: true

date_format: 02/01/2006 15:04:05 MST
monitors:
  - name: Customer xxxxxx dev-01 br
    target: https://xxxxxx/xxxx/healthcheck
    strict: false
    method: GET
    component_id: 25
    template:
      investigating:
        subject: "{{ .Monitor.Name }} - {{ .SystemName }}"
        message: "{{ .Monitor.Name }} check **failed** (server time: {{ .now }})\n\n{{ .FailReason }}"
      fixed:
        subject: "I HAVE BEEN FIXED"
    interval: 5
    timeout: 3
    threshold: 0
    expected_status_code: 200
    expected_body: "HEALTHCHECK_OK"
  - name: Test
    target: http://thisdoesntwork.com
    strict: false
    method: GET
    component_id: 29
    template:
      investigating:
        subject: "{{ .Monitor.Name }} - {{ .SystemName }}"
        message: "{{ .Monitor.Name }} check **failed** (server time: {{ .now }})\n\n{{ .FailReason }}"
      fixed:
        subject: "I HAVE BEEN FIXED"
    interval: 5
    timeout: 3
    threshold: 0
    expected_status_code: 200
    expected_body: "HEALTHCHECK_OK"

I've also tried with threshold 100, I basically want it to alert as soon as it is down.

ghost avatar May 08 '18 07:05 ghost