How to return custom statistics #5563
Unanswered
RobsonKing
asked this question in
Q&A
Replies: 1 comment
-
|
You could monkeypatch anything in your initializer, which could add a new route to Sidekiq::Web. That’s probably easiest.
…On Fri, Oct 7, 2022, at 14:42, RobsonKing wrote:
I know that I can get the json statistics for sidekiq from /sidekiq/stats
However I want to provide my own statistics... How many of a certain type of job are running etc.
I know how to find the values that I want to return. What I am struggling with is *how to return them*?
I could add my own controller to the rails app (controllers/my_sidekiq_controler) and return json from a custom route. But then I have to deal with authentication etc.
I see that there is a way to extend the sidekiq web ui with custom tabs (Sidekiq::Web.register MyAddition). But all the example that I see return something rendered by ERB (because they are meant to run in a tab on the web ui).
*Is there a way to resister something that just returns json?*
or is there some other way that i can share the same sidekiq auth structure that the web ui uses?
—
Reply to this email directly, view it on GitHub <#5563>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAAWX4BQ6A7V5CXPDHKPB3WCCKL3ANCNFSM6AAAAAAQ76AL2E>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I know that I can get the json statistics for sidekiq from /sidekiq/stats
However I want to provide my own statistics... How many of a certain type of job are running etc.
I know how to find the values that I want to return. What I am struggling with is how to return them?
I could add my own controller to the rails app (controllers/my_sidekiq_controler) and return json from a custom route. But then I have to deal with authentication etc.
I see that there is a way to extend the sidekiq web ui with custom tabs (Sidekiq::Web.register MyAddition). But all the example that I see return something rendered by ERB (because they are meant to run in a tab on the web ui).
Is there a way to resister something that just returns json?
or is there some other way that i can share the same sidekiq auth structure that the web ui uses?
Beta Was this translation helpful? Give feedback.
All reactions