CastawayLabs / cachet-monitor

Distributed monitoring plugin for CachetHQ
https://castawaylabs.github.io/cachet-monitor/
MIT License
439 stars 127 forks source link

Could not log metric #117

Open jvanst opened 4 years ago

jvanst commented 4 years ago

Hi all,

I am having issues logging a metric, and I have exhausted all my resources. Could someone please point me in the right direction?

Here is the cachet-monitor log file:

time="2019-09-17T23:47:00-04:00" level=info msg="Pinging cachet"
time="2019-09-17T23:47:00-04:00" level=info msg="Ping OK"
time="2019-09-17T23:47:00-04:00" level=info msg="Starting Monitor #0: "
time="2019-09-17T23:47:00-04:00" level=info msg="Features: \n - Type: http\n - Name: authentication\n - Method: GET"
time="2019-09-17T23:48:01-04:00" level=info msg="monitor is up" monitor=authentication time="Tuesday, 17-Sep-19 23:48:01 UTC"
time="2019-09-17T23:48:01-04:00" level=warning msg="Could not log metric! ID: 2, err: <nil>"
time="2019-09-17T23:49:01-04:00" level=info msg="monitor is up" monitor=authentication time="Tuesday, 17-Sep-19 23:49:01 UTC"
time="2019-09-17T23:49:01-04:00" level=warning msg="Could not log metric! ID: 2, err: <nil>"
time="2019-09-17T23:50:01-04:00" level=info msg="monitor is up" monitor=authentication time="Tuesday, 17-Sep-19 23:50:01 UTC"
time="2019-09-17T23:50:01-04:00" level=warning msg="Could not log metric! ID: 2, err: <nil>"
time="2019-09-17T23:51:01-04:00" level=info msg="monitor is up" monitor=authentication time="Tuesday, 17-Sep-19 23:51:01 UTC"
time="2019-09-17T23:51:01-04:00" level=warning msg="Could not log metric! ID: 2, err: <nil>"
time="2019-09-17T23:52:01-04:00" level=info msg="monitor is up" monitor=authentication time="Tuesday, 17-Sep-19 23:52:01 UTC"
time="2019-09-17T23:52:01-04:00" level=warning msg="Could not log metric! ID: 2, err: <nil>"
time="2019-09-17T23:53:01-04:00" level=info msg="monitor is up" monitor=authentication time="Tuesday, 17-Sep-19 23:53:01 UTC"
time="2019-09-17T23:53:01-04:00" level=warning msg="Could not log metric! ID: 2, err: <nil>"
time="2019-09-17T23:54:01-04:00" level=info msg="monitor is up" monitor=authentication time="Tuesday, 17-Sep-19 23:54:01 UTC"
time="2019-09-17T23:54:01-04:00" level=warning msg="Could not log metric! ID: 2, err: <nil>"
time="2019-09-17T23:55:01-04:00" level=info msg="monitor is up" monitor=authentication time="Tuesday, 17-Sep-19 23:55:01 UTC"
time="2019-09-17T23:55:01-04:00" level=warning msg="Could not log metric! ID: 2, err: <nil>"
time="2019-09-17T23:56:01-04:00" level=info msg="monitor is up" monitor=authentication time="Tuesday, 17-Sep-19 23:56:01 UTC"
time="2019-09-17T23:56:01-04:00" level=warning msg="Could not log metric! ID: 2, err: <nil>"
time="2019-09-17T23:57:01-04:00" level=warning msg="authentication is now saturated"
time="2019-09-17T23:57:01-04:00" level=info msg="monitor is up" monitor=authentication time="Tuesday, 17-Sep-19 23:57:01 UTC"
time="2019-09-17T23:57:01-04:00" level=warning msg="Could not log metric! ID: 2, err: <nil>"

Here is my cachet-monitor config:

api:
  url: "https://myapi.com/api/v1"
  token: apikey
  insecure: false
date_format: "Monday, 02-Jan-06 15:04:05 UTC"
monitors:
  - name: authentication
    target: https://google.com
    strict: true
    method: GET
    metric_id: 2
    interval: 60
    timeout: 10
    threshold: 80
    expected_status_code: 200

With a curl request to https://myapi.com/api/v1/metrics/ I can see my current metrics:

{ 
   "meta":{ 
      "pagination":{ 
         "total":1,
         "count":1,
         "per_page":20,
         "current_page":1,
         "total_pages":1,
         "links":{ 
            "next_page":null,
            "previous_page":null
         }
      }
   },
   "data":[ 
      { 
         "id":2,
         "name":"Latency",
         "suffix":"LAG",
         "description":"",
         "default_value":0,
         "calc_type":1,
         "display_chart":true,
         "places":1,
         "default_view":1,
         "threshold":5,
         "order":0,
         "visible":1,
         "created_at":"2019-09-18 03:41:40",
         "updated_at":"2019-09-18 03:51:35",
         "default_view_name":"Last 12 Hours"
      }
   ]
}
IonVillarreal commented 4 years ago

How did you go ? could you fix it?