All Projects → vigo → statoo

vigo / statoo

Licence: MIT license
`statoo` is a super simple http GET tool for checking site health

Programming Languages

go
31211 projects - #10 most used programming language
ruby
36898 projects - #4 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to statoo

Kardia
A humane service status API module to expose any operational/internals of any Node.js based microservice. JSON format over HTTP protocol.
Stars: ✭ 70 (+150%)
Mutual labels:  status, health-check
matador
Take your appclication by the horns
Stars: ✭ 59 (+110.71%)
Mutual labels:  http-client
http
ponylang HTTP client library 🐴 🕸️
Stars: ✭ 38 (+35.71%)
Mutual labels:  http-client
sugar
Declarative HTTP client for Golang
Stars: ✭ 25 (-10.71%)
Mutual labels:  http-client
openvpn-status-web
Small Rack (Ruby) application serving OpenVPN status file
Stars: ✭ 14 (-50%)
Mutual labels:  status
down
☑️ A CLI tool to check if a site or a list of sites are down or up
Stars: ✭ 54 (+92.86%)
Mutual labels:  status
typesense-dart
Dart client for Typesense
Stars: ✭ 50 (+78.57%)
Mutual labels:  http-client
req
Req is a batteries-included HTTP client for Elixir.
Stars: ✭ 453 (+1517.86%)
Mutual labels:  http-client
health-check
Health Check is an application that provides an API to check the health health_check of some parts and some utilities like ping requests. This application can works as standalone or included in a Django project.
Stars: ✭ 31 (+10.71%)
Mutual labels:  status
simplehttp
HTTP client for Elixir without dependencies
Stars: ✭ 16 (-42.86%)
Mutual labels:  http-client
hackernews
📰 HackerNews API
Stars: ✭ 40 (+42.86%)
Mutual labels:  http-client
lgsl
LGSL v6.2.0 for PHP 5.4-8.2.0dev (Live Game Server List): online status for Discord, FiveM, Rust, CS, SA:MP, GMOD, Minecraft, Source Query, etc.
Stars: ✭ 101 (+260.71%)
Mutual labels:  status
microservice-graph-explorer
Navigate and explore all of the microservices in your application in real time using the real application connections.
Stars: ✭ 71 (+153.57%)
Mutual labels:  health-check
check netapp ontap
🍀 Check NetApp Ontap 🍀
Stars: ✭ 38 (+35.71%)
Mutual labels:  health-check
android-http-client
Simple and lightweight HTTP client for Android
Stars: ✭ 13 (-53.57%)
Mutual labels:  http-client
Rump
REST client for Java that allows for easy configuration and default values. Allows for quick request construction and a huge range of modifications by using response/request interceptors, adjusting default values related to HTTP requests and creating custom instances for when you need multiple API connection setups.
Stars: ✭ 55 (+96.43%)
Mutual labels:  http-client
Samples
Sample applications using App.Metrics
Stars: ✭ 19 (-32.14%)
Mutual labels:  health-check
go-sse
Fully featured, spec-compliant HTML5 server-sent events library
Stars: ✭ 165 (+489.29%)
Mutual labels:  http-client
fennch
Modern fetch-based axios-like HTTP client for the browser and node.js
Stars: ✭ 12 (-57.14%)
Mutual labels:  http-client
hedgedhttp
Hedged HTTP client which helps to reduce tail latency at scale.
Stars: ✭ 103 (+267.86%)
Mutual labels:  http-client

Version Go Documentation Go Report Card Build Status Go Build Status GolangCI-Lint Status Docker Lint Status codecov Docker Pulls Docker Size Docker Build Status

Statoo

A super basic http tool that makes only GET request to given URL and returns status code of the response. Well, if you are curl or http (httpie) user, you can make the same kind of request and get a kind-of same response since statoo is way better simple :)

statoo injects Accept-Encoding: gzip request header to every http request!

Installation

You can install from the source;

go install github.com/vigo/statoo@latest

or, you can install from brew:

brew tap vigo/statoo
brew install statoo

Usage:

statoo -h
usage: ./statoo [-flags] URL

  flags:

  -version           display version information (%s)
  -verbose           verbose output (default: false)
  -request-header    request header, multiple allowed, "Key: Value", case sensitive
  -response-header   response header for lookup -json is set, multiple allowed, "Key: Value"
  -t, -timeout       default timeout in seconds (default: %d, min: %d, max: %d)
  -h, -help          display help
  -j, -json          provides json output
  -f, -find          find text in response body if -json is set, case sensitive
  -a, -auth          basic auth "username:password"
  -s, -skip          skip certificate check and hostname in that certificate (default: false)
  -commithash        displays current build/commit hash (%s)

  examples:
  
  $ ./statoo "https://ugur.ozyilmazel.com"
  $ ./statoo -timeout 30 "https://ugur.ozyilmazel.com"
  $ ./statoo -verbose "https://ugur.ozyilmazel.com"
  $ ./statoo -json https://vigo.io
  $ ./statoo -json -find "python" https://vigo.io
  $ ./statoo -json -find "Python" https://vigo.io
  $ ./statoo -json -find "Golang" https://vigo.io
  $ ./statoo -request-header "Authorization: Bearer TOKEN" https://vigo.io
  $ ./statoo -request-header "Authorization: Bearer TOKEN" -header "X-Api-Key: APIKEY" https://vigo.io
  $ ./statoo -auth "user:secret" https://vigo.io
  $ ./statoo -json -response-header "Server: GitHub.com" https://vigo.io
  $ ./statoo -json -response-header "Server: GitHub.com" -response-header "Foo: bar" https://vigo.io

Let’s try:

statoo "https://ugur.ozyilmazel.com"
# 200
statoo -verbose "https://ugur.ozyilmazel.com"
# https://ugur.ozyilmazel.com -> 200

or;

statoo -json https://vigo.io

response;

{
    "url": "https://vigo.io",
    "status": 200,
    "checked_at": "2021-05-13T18:09:26.342012Z",
    "elapsed": 210.587871,
    "skipcc": false
}

elapsed represents response is in milliseconds.

Let’s find text inside of the response body. This feature is only available if the -json flag is set! length represents response size in bytes (gzipped) when you search something in body!

statoo -json -find "Golang" https://vigo.io
{
    "url": "https://vigo.io",
    "status": 200,
    "checked_at": "2022-01-26T20:08:33.735768Z",
    "elapsed": 242.93925,
    "length": 7827,
    "find": "Golang",
    "found": true,
    "skipcc": false
}
statoo -json -find "golang" https://vigo.io # case sensitive
{
    "url": "https://vigo.io",
    "status": 200,
    "checked_at": "2022-01-26T20:14:03.487002Z",
    "elapsed": 253.665083,
    "length": 7827,
    "find": "golang",
    "found": false,
    "skipcc": false
}

You can add basic authentication via -auth flag

statoo -auth "username:password" https://your.basic.auth.url

Now you can pass multiple -request-header flags:

statoo -request-header "Key1: Value1" -request-header "Key2: Value2" "https://ugur.ozyilmazel.com"

You can query/search for response headers. You can pass multiple values, all case sensitive!. Let’s lookup for Server and Foo response header values. Server value should be GitHub.com and Foo value should be bar:

statoo -json -response-header "Server: GitHub.com" -response-header "Foo: bar" https://vigo.io

Response:

{
    "url": "https://vigo.io",
    "status": 200,
    "checked_at": "2022-07-09T17:51:14.792987Z",
    "elapsed": 305.502833,
    "skipcc": false,
    "response_headers": {
        "Foo=bar": false,
        "Server=GitHub.com": true
    }
}

Server response header matches exactly!

It’s better to pipe -json output to jq or python -m json.tool for pretty print :)

That’s it!

Bash completions is available via;

eval "$(statoo bash-completion)"

New

You can check current build/commit hash via;

statoo -commithash

Rake Tasks

$ rake -T

rake default               # show avaliable tasks (default task)
rake docker:lint           # lint Dockerfile
rake release[revision]     # release new version major,minor,patch, default: patch
rake test:run[verbose]     # run tests, generate coverage
rake test:show_coverage    # show coverage after running tests
rake test:update_coverage  # update coverage value in README

Docker

https://hub.docker.com/r/vigo/statoo/

# latest
docker run vigo/statoo -h
docker run vigo/statoo -json -find "Meetup organization" https://vigo.io

Contributor(s)


Contribute

All PR’s are welcome!

  1. fork (https://github.com/vigo/statoo/fork)
  2. Create your branch (git checkout -b my-feature)
  3. commit yours (git commit -am 'add some functionality')
  4. push your branch (git push origin my-feature)
  5. Than create a new Pull Request!

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.


License

This project is licensed under MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].