Giter Club home page Giter Club logo

prometheus-formatter's Introduction

Prometheus Formatter

Browser extension which makes plain Prometheus/OpenMetrics output easier to read.

This extension is a simple syntax highlighter for Prometheus and OpenMetrics formats. For the highlighting to work, metric endpoints must use either HTTP Content-Type application/openmetrics-text or text/plain. For plain-text metrics, parsing is limited by default on URL paths matching '/metrics', '/federate', '/probe', '/prometheus' and '/actuator/prometheus'. By clicking on the extension's icon, you can define your own paths (Regular Expressions are supported), which will override the default list.

Before:

After:

For highlighting in the terminal: promcolor.

Installation

Option 1 – install it from the web store:

Option 2 – install it from source:

  • Clone or download this repo
  • Google Chrome or Microsoft Edge:
    • Go to chrome://extensions/ respectively edge://extensions/,
    • enable "Developer mode",
    • click "Load unpacked extension",
    • select the extension folder in this repo.
  • Firefox:
    • Go to about:addons
    • From the Cog-Menu on the right choose "Install Add-On From File …"

License

MIT

prometheus-formatter's People

Contributors

bemyak avatar dependabot[bot] avatar fhemberger avatar macropower avatar matsumana avatar melkorm avatar zhangsean 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

prometheus-formatter's Issues

Not working in Ubuntu 20.04.2 LTS in /metrics

O.S: Ubuntu 20.04.2 LTS
Chrome Version: 90.0.4430.93 64 bits
Endpoint with error: http://localhost:4000/metrics
Paths treated as prom endpoints:

^/metrics
^/federate
^/probe
^/prometheus
^/actuator/prometheus
  • Tested with all extensions enabled
  • Tested with all extensions disabled, and only left prom extension enabled

Result is a plain text without formatation like
# HELP graphql_queries_parsed The amount of GraphQL queries that have been parsed. # TYPE graphql_queries_parsed counter # HELP graphql_queries_validation_started The amount of GraphQL queries that have started validation. # TYPE graphql_queries_validation_started counter # HELP graphql_queries_resolved The amount of GraphQL queries that have had their operation resolved. # TYPE graphql_queries_resolved counter # HELP graphql_queries_execution_started The amount of GraphQL queries that have started executing. # TYPE graphql_queries_execution_started counter # HELP graphql_queries_errored The amount of GraphQL queries that have encountered errors. # TYPE graphql_queries_errored counter # HELP graphql_queries_responded The amount of GraphQL queries that have been executed and been attempted to send to the client. This includes requests with errors. # TYPE graphql_queries_responded counter # HELP graphql_resolver_time The time to resolve a GraphQL field. # TYPE graphql_resolver_time histogram # HELP graphql_total_request_time The time to complete a GraphQL query. # TYPE graphql_total_request_time histogram

More metrics paths

Can you add /snmp to your valid paths?

Both blackbox_exporter and snmp_exporter will always have target= all valid URLs; in most, but not all, cases, you will also have module= in there.

New version bugged - no file found

New version doesn't contains html files, I think the reason is due release script:

https://github.com/fhemberger/chrome-prometheus-formatter/blob/master/package.json#L7 :

    "release": "cd extension && zip -r ../chrome-webstore-release.zip icons js LICENSE.txt manifest.json -x icons/.DS_Store js/.DS_Store .DS_Store"

I think html folder is missing 🤔

@fhemberger could you look into this ? I have never published chrome extensions and I think it will be faster for you to fix it :)

Dark mode

I've modified this plugin to have a dark theme, based on Atom One Dark.

image

Is there any interest in having this as a new "default", since there's currently no way to switch between themes? If so, I can submit a PR.

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.