sanathp / statusok Goto Github PK
View Code? Open in Web Editor NEWMonitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.
License: Other
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.
License: Other
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)
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 ;-)
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?
It would be great if this could connect to influxdb via ssl and have the insecure_skip_verify options.
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.
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?
...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.
As per subject. My config only has slack in it, yet it tries to initialise dingding and has an error.
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.comPlease check the config file and try again
Hi,
i've change text notification on notify.go, but now how can i made statusok executable?
Thanks
Is there a way to monitor a website from multiple locations so to compare response times for each client side-by-side?
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.
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
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:
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!
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
When using the "mail" notification,
it sends a "test" email every new run.
can it be disabled?
subj to implement
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?
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"]
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
Ist there a way, to get this run on an raspberry pi?
Hi Guys,
really need to get this working, however it does not connect with slack or smtp, it always times out, here is the error i get with slack :
Post https://hooks.slack.com/services/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: dial tcp 54.192.157.142:443: i/o timeout
im not sure where this address: 54.192.157.142:443 is coming from..
Appreciate your help, thanks.
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.
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
Can we mention any response parameter with it's expected value, to check if API is working as expected on a logical basis?
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.
https://github.com/sanathp/statusok/releases/download/0.1/statusok
You don't have a releases branch...
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
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?
Hi
emails have no any subject.
can i add any subject instead of empty subject?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.