The discussion centers around installing netstat within a Discourse container to investigate increased server load. agemo initially tried using apt install net-tools within the container but it failed. jahan_gagan explained that packages cannot be installed interactively and must be included in the app.yml file during container rebuild using ./launcher rebuild app. agemo admits unfamiliarity with modifying app.yml and asks for a guide. Falco suggests installing netstat on the host OS instead of the container, as server load checks are better performed at that level. agemo clarifies their understanding, questioning whether the host refers to the OS level, and links a related Meta post about potential overload issues https://meta.discourse.org/t/discourse-overloaded-real-traffic-or-ddos-100-cpu-usage-despite-of-decent-traffic-and-high-specs-server/203976. Ed_S reinforces the suggestion to monitor from the host level, emphasizing the container’s role as an isolated environment where internal issues should not affect the host and host-level monitoring provides a complete view.
I’ve entered the app ./launcher enter app and run the command
apt install net-tools
It no work.
I tend to leave the discourse setup as is but I need to look into recently increased server load (user demand uptick), and so assumed I needed to enter the app and run netstat.
Apparently it is not installed by default nor can I install it.
This is a fairly rookie question I know I’m missing something very obvious here. Maybe I don’t need to be in the app?
Discourse containers are built using the app.yml template, and any required packages must be installed during the image build process (i.e., when running ./launcher rebuild app). Packages cannot be installed interactively from within a running container.
As a result, common tools like net-tools (which provides netstat) are typically not included and cannot be easily added after the container is running.
If you need netstat inside the container, you’ll need to add it to your app.yml and then rebuild the container.
Well this is why I leaves things alone more or less in there. I’m not too familiar with that doing that at all only plugins and customisation of basic app.yml.
Is there a guide on meta that covers more expansive app.yml adventures?
When you say host do you mean the OS / linux level?
I have netstat on Ubuntu OS but I thought I needed it in the container (where all the magic happens right, with nginx etc) if I understand things correctly.
Indeed, you need to install monitoring at the outer level. Think of the container as containment: the idea is that things inside the container can’t break things which are outside. But the outer level can see everything that’s happening on the inside. All the network traffic, CPU activity, memory pressure.