I’ve installed glances, and can correctly see it via http://192.168.1.53:61208
My config looks like this:
sensor:
- platform: glances
name: docker4
host: 192.168.1.53
resources:
- 'disk_use_percent'
- 'disk_use'
- 'disk_free'
- 'memory_use_percent'
- ... SNIP
When I restart HASS I don’t get any errors but none of the glance servers get added either.
My entire config can be seen here if it helps: https://github.com/rossdargan/hass-config/blob/master/configuration.yaml#L79
Thanks
fabaff
(Fabian Affolter)
May 26, 2017, 8:54am
2
Is your used version of glances greater than 2.3?
yeah, I just installed it.
fabaff
(Fabian Affolter)
May 26, 2017, 8:55am
4
And what release are you using?
2.9.1 (sorry took a while to figure out how to find the version!)
fabaff
(Fabian Affolter)
May 26, 2017, 9:22am
6
Works fine for me on dev
with Glances v2.5.1 with psutil v4.3.0
.
Does my config look correct? It’s odd as I’m not seeing any errors in the log.
fabaff
(Fabian Affolter)
May 26, 2017, 10:41am
8
Can you try to retrieve a value with the command line, please?
$ curl -X GET http://192.168.1.53:61208/api/2/mem/free
The glances
sensor is basically just doing this. But as the access to the website works your server side seems to work.
hmm. That just doesn’t do anything - it gives me that ability to type stuff in and press enter but I never get a response. In the end I have to ctrl-c out.
Hmm!
rpitera
(Robert Pitera)
May 26, 2017, 1:34pm
10
That is kind of weird as I just performed the same test and got a response:
pi@raspi1:~$ curl -X GET http://192.168.1.181:61208/api/2/mem/free
{"free": 574656512}pi@raspi1:~$
Glances 2.6.2, HA 0.45.0
The only difference between my config in HA and yours is that I specified the port.
- platform: glances
name: RP1
host: 192.168.1.181
port: 61208
resources:
- 'disk_use_percent'
- 'disk_use'
- 'disk_free'
- 'memory_use_percent'
- 'memory_use'
- 'memory_free'
- 'swap_use_percent'
- 'swap_use'
- 'swap_free'
- 'processor_load'
- 'process_running'
- 'process_total'
- 'process_thread'
- 'process_sleeping'
But you should get a response from the command line @fabaff gave like I did. You may want to check again to make sure it is running, maybe it went down since the last test in your browser.
rpitera
(Robert Pitera)
May 26, 2017, 1:44pm
11
Just to check, I updated both psutil and glances to the latest versions, restarted the service and checked again and I am still working.
So a reboot started the api working, but it still isn’t working in hass.
The curl command returns
{"free": 3280195584}
I’ve reduced my config to this:
sensor:
- platform: glances
name: docker4
host: 192.168.1.53
port: 61208
resources:
- 'memory_free'
but I still don’t see glances in states.
rpitera
(Robert Pitera)
May 27, 2017, 4:11pm
13
Are you sure you’re looking in the right place? Should be under sensor.docker4.ram_free
.
rpitera
(Robert Pitera)
May 27, 2017, 4:16pm
15
Yeah, weird that it’s not the same naming convention. I can see how that would throw you off.
1 Like
cewjr9842
(Chuck W.)
September 8, 2017, 1:12am
16
I am having inssues installing glances in Hassio for some reason? I want to remotely monitor a Desktop PC on my network.
Can anyone point a a noob in the right direction? I was tryingto follow the sisntall steps here , but I am not sure if i am doing something right. I can not install it on my PI.
grantc
(Grant)
July 2, 2019, 7:16am
17
Not sure what is going on here - can start with glances -w and
use the web interface on http://0.0.0.0:61208/
but when I try "http://IP:61208/api/2 or 3 I get file does not exist.
curl -X GET http://192.168.1.2:61208/api/2/mem/ confirms this also
<html>
<head>
<title>Error: 404 Not Found</title>
<style type="text/css">
html {background-color: #eee; font-family: sans;}
body {background-color: #fff; border: 1px solid #ddd;
padding: 15px; margin: 15px;}
pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
</style>
</head>
<body>
<h1>Error: 404 Not Found</h1>
<p>Sorry, the requested URL <tt>'http://192.168.1.2:61208/api/2/mem/free'</tt>
caused an error:</p>
<pre>File does not exist.</pre>
</body>
</html>
Ubuntu 19.04, running HA in VE
grantc
(Grant)
July 2, 2019, 8:15am
18
Sorted- using version 3 requires a version entry in the config.yaml… defaults to 2 otherwise.
Petrica
(PetricaM)
July 2, 2019, 8:24am
19
You can also use the following options (however, some might not be applicable): alert, amps, batpercent, cloud, core, cpu, diskio, docker, folders, fs, gpu, help, ip, irq, load, mem, memswap, network, now, percpu, ports, processcount, processlist, psutilversion, quicklook, raid, sensors, smart, system, uptime, wifi
1 Like