Giter Site home page Giter Site logo

statuspage-exporter's Introduction

License

statuspage-exporter

Exports service status from Atlassian StatusPage (eg statuspage.io) for Prometheus consumption.

Project status

The project is in its early stages of development, so breaking changes may happen at any time.

!! WARNING !!

This program allows making requests to arbitrary URLs. Make sure you understand the implications of deploying this in your infrastructure!

This exporter being similar to blackbox_exporter, please read the exporters section of the official docs.

If running on AWS, you may want to make sure you're using IMDSv2 and limit the role's permissions and network access to the absolute minimum.

Configuration

This exporter is configured through environment variables only. The following are available (default value shown)

STATUSPAGE_EXPORTER_LISTEN='127.0.0.1:9925'

Running

Either build your own executable or using a Docker container:

docker run ghcr.io/vladvasiliu/statuspage-exporter:latest

It will listen on port 9925. It exposes two endpoints.

/probe endpoint

This endpoint scrapes information from the statuspage.io domain you want to query. Please see the warning above.

It exports the overall status, the component status, and their respective latest update timestamp.

Example for Payline:

curl http://127.0.0.1:9925/probe?target=https://payline.statuspage.io/api/v2/summary.json

# HELP statuspage_component Per component status of this service, from the components element
# TYPE statuspage_component gauge
statuspage_component{component="3D Secure",status="degraded_performance"} 0
statuspage_component{component="3D Secure",status="major_outage"} 0
statuspage_component{component="3D Secure",status="operational"} 1
statuspage_component{component="3D Secure",status="partial_outage"} 0
statuspage_component{component="Back Office",status="degraded_performance"} 0
statuspage_component{component="Back Office",status="major_outage"} 0
statuspage_component{component="Back Office",status="operational"} 1
statuspage_component{component="Back Office",status="partial_outage"} 0
statuspage_component{component="File Transfer and Reporting",status="degraded_performance"} 0
statuspage_component{component="File Transfer and Reporting",status="major_outage"} 0
statuspage_component{component="File Transfer and Reporting",status="operational"} 1
statuspage_component{component="File Transfer and Reporting",status="partial_outage"} 0
statuspage_component{component="Fraud Detection Engine",status="degraded_performance"} 0
statuspage_component{component="Fraud Detection Engine",status="major_outage"} 0
statuspage_component{component="Fraud Detection Engine",status="operational"} 1
statuspage_component{component="Fraud Detection Engine",status="partial_outage"} 0
statuspage_component{component="Hosted Payment Pages",status="degraded_performance"} 0
statuspage_component{component="Hosted Payment Pages",status="major_outage"} 0
statuspage_component{component="Hosted Payment Pages",status="operational"} 1
statuspage_component{component="Hosted Payment Pages",status="partial_outage"} 0
statuspage_component{component="Payment Method",status="degraded_performance"} 0
statuspage_component{component="Payment Method",status="major_outage"} 0
statuspage_component{component="Payment Method",status="operational"} 1
statuspage_component{component="Payment Method",status="partial_outage"} 0
statuspage_component{component="Sandbox",status="degraded_performance"} 0
statuspage_component{component="Sandbox",status="major_outage"} 0
statuspage_component{component="Sandbox",status="operational"} 1
statuspage_component{component="Sandbox",status="partial_outage"} 0
statuspage_component{component="Web Service API",status="degraded_performance"} 0
statuspage_component{component="Web Service API",status="major_outage"} 0
statuspage_component{component="Web Service API",status="operational"} 1
statuspage_component{component="Web Service API",status="partial_outage"} 0
# HELP statuspage_component_timestamp Last update timestamp of the componet
# TYPE statuspage_component_timestamp gauge
statuspage_component_timestamp{component="3D Secure"} 1647378043
statuspage_component_timestamp{component="Back Office"} 1648063597
statuspage_component_timestamp{component="File Transfer and Reporting"} 1646802515
statuspage_component_timestamp{component="Fraud Detection Engine"} 1646802515
statuspage_component_timestamp{component="Hosted Payment Pages"} 1647378043
statuspage_component_timestamp{component="Payment Method"} 1647441520
statuspage_component_timestamp{component="Sandbox"} 1645629720
statuspage_component_timestamp{component="Web Service API"} 1647378043
# HELP statuspage_overall Overall status of this service, from the status element
# TYPE statuspage_overall gauge
statuspage_overall{indicator="critical"} 0
statuspage_overall{indicator="major"} 0
statuspage_overall{indicator="minor"} 0
statuspage_overall{indicator="none"} 1
# HELP statuspage_probe_success Whether all queries were successful
# TYPE statuspage_probe_success gauge
statuspage_probe_success 1
# HELP statuspage_timestamp Timestamp of last update of the status element
# TYPE statuspage_timestamp gauge
statuspage_timestamp 1648422629

/metrics endpoint

This endpoint exports metrics about the application itself. Example:

# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.11
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 524288
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 9
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 13963264
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1649270761.41
# HELP process_threads Number of OS threads in the process.
# TYPE process_threads gauge
process_threads 1
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 23048192
# HELP statuspage_info statuspage exporter version information
# TYPE statuspage_info gauge
statuspage_info{version="0.2.1"} 1

Acknowledgements

This is inspired by blackbox-exporter for the multi-target exporter pattern.

License

This project is released under the terms of the GPL v3 License. Please refer to COPYING for its terms.

statuspage-exporter's People

Contributors

dependabot[bot] avatar economictouristsarmlate avatar vladvasiliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

statuspage-exporter's Issues

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.