This post is about the Collectd Server ... called mainpi here
MainPi will also be configged to run CGP (Collectd Graph Panel) so we have a nice grapical representation of the data, that will be the 3rd post in the series
Getting collectd installed on the central server (MainPi) is a easy as typing:
sudo apt-get install collectd collectd-utils
|
Next step is to config the deamon as a network server using rrd as it's output.
sudo nano /etc/collectd/collectd.conf
|
## /etc/collectd/collectd.conf
Hostname MainPi
FQDNLookup false
## This can be higher if you have a more powerfull box
Interval 30
## This can be higher if you have a more powerfull box
ReadThreads 1
LoadPlugin syslog
<Plugin syslog>
LogLevel info
</Plugin>
LoadPlugin cpu
LoadPlugin df
LoadPlugin disk
LoadPlugin entropy
LoadPlugin interface
LoadPlugin irq
LoadPlugin load
LoadPlugin memory
LoadPlugin processes
LoadPlugin rrdtool
LoadPlugin swap LoadPlugin users LoadPlugin network
## Server config
<Plugin "network">
# Can also be "*" "25826" to listen on 0.0.0.0
Listen "192.168.1.147" "25826" #Local interface
ReportStats true SecurityLevel None </Plugin>
## Extra Plugins ## remove to disable #LoadPlugin nginx LoadPlugin uptime LoadPlugin ping
<Plugin rrdtool>
DataDir "/var/lib/collectd/rrd" </Plugin>
Include "/etc/collectd/filters.conf"
Include "/etc/collectd/plugins.conf"
Include "/etc/collectd/thresholds.conf"
|
Since Plugins.conf is loaded , well need to config the plugins in that file.
sudo nano /etc/collectd/plugins.conf
|
## /etc/collectd/plugins.conf
## Static Plugins (every host has them)
<Plugin swap>
ReportByDevice false
</Plugin>
## Dynamic Plugins (loaded by Ansible based on options)
#<Plugin nginx>
# URL "http://127.0.0.1/nginx_status"
#</Plugin>
<Plugin ping>
Host "ntp.belnet.be"
</Plugin>
#</Plugin>
|
Thats the Collectd server set up !
Geen opmerkingen:
Een reactie posten