Two Ubuntu virtual machines, server and client. Server IP Address: 192.168.91.130. Port 25827 to be received.
Server Installation, version 4.10
Apt-Get install collectD
/Etc/collectD. conf configuration (mainly including network plugin and rrdtool plugin ):
Loadplugin Syslog
<Plugin syslog>
Loglevel info
</Plugin>
Loadplugin CPU
Loadplugin DF
Loadplugin Disk
Loadplugin Interface
Loadplugin Load
Loadplugin memory
Loadplugin Network
Loadplugin rrdtool
<Plugin network>
# Client Setup:
# Server "ff18: efc0: 4a42" "25826"
# <Server "239.192.74.66" "25826">
# Securitylevel Encrypt
# Username "user"
# Password "secret"
# Interface "eth0"
# </Server>
# Timetolive "128"
#
# Server setup:
Listen "192.168.91.130" "25827"
# <Listen "192.168.91.130" "25827">
# Securitylevel sign
# AuthFile "/etc/collectD/passwd"
# Interface "eth0"
# </Listen>
# Maxpacketsize 1024
#
# Proxy setup (client and server as above ):
# Forward true
#
# Statistics about the network plugin itself
# Reportstats false
#
# "Garbage Collection"
# Cacheflush 1800
</Plugin>
<Plugin rrdtool>
Datadir "/var/lib/collectD/RRD"
# Cachetimeout 120
# Cacheflush 900
# Writespersecond 30
# Randomtimeout 0
#
# The following settings are rather advanced
# And shoshould usually not be touched:
# Stepsize 10
# Heartbeat 20
# Rrarows 1200
# Rratimespan 158112000
# Xff0.1
</Plugin>
Set and save startup:/etc/init. d/collectD start
Client Configuration:
Install: APT-Get install collectD
You can also configure it in/etc/collectD. conf:
The difference is that in the network plug-in, the configuration
# Client Setup:
Server "192.168.91.130" "25827"
# <Server "192.168.91.130" "25827">
# Securitylevel Encrypt
# Username "user"
# Password "secret"
# Interface "eth0"
# </Server>
Restart After configuration,/etc/init. d/collectD start
On the server side, use rrdtool to view data. For example, you can view the average value of-today and find that collectD generates a new data every S.
At present, I don't quite understand the meaning of the term and so on.
A small error was made during the second configuration. The plugin network was blocked by # by default. After the network was configured, it never worked, that is, it was forgotten to eliminate blocking. After elimination, everything works normally.