Can anyone tell me how I may get uwsgitop to monitor all of my vassals in my emperor-vassal setup in one shot?

I have an emperor-vassal setup for my uWSGI server, and I need to monitor all my vassals. I could always check my application logs for the various data, but it is more convenient to have a real-time updating, comprehensive display of all statistics.

So, I tried a couple of things:

  1. I created a common .ini file which contains the following:

    stats = stats_vassal.sock

    Then, in each vassal's .ini file I include that common .ini file. The problem with this approach is that I don't get any meaningful data when I run uwsgitop with the stats_vassal.sock file. My hypothesis as to why this is happening is that the data in that socket keeps getting overwritten by stats from some vassal that isn't in use.

    So then I switched to....

  2. In each vassal's .ini file, I set an option stats = stats_%n.sock. Now, I can run uwsgitop on each stats_*.sock file to monitor that specific vassal.

    But I want to be able to monitor all vassals in one go. uwsgitop seems to accept only one argument.

I've looked into uWSGI's Metrics subsystem, and the "file" stats pusher seems to be what I want since it keeps appending to one file. However, when I tried to put stats-push = file:path=stats_%n.sock,freq=1 in each of my vassal .ini files OR when I tried to put stats-push = file:path=stats_vassal.sock,freq=1 in my common vassal .ini file, I get the following error when I restart uWSGI:

unable to find "file" stats_pusher

I then tried to include the stats_pusher_file plugin in the same .ini file, but got the following error:

!!! UNABLE to load uWSGI plugin: ./stats_pusher_file_plugin.so: cannot open shared object file: No such file or directory !!!

And this is where I hit a dead end.


Unfortunately uwsgitop didn't have such possibilities, but i wrote "patch" and with my changes there is ability to use uwsgitop this way : uwsgitop /var/stats and it shows all vassal workers information separately on one screen.

You can check code here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.