User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:glances [2024/11/25 09:29] willyservices:glances [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Glances ====== 
- 
-[[https://github.com/nicolargo/glances|Glances]] is a CLI and Web GUI monitor for your server. It's neat and nice, and it's not intrusive. It comes with a nice CLI interface, but also with an handy WEB GUI interface, which is what i want to leverage here. 
- 
-==== Installation ==== 
- 
-Glances is available in Gentoo's Portage, but lacks the FastAPI and Uvcorn dependencies, so it's better to create a dedicated venv as root: 
-<code bash> 
-  python -m venv /opt/glances 
-    . /opt/glances/bin/activate 
-    pip install glances fastapi uvicorn jinja2 
-</code> 
- 
- 
-==== Reverse Proxy ==== 
- 
-Glances needs to be set up in the [[selfhost:nginx|reverse proxy]] to be accessed protected behind your [[selfhost:sso|SSO]]: 
- 
-<file - glances.conf> 
-location = /glances { 
-        return 301 https://$host/glances/; 
-} 
- 
-location /glances/ { 
-  rewrite /glances/(.*) /$1 break; 
-  proxy_pass http://localhost:61208/; 
-  proxy_set_header Host $http_host; 
-  proxy_set_header X-Real-IP $remote_addr; 
-  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
-  proxy_set_header X-Forwarded-Proto $scheme; 
-} 
-</file> 
- 
-==== Autostart ==== 
- 
-Create the following OpenRC start script into **/etc/init.d/glancesweb** and make it exetuable: 
-<file - glancesweb> 
-#!/sbin/openrc-run 
-# Copyright 1999-2021 Gentoo Authors 
-# Distributed under the terms of the GNU General Public License v2 
- 
-description="Glances web server" 
-pidfile="/run/glancesweb.pid" 
-logfile="/var/log/glancesweb.log" 
- 
-depend() { 
-        need net 
-} 
- 
-start() { 
-        . /opt/glances/bin/activate 
-        /opt/glances/bin/glances -w > ${logfile} 2> ${logfile}& 
-        echo $! > ${pidfile} 
-} 
-</file> 
- 
-Then of course, set it to boot: 
-<code bash> 
-rc-update add glancesweb default 
-</code> 
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information