Skip to content

Cloudflare worker to send metric upon pages to InfluxDB

License

Notifications You must be signed in to change notification settings

pyropy/cf-metrics

This branch is 8 commits ahead of vanadium23/cf-metrics:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9859e77 · Dec 10, 2024

History

49 Commits
Feb 13, 2020
Dec 6, 2024
Dec 9, 2024
Feb 9, 2020
Feb 9, 2020
Feb 13, 2020
Dec 10, 2024
Dec 9, 2024
Dec 9, 2024
Dec 6, 2024
Dec 10, 2024

Repository files navigation

Cloudflare metrics worker

Send your page views from Cloudflare worker to InfluxDB.

Dashboard views

Requirements

  1. Your site need to be setup behind Cloudflare CDN.
  2. You need to setup InfluxDB with external access (make sure you have set authentication)
    1. Make sure InfluxDB is hosted under supported port for Workers. Best option is 80 or 443.

How to use

  1. Install wrangler package
npm i @cloudflare/wrangler -g
  1. Copy example files
cp .env.example .env
cp wrangler.toml.example wrangler.toml
  1. Deploy your worker to a site with wrangler
wrangler publish --env production
  1. (Optional) If you're using Grafana with InfluxDB, then you can import example Dashboard from first screen.

About

Cloudflare worker to send metric upon pages to InfluxDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%