-
Notifications
You must be signed in to change notification settings - Fork 3.8k
prometheus-node-exporter-ucode: add a plugin for go2rtc metrics #27879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I'm not a go2rtc user, so I can't comment on the metrics.
But generally speaking: I would avoid relying on external processes if
possible, so what about using ucode-mod-uclient instead of uclient-fetch?
Both are part of the uclient, but the former let's you use it from ucode
itself.
Example:
https://git.openwrt.org/?p=project/uclient.git;a=blob;f=uclient-test.uc;h=7333aa4ef2370fa199a3d67f959f16f78a212b1c;hb=HEAD
It'd be a couple more lines of code, but avoids problems like your
comment states
|
|
@dezhwrt at first i've tried to use native uclient, but cannot make it work. I'm not familiar how uhttp runs ucode, perhaps trouble was somewhere nearby uloop, don't remember. |
|
Attached patch works for me, that's a rough quick test which seems to work.
No idea if the uloop stuff is okay, it's been too long...
|
|
github still fails it, let's try again... |
18e01bf to
1e59e36
Compare
|
@dhewg thanks! I've changed fetch using your guide, works well. |
|
Can you paste the generated metrics please, so we get an idea what's
getting generated here?
Is the runtime of this collector acceptable
(node_scrape_collector_duration_seconds)? I guess it takes way longer
because it needs to access a http(s) resource.
As go2rtc has its own http server, it would make way more sense to let
it expose its metrics itself, like you requested here:
AlexxIT/go2rtc#1388
Please follow up there, as this PR can only be a suboptimal stop gap
solution. But as long as the above issue isn't resolved, this PR is okay
with me.
|
|
Here is example (after grep go2rtc): Currently i only check if Frigate remote connected and consumes data. |
|
That looks rather okay at first glance.
And surprisingly fast too, how fast are the others on the same host?
grep for "node_scrape_collector_duration_seconds"
|
1e59e36 to
48992d6
Compare
|
Okay, nice.
But why switch to `log`?
The basic `warn()` does exactly what we want, no matter if its running
from cmdline or procd, please use that instead.
|
48992d6 to
19c980d
Compare
|
@dhewg done. |
19c980d to
6038833
Compare
805be0a to
0031418
Compare
0031418 to
9c4585c
Compare
|
Wtf with that CI? RV64, PPC always fails, even here, where no compilation at all... |
2b4e0fa to
8df3cdf
Compare
2d9d271 to
a65ea32
Compare
3a06eff to
7eb14ba
Compare
518d27f to
75e3c99
Compare
|
@dhewg found that if not explicitly free uclient - second call would stuck until uhttpd timeouts. |
c220623 to
83806c2
Compare
- Add a plugin to export go2rtc metrics Requires additional api_url option to enable: ``` uci set prometheus-node-exporter-ucode.go2rtc=collector uci set prometheus-node-exporter-ucode.go2rtc.api_url=\ 'http://127.0.0.1:1984' uci commit ``` Co-authored-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
83806c2 to
72780f3
Compare
|
@GeorgeSapkin hard dependency on go2rtc breaks build for RV64 and MIPS, which i have marked broken for go2rtc, but CI still tries to build with the plugin. |
|
@dhewg what do you think, is it worth to generalise http fetch to a kind of library? |


📦 Package Details
Maintainer: @dhewg
Description:
Requires additional api_url option to enable:
🧪 Run Testing Details
✅ Formalities