Nethserver-glances : Needs Tests

testing

(Stéphane de Labrusse) #1

Plop all

I have done a tiny module about glances, a a cross-platform curses-based system monitoring tool written in Python.

see https://github.com/nicolargo/glances and https://github.com/nicolargo/glances/blob/master/docs/glances-doc.rst

Add EPEL repo:

yum localinstall http://ftp.heanet.ie/pub/fedora/epel/6/i386/epel-release-6-8.noarch.rpm

Disable it:

eorepo centos-base centos-updates nethserver-base nethserver-updates

then install and test the module

yum install http://mirror.de-labrusse.fr/nethserver/nethserver-glances/nethserver-glances-1.0.0-4.ns6.noarch.rpm --enablerepo=epel

then

sensors-detect

After the installation the service which control the web interface is launched, if you want to control it

service glances stop #can be {restart,start,stop,status}

or you can use the neth way (enabled/disabled)

config setprop glances status disabled
signal-event nethserver-glances-update

each time you launch that signal-event, you will update glances and its dependencies

see config db

# config show glances 
glances=service
    TCPPort=61208
    access=private
    status=enabled

The purpose is to see in direct the server activities (you can see raid, disk IO, sensors, bandwithd, memory, docker, …)

Well a lot of good stuffs.

In order to use it go to Dashboard->Applications->Glances. It is a web service restricted on the private network. But if you don’t like to use the web interface, then you can disable it and use only the CLI in your terminal (do simply ‘glances’)

in order to disable the glances web interface (and continue to use the CLI)

config setprop glances status disabled
signal-event nethserver-glances-update

You can change the default TCP port

config setprop glances TCPPort 55555
signal-event nethserver-glances-update

sources : http://mirror.de-labrusse.fr/nethserver/nethserver-glances/ & https://github.com/stephdl/nethserver-glances/tree/ns6


Nethserver-shellinabox
Community Acknowledgments
(Roberto Sitzia) #2

This is awesome @stephdl I like it and I’m going to test.
Thank you.


(Stéphane de Labrusse) #3

minor changes (nethserver-glances-1.0.0-3) , now you have hddtemp and docker-pi as dependencies…don’t forget to launch sensors-detect after the installation, normally all your sensors will be seen by Glances.


(Roberto Sitzia) #4

Damn! I want to try it now but my wife is still using the home computer and I have left my laptop at office, argh!!!
@stephdl Do you know if I can install NethServer on my Nexus 7? :wink:


(Filippo Carletti) #5

@stephdl, you know I’m a fan of the command line. :smile:
I like glances as a quick real time tool to check system status.
Maybe, it deserves a dashboard tab, but I’d like to interact with the keyboard, we probably need to wrap it in a web shell (wetty or tty.js, since we’re already using node.js).
I tested it on a vm, no sensors to view, but everything else seems ok.


(Stéphane de Labrusse) #6

Hard to say, but I guess no :slight_smile:


(Filippo Carletti) #7

Not tonight. :smile:
Support for non x86 archs will problably come with version 7.1.


(Stéphane de Labrusse) #8

Exactly filippo, the web version is lighter than the CLI version, you can’t see the full command process which is stealing your processor time…for example. It seems also that you can’t see the raid status, but even if I can understand the interest for the process, for the raid, I’m puzzled :smile:

Indeed that need to be tried with a web shell but I keep bad feelings about shellinabox…so I hope that they are still developed.


(Lutchy Horace) #9

I want to curse!! this helps ALOT…

Cheers,
Horace


(Roberto Sitzia) #10

I did it!
Very very useful @stephdl I like it.
Obviously, from purists view, glances isn’t merged into NethServer Dashboard graphic style but it’s just a little detail.

Just a clarification for beginners like me:

  1. install the epel repository for CentOS and Red Hat Enterprise Linux 6.x

    wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

in my case yum option

--enablerepo=epel

didn’t works.

  1. wget will save the rpm file in your current directory

    [root@kingpig ~]# ll
    totale 116
    -rw-------. 1 root root 19445 8 lug 2014 anaconda-ks.cfg
    -rw-r–r--. 1 root root 14540 5 nov 2012 epel-release-6-8.noarch.rpm
    -rw-r–r--. 1 root root 10045 8 lug 2014 install.log
    -rw-r–r--. 1 root root 3314 8 lug 2014 install.log.syslog
    -rw-r–r--. 1 root root 31 8 lug 2014 kickstart-stage1.log
    -rw-r–r--. 1 root root 58329 8 lug 2014 kickstart-stage2.log

  2. install the rpm

    rpm -Uvh epel-release-6-8.noarch.rpm
    For the rest it’s a straightforward installation.


(Stéphane de Labrusse) #11

Yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

That should do the trick but in fact even if epel must be installed by default in a centos compliant server, you shouldn’t activated it if you want to be compatible with neth. Look in the epel repository settings and desactivate it else each time you will do a ‘yum update’ all dependencies from epel will be upgraded.

I tried to display glances directly in nethgui but my issue was that each 3 seconds the page is loaded and netgui doesn’t like it.

I’m looking the way how manage the module I made maybe i will open a neth repository


(Roberto Sitzia) #12

Hi @stephdl thanks for your explanation.
If I understand correctly your words I must focus in why

--enablerepo=epel

didn’t works in my case and enable some repositoy just in case.

Hope you can find a way to manage glances directly in nethgui, good luck!


(Stéphane de Labrusse) #13

Well glances needs dependencies from epel, however on my server epel is installed but not enabled by default and thus this is why i need to ‘–enablerepo=epel’ when i want to install the required dependencies.

I’m a contributor and I have no access to nethforge and moreover if you want to use the software center, it seems that It is needed to patch a core rpm each time that a new module is added. So it is not a really convenient way for me…the easier is to offer a private repository and use ‘yum’ to install modules.

Another way could be to propose my own software center, but it is not for tomorrow :wink:


(Filippo Carletti) #14

@stephdl, stay tuned for nethforge access. We’re really busy with the release of 6.6, but as soon as we release 6.6 (final) we will work on the forge and contributor access.


(Filippo Carletti) #15

We need an official way to add external repositories. I’d say:

  1. Add EPEL repo:
    yum localinstall http://ftp.heanet.ie/pub/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
  2. Disable it:
    eorepo centos-base centos-updates nethserver-base nethserver-updates
  3. Usage:
    yum --enablerepo=epel install <package.rpm>

(Stéphane de Labrusse) #16

Honestly I love the idea to manage dependencies and nethserver packages on the same repository, and I might be offer to install rpms from my repository but I missed it.

I don’t know if you are aware filippo, but 10 year ago I was Farmer in France, and I know that plants need time to grow…but when the harvest was ready, I was in a hurry to put it in the silo…

I’m still a Farmer in my mind, except that I grow rpm now :smile:


(Stéphane de Labrusse) #17

howto updated with the epel installation


(Roberto Sitzia) #18

Thanks @filippo_carletti this is what I wanted. :smiley:


(Stéphane de Labrusse) #19

New version, howto updated, now you can change the TCP port if you want so.


(Stéphane de Labrusse) #20

webtty seems not maintained and tty.js even if it looks good and quite easy to install and trick, is not workable with Firefox (I’m not able to copy and paste even with the ctrl+C&ctrl+V) see https://github.com/chjj/tty.js/issues/30

I’m not fine to implement tty.js if I can’t use it…Indeed I have a long story with Firefox. It is not perfect but who is perfect except me.

Other suggestions of web based terminal ?