Coder Social home page Coder Social logo

grafana-npm's Introduction

Grafana NPM Versions bridge

This projects monitors npm packages for new versions, storing into a mysql database for consumption in grafana.

Example query

SELECT
  npm_versions.package as Package,
  npm_versions.version as Version,
  npm_tags.tag as Tag,
  npm_versions.published as Published
FROM npm_versions
LEFT JOIN npm_tags ON npm_tags.package = npm_versions.package AND npm_tags.version = npm_versions.version
WHERE (published >= $__timeFrom() AND published <= $__timeTo())
  OR npm_tags.tag IN ('latest', 'nightly') -- , 'experimental')

ORDER BY npm_versions.published DESC
LIMIT 50

Installation

Ensure you have a running mysql server

Define the following environment variables, updating for your setup as appropriate:

  1. MYSQL_URL eg mysql://USERNAME:PASSWORD@HOST/DATABASE
  2. PACKAGES A comma separated list of packages to monitor eg atem-connection,@julusian/jpeg-turbo

It can be run in docker like:

docker run --restart=always \
  -e MYSQL_URL="mysql://USERNAME:PASSWORD@HOST/DATABASE" \
  -e PACKAGES=atem-connection,@julusian/jpeg-turbo \
   ghcr.io/julusian/grafana-npm-versions

Or in node:

  1. yarn install
  2. yarn build
  3. node dist/index.js

Development

  1. yarn install
  2. yarn dev

grafana-npm's People

Contributors

dependabot[bot] avatar julusian avatar

Watchers

 avatar  avatar  avatar

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.