Giter Club home page Giter Club logo

statusok's Issues

Feature request: Possible integration with cachethq ?

Is possible to think about integration with statuspage software like cachethq, staytus, statuspage.io ,etc ...?
Of course Incidents can be handled with already available Webhooks, but for metrics, there should be a something like webhook backend to send received data to webhook, for example cachethq API metrics endpoind.
Thanks

Mailgun Notification service is breaking the install/build

When trying to install/build there was an error with the MailGun notification service. After reviewing, it looks like the Mailgun service no longer requires a public key to be passed (just domain and private key). I put through a pull request that adheres to the new requirements of the Mailgun v2 API: #40

302 is ignored

Hi,

I'm trying to monitor pages on a site which is configured to redirect a resource is unavailable. I found that when presented with a 302 (object moved) response, statusok happily follows the redirect. This means statusok will miss the event when a page goes down.

While I'm not trying to monitor my old blog, it can be used to repro:

  1. Set up monitoring for http://little.org/thisIsNotARealPage.htm as type "GET" with expected response code of 200
  2. Set up monitoring for http://little.org/thisIsNotARealPage.htm as type "GET" with expected response code of 302

Result: statusok reports success for the first item and failure for the second.
Expected: status okay should report failure for the first and success for the second.

Thanks for the cool tool!

no subject

Hi
emails have no any subject.
can i add any subject instead of empty subject?

How to ignore bad (self-signed) SSL certificate in requests

I tried to monitor a website with self-signed SSL certificate, but got error due to cert validation. Is there a way to skip cert validation?

by the way, I tried to set InsecureSkipVerify=true but that doesn't seem to work.

=========== error msg below =============

acheng@epcnszxw0150:~/Downloads/statusok_linux$ env InsecureSkipVerify=true ./statusok --config config.json
Reading File : config.json
No clients Registered for Notifications
Sending Test notifications to the registered clients
No Database selected.

Sending requests to apis.....making sure everything is right before we start monitoring
Api Count: 1
Request # 0 : GET https://ecsc001067.example.com:9002/

Failed !!!! Not able to perfome below request

----Request Deatails---
Url : https://ecsc001067.example.com:9002/
Type : GET
Error Reason : Get https://ecsc001067.example.com:9002/: x509: certificate is valid for hybris, not ecsc001067.example.com

Please check the config file and try again

Response Parameter Inception

Can we mention any response parameter with it's expected value, to check if API is working as expected on a logical basis?

x509: certificate signed by unknown authority Erro when running inside docker

I am using the dockerfile provided in the repository,
with the following configuration
"mail": { "smtpHost": "smtp.gmail.com", "port": 587, "username": "[email protected]", "password": "XXXXX", "from": "[email protected]", "to": "[email protected]" }

when I run docker image I have this output

Reading File : /config/config.json
Initializing Notification Clients....
Notifications : Smtp Mail Intialized
Sending Test notifications to the registered clients
Failed to Send Response Time notification to Smtp Mail Please check the details entered in the config file
Error Details : x509: certificate signed by unknown authority

I tried to install ca-certicates and update the certifcates but I still have the same error

FROM golang:1.6.3

ENV STATUSOK_VERSION 0.1.1

RUN apt-get update \
    && apt-get install -y unzip  ca-certificates  \
    && wget https://github.com/sanathp/statusok/releases/download/$STATUSOK_VERSION/statusok_linux.zip \
    && unzip statusok_linux.zip \
    && mv ./statusok_linux/statusok /go/bin/StatusOk \
    && rm -rf ./statusok_linux* \
    && apt-get remove -y unzip git \
    && apt-get autoremove -y \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV TZ=Europe/Berlin


RUN  update-ca-certificates -f ;

VOLUME /config
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["sh", "/docker-entrypoint.sh"]

Cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal

We try to build source, I got this error:

$ go build
# ~/statusok
./statusok.go:40:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
	cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
./statusok.go:45:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
	cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
./statusok.go:52:13: cannot use func literal (type func(*cli.Context)) as type cli.ActionFunc in assignment

ARM Version

Ist there a way, to get this run on an raspberry pi?

Use environment variables

This program should support the use of variables in the config.json file.

Something like ${password} or {{password}} should be replaced with environment variables from the system that the daemon is running on.

Trigger different Notifications

I want to monitor a website and trigger a pager-duty 'non critical' when xxx response time is met, then when a higher response time is meet i want to trigger a critical pager duty notification.

I have issue with influxdb

It seems like influxdb+Grafana integration does not work. db connection is working.

config.json

{
"database":{
        "influxDb":{
            "host":"localhost",
            "port":8086,
            "databaseName":"statusok",
            "username":"",
            "password":""
        }
},
    "requests":[
        {
            "url":"https://camva.ir",
            "requestType":"GET",
            "checkEvery":30,
            "responseTime":800
        }
    ]
}

I checked the db. data is being logged.

Sends emails with incorrect headers

Email notifications are sent with incorrect headers causing them to be blocked by most major email services (Google etc)

Can be fixed by adding a valid from and subject to email message

example:

550-5.7.1 [216.92.131.252      11] Our system has detected that this
message is 550-5.7.1 not RFC 5322 compliant: 550-5.7.1 'From' header is
missing. 550-5.7.1 To reduce the amount of spam sent to Gmail, this message
has been 550-5.7.1 blocked. Please visit 550-5.7.1
https://support.google.com/mail/?p=RfcMessageNonCompliant 550 5.7.1 and
review RFC 5322 specifications for more information. h20si4460693qvw.81 -
gsmtp (in reply to end of DATA command)

i/o timeout

Hello,

when i set the statusOk program running, i get a lot off the following errors:
dial tcp <hostip>: i/o timeout & net/http: TLS handshake timeout

i have looked around and most of the results are about DNS and / or Networking but both seem to be fine..
do you have a tip for where to look to solve this error?

Refrain from logging to console

...makes for an awfully noisy process while still connected and working on a machine. It'd be great if there were a way to prevent any output from the script.

server not website check

I see that you can POST, GET, and DELETE, requests. Is it possible to do ICMP pings, TCP pings, UDP pings for monitoring server response times, or a test to a connect to a port like port 22 that is running on each server?

fail to notify ding

my config.json

    {
        "notifications":{
            "dingding":{
                "url": "https://oapi.dingtalk.com/robot/send?access_token=blablablablablalba",
                "requestType":"POST",
                "headers":{
                    "Content-Type":"application/json"
                }
            }
        },
        "requests":[
            {
                "url":"http://www.example.com",
                "requestType":"GET",
                "checkEvery":30,	
                "responseTime":800
            }
        ]
    }

Base on statusOK it did show success and error.. however no notification? Do I missing something?

looks cool, similar to blackbox exporter

This looks cool, similar, maybe even simplified version of https://github.com/prometheus/blackbox_exporter

I was wondering if there's room to share ideas between projects?

With BBE, you need Prometheus and AlertManager to actually get notifications. On one side, that's a fairly standard stack and the decoupling means extra flexibility. The downside is it lacks the extreme simplicity and "all in one" feel of this package.

Can you make a feature comparison?

config.json requests not taken

Using docker based setup and this is how I have in my Macbook pro 2019 and all three docker services working ok.

config.json

{
	"notifications": {
		"slack":{
			"channel":"#general",
			"username":"my-slack-user-name",
			"channelWebhookURL":"https://hooks.slack.com/services/1235435/4543543/5435435"
		}
	},
	"requests": [
		{
			"url": "https://serviceofmine.me",
			"requestType": "GET",
			"headers": {
				"Authorization": "Bearer ac2168444f4de69c27d6384ea2ccf61a49669be5a2fb037ccc1f"
			},
			"urlParams": {
				"name": "statusok"
			},
			"checkEvery": 1,
			"responseCode": 300,
			"responseTime": 500
		}
	]
}

docker-compose.yml

version: '2'
services:
  statusok:
#    build: sanathp/statusok
    build: ..
    volumes:
      - .:/config
    depends_on:
      - influxdb
  influxdb:
    image: tutum/influxdb:0.9
    environment:
      - PRE_CREATE_DB="statusok"
    ports:
      - 8083:8083
      - 8086:8086
  grafana:
    image: grafana/grafana
    ports:
      - 3000:3000

Since not able to pull sanathp/statusok image I used available dockerfile.

This does posts message to slack channel but its always sending only test notification and not the actual service error notice.

I am missing some step, can you please point me in right direction

Graphana Dashboard query

Hi,

I have installed statusok correctly,

But I am having hard time visualizing it in Graphana, can anyone share a template/graphana queries?
I just want to visualize my Get requests response time v/s date-time.
Just as shown in statusok's readme files sreenshot.

Thanks.

PagerDuty Guide

Hi, I see PagerDuty has been integrated in the code. But don't see any guide on how to use it. Please give a short guide

Allow entering multiple recipients for one form of notifications

Hi there, I would like to either configure multiple addresses like this:

"notifications":{
	"mail":{
		"smtpHost":"smtp.gmail.com",
		"port":587,
		"username":"[email protected]",
		"password":"your gmail password",
		"from":"[email protected]",
		"to":"[email protected]"
	},
	"mail":{
		"smtpHost":"smtp.gmail.com",
		"port":587,
		"username":"[email protected]",
		"password":"your gmail password",
		"from":"[email protected]",
		"to":"[email protected]"
	}
},

Or be able to use an array in the to field.

Also, while I'm bothering you with feature requests: a bcc would not hurt ;-)

influxdb ssl

It would be great if this could connect to influxdb via ssl and have the insecure_skip_verify options.

Geo-distributed monitoring

Is there a way to monitor a website from multiple locations so to compare response times for each client side-by-side?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.