GithubHelp home page GithubHelp logo

mbelloiseau / website-monitoring Goto Github PK

View Code? Open in Web Editor NEW
90.0 6.0 33.0 1.14 MB

Monitore your websites availability, http status code (current and history), certificate, redirects and more with Grafana and Prometheus blackbox exporter.

Shell 100.00%
prometheus availability grafana-dashboard monitoring website-monitoring grafana observability

website-monitoring's Introduction

website-monitoring

web-1

Monitore your websites availability, http status code (current and history), certificate, redirects and more with

Dependencies

Usage

  • git clone [email protected]:mbelloiseau/website-monitoring.git && cd website-monitoring
  • Edit config/prometheus/targets.yml (see targets.yml.example) or use ./gen_target.sh website-1.tld website-2.tld ...
  • Create and start containers docker-compose up -d
  • Visualize dashboards

If you already have Prometheus and Prometheus blackbox exporter up and running just import the dashboards (website-monitoring or overview) and use the right datasource and jobs (http_job and icmp_job)

Dashboards

Website monitoring

  • HTTP status code
  • HTTP redirects
  • HTTP version
  • TLS version
  • Certificate validity
  • ICMP
  • DNS lookup time
  • Availability over the last 24 hours, 3 days and 7 days
  • Probe duration and status code history

web-2 web-3

Overview

  • Total number of targets
  • Percentage of HTTP 200 status code
  • Percentage of targets using SSL
  • Global invalid status code history

overview

Tips and tricks

PromQL

Some useful PromQL queries

  • Number of days till certificate expiration
    • (probe_ssl_earliest_cert_expiry{instance=~"$target",job="$http_job"} - time()) / (60*60*24)
  • Display bad HTTP status code
    • probe_http_status_code{job="$http_job",instance=~"$target"} != 200
  • Count the number of each status code
    • count_values("code", probe_http_status_code)
  • Percentage of HTTP 200
    • ((count(count by (instance) (probe_http_status_code == 200))) / (count(count by (instance) (probe_http_status_code)))) * 100

Misc

  • Request blackbox exporter
    • curl -s "localhost:9115/probe?module=http_2xx&target=target.tld"

website-monitoring's People

Contributors

mbelloiseau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

website-monitoring's Issues

Looping through targets in playlist mode ?

First, thank you very much for your work on this dashboard!

My question may be trivial, but do you think it's possible to loop on the different targets when displaying the dashboard in playlist mode?

Like 10s on each target, then looping to overview, and again...

Name for targets possible ?

Hi, first thanks for your great work, it safed me a lot of time.

I just have the question if its possible to change the displaying of targets ( urls ) in "website-monitoring" dashboard dropdown list to a name instead of the blank url ?

In the "overview-dashboard" its possible to add overwrites and replace in this way urls with names in the table.
In the "website-monitoring" dashboard is a target variable used to select the targets. As far as i know its just the "instance" which is by design the target url.

Is there any way to modify the config that prometheus stores also a name to a target so its possible to select targets over name in the "website-monitoring" dashboard?

Thanks in advanced.

docker compose errors

after cloning and running the docker compose up, I get the following error -

T19:33:18+0000 lvl=eror msg="Failed to read plugin provisioning files from directory" logger=provisioning.plugins path=/etc/grafana/provisioning/plugins error="open /etc/grafana/provisioning/plugins: no such file or directory"
website-monitoring-grafana-1 | t=2023-02-13T19:33:18+0000 lvl=eror msg="Can't read alert notification provisioning files from directory" logger=provisioning.notifiers path=/etc/grafana/provisioning/notifiers error="open /etc/grafana/provisioning/notifiers: no such file or directory"
website-monitoring-grafana-1 | t=2023-02-13

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.