I'm using Cockpit to monitor a server with Gitlab.
Since I installed Cockpit, Gitlab is using 100% of my CPU.
When I check with htop
, I see this is a Gitlab component, prometheus.
Solution:
While I'm writing this question, I found a solution.
Prometheus and Cockpit use the same port by default (9090).
I just have to change the Cockpit port to another and everything goes to normal :)
On Ubuntu Server 18.04, edit /etc/systemd/system/sockets.target.wants/cockpit.socket
like this:
[Unit]
Description=Cockpit Web Service Socket
Documentation=man:cockpit-ws(8)
[Socket]
ListenStream=XXXX <-- Change port here.
ExecStartPost=-/bin/ln -sf /usr/share/cockpit/issue/active.issue /run/cockpit/issue
ExecStopPost=-/bin/ln -sf /usr/share/cockpit/issue/inactive.issue /run/cockpit/issue
[Install]
WantedBy=sockets.target
Then reload systemd
config and restart Cockpit:
sudo systemctl daemon-reload
sudo systemctl restart cockpit.socket
That's all!