Giter Club home page Giter Club logo

excel-exporter's Introduction

excel-exporter - a Prometheus exporter for Excel files

Excel-exporter is a generic Prometheus exporter for Excel files. It will iterate all files in all target folders finding values and labels on a spreadsheet.

Prerequisites

In order to run excel-exporter you need Node.js installed on your system.

Installation

The Installation is simple as can be.

npm i

Configuration

The exporter is configured via the settings.yaml file located in the config folder. At the moment you can only access one folder containing excel files.

You will have to create a settings.yaml before you can start the server!

targets:
  - folder: /Users/marcowarm/Downloads/teams
    filePattern: .*\.xlsx
    metrics:
      - name: team_output_target_quantity
        metricType: gauge
        help: output quantity expected by the team
        worksheet: Tägliche Meldung
        labels:
          team:
            reference: W2
          schicht:
            reference: N2
        value:
          reference: K30
      - name: team_output_actual_quantity
        metricType: gauge
        help: output quantity expected by the team
        worksheet: Tägliche Meldung
        labels:
          team:
            reference: W2
          schicht:
            reference: N2
        value:
          reference: M30

Running

To start the server run.

node path/to/excel-exporter

or

npx path/to/excel-exporter

(You might want to run this as a service)

Getting the values

The exporter provides the values as follows

http://{YourExporterServer}:9973/values

e.g. http://localhost:9973/values

Raw JSON Data like so: http://{YourExporterServer}:9973/valuesJson

excel-exporter's People

Watchers

James Cloos avatar Marco Warm avatar

excel-exporter's Issues

Unhandled promise rejection

Hi Marco,

a Label can be NULL but if a Value Field is NULL or 0 i get the following error.

UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)

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.