Commit Graph

210 Commits

Author SHA1 Message Date
Grant Limberg
8e6e4ede6d
Add prometheus metrics for Central controllers (#1969)
* add header-only prometheus lib to ext

* rename folder

* Undo rename directory

* prometheus simpleapi included on mac & linux

* wip

* wire up some controller stats

* Get windows building with prometheus

* bsd build flags for prometheus

* Fix multiple network join from environment entrypoint.sh.release (#1961)

* _bond_m guards _bond, not _paths_m (#1965)

* Fix: warning: mutex '_aqm_m' is not held on every path through here [-Wthread-safety-analysis] (#1964)

* Serve prom metrics from /metrics endpoint

* Add prom metrics for Central controller specific things

* reorganize metric initialization

* testing out a labled gauge on Networks

* increment error counter on throw

* Consolidate metrics definitions

Put all metric definitions into node/Metrics.hpp.  Accessed as needed
from there.

* Revert "testing out a labled gauge on Networks"

This reverts commit 499ed6d95e.

* still blows up but adding to the record for completeness right now

* Fix runtime issues with metrics

* Add metrics files to visual studio project

* Missed an "extern"

* add copyright headers to new files

* Add metrics for sent/received bytes (total)

* put /metrics endpoint behind auth

* sendto returns int on Win32

---------

Co-authored-by: Leonardo Amaral <leleobhz@users.noreply.github.com>
Co-authored-by: Brenton Bostick <bostick@gmail.com>
2023-04-21 12:12:43 -07:00
Grant Limberg
03bd96d1d1
move begin/commit into try/catch block (#1932)
Thread was exiting in some cases
2023-03-24 13:03:15 -07:00
Grant Limberg
dea47f601d
more info on exception 2023-02-22 16:13:05 -08:00
Grant Limberg
0ae09577f6
Client & Central Controller updates to support additonal OIDC features (#1848)
Client side:
* Fix compatibility with OneLogin
* Requested scopes vary by OIDC provider. Different providers have different

Controller side:
*Update Postgres queries to latest Central schema
* Added Central Controller support for the different providers
* Base OIDC provider details are still attached to an org. Client ID & group/email lists are now associated with individual networks.
2023-01-19 15:39:15 -08:00
Brenton Bostick
98e0bf22d3 fix actual typo in config key code 2022-12-07 10:23:11 -05:00
Brenton Bostick
1e2ff042b4 fix typos in docs, comments, and strings 2022-12-07 10:17:53 -05:00
Grant Limberg
4e57abb159
Revert "modify sso queries for schema change"
This reverts commit 8b67d06272.
2022-09-28 13:26:41 -07:00
Grant Limberg
2b1ba60f24
Optimize member load query for Central controllers 2022-09-28 13:10:34 -07:00
Grant Limberg
638c868a07
Revert "query update for sso"
This reverts commit 3c343eb775.
2022-09-28 13:04:08 -07:00
Grant Limberg
b909330518
Revert "bump min db version"
This reverts commit 802072ec17.
2022-09-28 13:03:41 -07:00
Grant Limberg
802072ec17
bump min db version 2022-09-27 14:21:20 -07:00
Grant Limberg
3c343eb775
query update for sso 2022-09-27 13:41:52 -07:00
Grant Limberg
8b67d06272
modify sso queries for schema change 2022-09-21 14:29:47 -07:00
Grant Limberg
9cf8dacfbb
don't crash out of the controller heartbeat loop here 2022-06-30 11:40:04 -07:00
Grant Limberg
b5d7d71e1e
use connection pool instead of new connection for member status writes
redis plus plus has an annoying feature where it will open a new
connection for each tx or pipeline by default, rather than just fetching
an existing connection from the pool.  Let's change that
2022-06-30 09:59:47 -07:00
Grant Limberg
6fdc7be502
redis connection pool tuning 2022-06-29 09:39:51 -07:00
Grant Limberg
0d7197381a
exit here on error 2022-06-28 09:28:35 -07:00
Grant Limberg
ff8da9d246
Play with online notification timing again 2022-06-24 10:03:30 -07:00
Grant Limberg
c1384422c3
just sleep 1 second 2022-06-22 10:58:23 -07:00
Grant Limberg
ccc0ebd0f9
don't spam the logs quite as much on first startup
sleep the thread 1 second every round until we're actually updating
members
2022-06-22 10:42:51 -07:00
Grant Limberg
9d4336d296
redis connection tuning 2022-06-22 10:30:58 -07:00
Grant Limberg
17bc9d3085
redis thread now uses this_thread::yield() 2022-06-22 10:07:55 -07:00
Grant Limberg
436f481a34
fix log line 2022-06-22 10:01:07 -07:00
Grant Limberg
9e8215b213
adjust sleep between onlineNotification runs. Added timer to output 2022-06-22 09:43:09 -07:00
Grant Limberg
caf8b15f6d
Merge pull request #1701 from tossp/sql2
fix sql
2022-06-19 18:09:28 -07:00
TossPig
bc7f18064f
fix sql
bind message supplies 17 parameters, but prepared statement "" requires 16
2022-06-20 05:59:13 +08:00
Grant Limberg
355d3f44fb
logging & redis standalone fix 2022-06-16 11:52:35 -07:00
Grant Limberg
9de863e68b
update controller db record 2022-06-16 10:50:07 -07:00
Grant Limberg
626f488cb4
quiet down the controller logs a smidge 2022-06-15 16:58:07 -07:00
Grant Limberg
10212e376a
more redis in the controller 2022-06-15 16:58:04 -07:00
Grant Limberg
0ed339f19d
make sure value here is true, not just that the env var is set 2022-06-13 15:44:35 -07:00
Grant Limberg
c6fc3560f2
Merge branch 'dev' into redisrection 2022-06-13 13:09:36 -07:00
Grant Limberg
9ddc0327d4
enable redis member status again 2022-05-10 08:36:39 -07:00
Grant Limberg
59151fbf86
remove max count for xread 2022-04-28 13:10:07 -07:00
Grant Limberg
1c700b7b41
Fix redis cluster usage 2022-04-28 13:05:02 -07:00
Grant Limberg
ff18bacd94
fix XREAD commands for redis message queue 2022-04-28 11:16:45 -07:00
Grant Limberg
f8e24f4629
Fix issue where restarting a controller causes a DB write for each network member 2022-02-28 12:26:32 -08:00
Grant Limberg
c09010c25a
handle nonce rotation in controller better
Won't generate new nonces until there are no active ones.
2022-01-20 15:14:29 -08:00
Grant Limberg
b3fbbd3124
refresh tokens now working
Still investigating the best way to do a couple things, but we have something working
2021-12-07 16:29:50 -08:00
Grant Limberg
730482e62f
encode network ID into sso state param 2021-12-01 15:02:21 -08:00
Grant Limberg
663a09b38d
oidc stuff coming across the wire properly and generating a working login URL 2021-12-01 13:01:32 -08:00
Grant Limberg
dfdac7adbd
iomanip 2021-11-30 17:31:46 -08:00
Grant Limberg
a33d7c64fe
more fixin 2021-11-30 17:27:13 -08:00
Grant Limberg
d15516f0ef
query fix & controller build fix 2021-11-30 16:18:34 -08:00
Grant Limberg
fa21fdc1cc
rename stuff for clarity
authenticationURL will still be used by the client for v1 and v2 of sso
2021-11-11 16:19:26 -08:00
Grant Limberg
8d39c9a861
plumbing full flow from controller -> client network 2021-11-04 15:40:08 -07:00
Grant Limberg
3818351287
use pqxx::pipeline for online update thread 2021-10-06 09:39:30 -07:00
Grant Limberg
4d26b5a868
no reason for this to be a pointer 2021-10-05 17:02:50 -07:00
Grant Limberg
ac0dc7844f
rework commit thread & some connection pool borrowing issues 2021-10-05 09:25:24 -07:00
Grant Limberg
46adc1f059
ifdef this out 2021-09-20 15:39:53 -07:00