ticketmaster / googleanalytics_exporter Goto Github PK
View Code? Open in Web Editor NEWObtains Google Analytics RealTime metrics, and presents them to prometheus for scraping.
License: MIT License
Obtains Google Analytics RealTime metrics, and presents them to prometheus for scraping.
License: MIT License
Hey there,
I have been running this as a systemd service (docker wasn't agreeing with me) and it is crashing every 5 hours.
Any ideas what could be causing this?
I'll try get the logs tomorrow and post them here, as well as take a try at fixing it myself.
The docker stopped automatically and an error occurred, ExitCode = 2. I can run the docker to run normally, after a while it will stop automatically.
container die containerID (description=Obtains Google Analytics RealTime API metrics, and presents them to prometheus for scraping., exitCode=2, image=ganalytics, name=googleanalytics)
Your Docker image is using Alpine 3.5 which official support ended 2018-11-01
https://en.wikipedia.org/wiki/Alpine_Linux
Since you are using GoLang you could use
Google's distroless gcr.io/distroless/base
https://github.com/GoogleContainerTools/distroless/tree/master/base
And never worry again about underlying OS getting outdated.
Alternatively use Alpine 3.11 which is the latest distribution
Thanks for this work!
What do you think about adding an index page to match what other exporters do?
Simply a page to link to /metrics
so that checking the exporter is running can be curl localhost:9100
instead of needing /metrics
too.
Code from official Node Exporter is here: https://github.com/prometheus/node_exporter/blob/55c32fcf02492fe4946f7ab563547cc5df7fc61e/node_exporter.go#L101
Happy to write a pull request if you like the idea?
I have problem about index out of range after I added user account from Google API and run ./ganalytics
like this
Could you please help or advice me to solve this problem
regards.
Nawapon Jeanpanichpong
Undergraduate Student
Faculty of Engineering , major Computer Engineering.
King Mongkut's University of Technology North Bangkok. Thailand.
panic: runtime error: index out of range [0] with length 0
goroutine 141 [running]:
main.getMetric(0xc0000100f8, 0xc0001371e0, 0xe, 0xaf2c88, 0x0)
/root/googleanalytics_exporter/ganalytics.go:111 +0x2a9
main.main.func2(0xc0000100f8, 0xc0001371e0, 0xe)
/root/googleanalytics_exporter/ganalytics.go:93 +0x43
created by main.main
/root/googleanalytics_exporter/ganalytics.go:92 +0x4a5
I do not know if this problem has ever been encountered or not. And how can I fix it ?
This problem occurs when I run ./ganalytics
Port 9100
is used by the Node Exporter which most people will likely be running, so maybe a new default port should be suggested?
Does this support google analytics V4?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.