Skip to content

Commit

Permalink
Provide more agent analytics to posthog (netdata#11020)
Browse files Browse the repository at this point in the history
* Move statistics related functions to analytics.c

* error message change, space added after if

* start an analytics thread

* use heartbeat instead of sleep

* add late enviroment (after rrdinit) pick of some attributes

* change loop

* re-enable info messages

* remove possible new line

* log and report hits on allmetrics pages. detect if exporting engines are enabled/in use, and report them

* use lowercase for analytics variables

* add collectors

* add buildinfo

* more attributes from late environment

* add new attributes to v1/info

* re-gather meta data before exit. update allmetrics counters to be available in v1/info

* log hits to dashboard

* add mirrored hosts

* added notification methods

* fix spaces, proper JSON naming

* add alerts, charts and metrics count

* more attributes

* keep the thread up, and report a meta event every 2 hours

* small formating changes. Disable analytics_log_prometheus when for unit testing. Add the new attributes to the anonymous-statistics.sh.in script

* applied clang-format

* dont gather data again on exit

* safe buffer length in snprintfz

* add rrdset lock

* remove show_archived

* remove setenv

* calculate lengths during sets
  • Loading branch information
Emmanuel Vasilakis authored Apr 27, 2021
1 parent dc567d5 commit e9ccc75
Show file tree
Hide file tree
Showing 13 changed files with 1,220 additions and 197 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,8 @@ set(DAEMON_FILES
daemon/daemon.h
daemon/global_statistics.c
daemon/global_statistics.h
daemon/analytics.c
daemon/analytics.h
daemon/main.c
daemon/main.h
daemon/signals.c
Expand Down
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,8 @@ DAEMON_FILES = \
daemon/daemon.h \
daemon/global_statistics.c \
daemon/global_statistics.h \
daemon/analytics.c \
daemon/analytics.h \
daemon/main.c \
daemon/main.h \
daemon/signals.c \
Expand Down
Loading

0 comments on commit e9ccc75

Please sign in to comment.