...
Clone the latest libvirt code, build and install collectd:
Code Block |
---|
git clone https://github.com/maryamtahhan/collectd.git mt_collectd cd mt_collectd ./build.sh ./configure |
Check that the virt plugin is configured:
Code Block |
---|
virt . . . . . . . . yes |
Install collectd:
Code Block |
---|
sudo make -j install |
Install collectd as a service:
Code Block |
---|
sudo mv systemd.collectd.service collectd.service sudo chmod +x collectd.service vi collectd.service |
Edit the collectd.service script
Code Block |
---|
[Service] |
...
#ExecStart=/usr/sbin/collectd |
...
ExecStart=/opt/collectd/sbin/collectd -C /opt/collectd/etc/collectd.conf |
...
#EnvironmentFile=-/etc/sysconfig/collectd |
...
#EnvironmentFile=-/etc/default/collectd |
...
ProtectSystem=full |
...
ProtectHome=true |