Commit ff377c98 by Bach Dániel

add systemd unit file

parent ff94bbc2
[Unit]
Description=CIRCLE monitor-client
After=network.target
[Service]
User=cloud
Group=cloud
WorkingDirectory=/home/cloud/monitor-client
ExecStart=/bin/bash -c "source /etc/profile; workon monitor-client; exec python manage.py run"
Restart=always
[Install]
WantedBy=multi-user.target
......@@ -118,8 +118,11 @@ class Client:
'system.boot_time': psutil.boot_time()
}
for k, v in psutil.disk_io_counters().__dict__.items():
metrics['disk.%s' % k] = v
try:
for k, v in psutil.disk_io_counters().__dict__.items():
metrics['disk.%s' % k] = v
except:
pass
interfaces = psutil.network_io_counters(pernic=True)
for interface, data in interfaces.iteritems():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment