endpoint-monitor

command module
v0.0.0-...-4a54890 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

README

Endpoint Monitor

Monitor any url via this GO application. Get notified through Slack or E-mail when response time is greater than expected, or does not respond as expected.

Complete Version using InfluxDb

alt text

You can save data to influx db and view response times over a period of time as above using graphana.

Guide to install influxdb and grafana

With Endpoint Monitor you can monitor all your REST APIs by adding api details to config file as below.A Notification will be triggered when you api is down or response time is more than expected.

{
    "url":"http://mywebsite.com/v1/data",
    "requestType":"POST",
    "headers":{
        "Authorization":"Bearer ac2168444f4de69c27d6384ea2ccf61a49669be5a2fb037ccc1f",
        "Content-Type":"application/json"
    },
    "formParams":{
        "description":"test",
        "url":"http://google.com"
    },
    "checkEvery":30,
    "responseCode":200,
    "responseTime":800
},

{
    "url":"http://mywebsite.com/v1/data",
    "requestType":"GET",
    "headers":{
        "Authorization":"Bearer ac2168444f4de69c27d6384ea2ccf61a49669be5a2fb037ccc1f",        
    },
    "urlParams":{
        "name":"endpoint-monitor"
    },
    "checkEvery":300,
    "responseCode":200,
    "responseTime":800
},

{
    "url":"http://something.com/v1/data",
    "requestType":"DELETE",
    "formParams":{
        "name":"endpoint-monitor"
    },
    "checkEvery":300,
    "responseCode":200,
    "responseTime":800
}

Guide to write config.json file

Sample config.json file

To run the app

$ ./endpoint-monitor --config config.json &

To run as background process add & at the end

$ ./endpoint-monitor --config config.json &

to stop the process

$ jobs
$ kill %jobnumber

Database

Save Requests response time information and error information to your database by adding database details to config file. Currently only Influxdb 0.9.3+ is supported.

Notifications

Notifications will be triggered when mean response time is below given response time for a request or when an error is occured . Currently the below clients are supported to receive notifications.For more information on setup click here

  1. Slack
  2. Smtp Email
  3. Http EndPoint

Adding support to other clients is simple.view details

Contribution

Contributions are welcomed and greatly appreciated. Create an issue if you find bugs. Send a pull request if you have written a new feature or fixed an issue. Please make sure to write test cases!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL