Comments on: Install Glances, InfluxDB and Grafana to Monitor CentOS 7 https://www.tecmint.com/install-glances-influxdb-grafana-to-monitor-centos-7/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Mon, 07 Sep 2020 12:54:55 +0000 hourly 1 By: Adrian https://www.tecmint.com/install-glances-influxdb-grafana-to-monitor-centos-7/comment-page-1/#comment-1361321 Mon, 07 Sep 2020 12:54:55 +0000 https://www.tecmint.com/?p=30338#comment-1361321 In reply to Adrian.

Additionally, log from /tmp/glances-root.log

2020-09-07 14:49:16,798 -- INFO -- Start Glances 3.1.5
2020-09-07 14:49:16,800 -- INFO -- CPython 2.7.5 and psutil 5.6.7 detected
2020-09-07 14:49:32,041 -- INFO -- Start Glances 3.1.5
2020-09-07 14:49:32,044 -- INFO -- CPython 2.7.5 and psutil 5.6.7 detected
2020-09-07 14:49:32,051 -- INFO -- Search glances.conf file in /home/adrian/.config/glances/glances.conf
2020-09-07 14:49:32,059 -- INFO -- Read configuration file '/home/adrian/.config/glances/glances.conf'
2020-09-07 14:49:32,072 -- INFO -- Start GlancesStandalone mode
2020-09-07 14:49:32,303 -- WARNING -- Error loading Docker Python Lib. Docker plugin is disabled (No module named docker)
2020-09-07 14:49:32,304 -- ERROR -- docker plugin - Can not connect to Docker (global name 'docker' is not defined)
2020-09-07 14:49:32,305 -- ERROR -- Scandir not found. Please use Python 3.5+ or install the scandir lib
2020-09-07 14:49:32,306 -- WARNING -- Missing Python Lib (No module named py3nvml.py3nvml), Nvidia GPU plugin is disabled
2020-09-07 14:49:32,309 -- WARNING -- Missing Python Lib (No module named netifaces), IP plugin is disabled
2020-09-07 14:49:32,345 -- WARNING -- Sparklines module not found (No module named sparklines)
2020-09-07 14:49:32,346 -- WARNING -- UTF-8 is mandatory for sparklines (encode() argument 1 must be string, not None)
2020-09-07 14:49:32,346 -- WARNING -- Missing Python Lib (No module named cpuinfo), Quicklook plugin will not display CPU info
2020-09-07 14:49:32,347 -- WARNING -- Missing Python Lib (No module named pymdstat), Raid plugin is disabled
2020-09-07 14:49:32,354 -- WARNING -- Missing Python Lib (No module named pySMART), HDD Smart plugin is disabled
2020-09-07 14:49:32,357 -- WARNING -- Missing Python Lib (No module named wifi.scan), Wifi plugin is disabled
]]>
By: Adrian https://www.tecmint.com/install-glances-influxdb-grafana-to-monitor-centos-7/comment-page-1/#comment-1361319 Mon, 07 Sep 2020 12:49:38 +0000 https://www.tecmint.com/?p=30338#comment-1361319 [root@mail ~]# systemctl status glances
Sample Output
● glances.service - Glances
   Loaded: loaded (/etc/systemd/system/glances.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2020-09-07 14:40:36 CEST; 16s ago
  Process: 3347 ExecStart=/usr/bin/glances --config /home/adrian/.config/glances/glances.conf --quiet --export-influxdb --disable-plugin ip (code=exited, status=2)
 Main PID: 3347 (code=exited, status=2)

Sep 07 14:40:36 mail.sysyadmin.info.pl systemd[1]: glances.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 07 14:40:36 mail.sysyadmin.info.pl systemd[1]: Unit glances.service entered failed state.
Sep 07 14:40:36 mail.sysyadmin.info.pl systemd[1]: glances.service failed.

glances: error: unrecognized arguments: --export-influxdb
Sep  7 14:44:39 mail systemd[1]: glances.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Sep  7 14:44:39 mail systemd[1]: Unit glances.service entered failed state.
Sep  7 14:44:39 mail systemd[1]: glances.service failed.
Sep  7 14:44:48 mail systemd[1]: Reloading.
Sep  7 14:44:55 mail systemd[1]: Stopped Glances.
Sep  7 14:45:01 mail systemd[1]: Started Glances.
Sep  7 14:45:03 mail glances[3458]: Traceback (most recent call last):
Sep  7 14:45:03 mail glances[3458]: File "/usr/bin/glances", line 9, in 
Sep  7 14:45:03 mail glances[3458]: load_entry_point('Glances==3.1.5', 'console_scripts', 'glances')()
Sep  7 14:45:03 mail glances[3458]: File "/usr/lib/python2.7/site-packages/glances/__init__.py", line 143, in main
Sep  7 14:45:03 mail glances[3458]: start(config=config, args=args)
Sep  7 14:45:03 mail glances[3458]: File "/usr/lib/python2.7/site-packages/glances/__init__.py", line 108, in start
Sep  7 14:45:03 mail glances[3458]: mode = GlancesMode(config=config, args=args)
Sep  7 14:45:03 mail glances[3458]: File "/usr/lib/python2.7/site-packages/glances/standalone.py", line 51, in __init__
Sep  7 14:45:03 mail glances[3458]: self.stats = GlancesStats(config=config, args=args)
Sep  7 14:45:03 mail glances[3458]: File "/usr/lib/python2.7/site-packages/glances/stats.py", line 48, in __init__
Sep  7 14:45:03 mail glances[3458]: self.load_modules(self.args)
Sep  7 14:45:03 mail glances[3458]: File "/usr/lib/python2.7/site-packages/glances/stats.py", line 103, in load_modules
Sep  7 14:45:03 mail glances[3458]: self.load_exports(args=args)
Sep  7 14:45:03 mail glances[3458]: File "/usr/lib/python2.7/site-packages/glances/stats.py", line 178, in load_exports
Sep  7 14:45:03 mail glances[3458]: export_module = __import__(self._exports_all[export_name])
Sep  7 14:45:03 mail glances[3458]: File "/usr/lib/python2.7/site-packages/glances/exports/glances_influxdb.py", line 27, in 
Sep  7 14:45:03 mail glances[3458]: from influxdb import InfluxDBClient
Sep  7 14:45:03 mail glances[3458]: ImportError: No module named influxdb
Sep  7 14:45:05 mail systemd[1]: glances.service: main process exited, code=exited, status=1/FAILURE
Sep  7 14:45:05 mail systemd[1]: Unit glances.service entered failed state.
Sep  7 14:45:05 mail systemd[1]: glances.service failed.
Sep  7 14:45:05 mail dbus[498]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
Sep  7 14:45:07 mail dbus[498]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Sep  7 14:45:10 mail setroubleshoot: SELinux is preventing /usr/bin/python2.7 
from read access on the file disable_ipv6. For complete SELinux messages run: sealert -l 66e1e5bf-322d-4bd9-911e
-c580274a0951

Seems I need to play with SELinux using my article from my own website LOL.

cat /etc/systemd/system/glances.service
[Unit]
Description=Glances
After=network.target influxd.service

[Service]
ExecStart=/usr/bin/glances --config /home/adrian/.config/glances/glances.conf --quiet --export-influxdb --disable-plugin ip
Restart=on-failure
RestartSec=30s
TimeoutSec=30s

[Install]
WantedBy=multi-user.target
]]>
By: Adrian https://www.tecmint.com/install-glances-influxdb-grafana-to-monitor-centos-7/comment-page-1/#comment-1361318 Mon, 07 Sep 2020 12:42:49 +0000 https://www.tecmint.com/?p=30338#comment-1361318 Can you review the post? Still have issues with the glances. Even after reading all comments and changing the entry in service for glances.

None of the solutions works.

]]>
By: Adrian https://www.tecmint.com/install-glances-influxdb-grafana-to-monitor-centos-7/comment-page-1/#comment-1361309 Mon, 07 Sep 2020 12:02:09 +0000 https://www.tecmint.com/?p=30338#comment-1361309 Proper grafana repo:

[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
]]>
By: Sean Chiarot https://www.tecmint.com/install-glances-influxdb-grafana-to-monitor-centos-7/comment-page-1/#comment-1249243 Fri, 20 Sep 2019 16:46:27 +0000 https://www.tecmint.com/?p=30338#comment-1249243 Hmmm, I followed this but all I see is ‘No Data points’

]]>