Last active
December 5, 2018 02:48
-
-
Save tnolet/7361441 to your computer and use it in GitHub Desktop.
Install collectd 5.4 on Centos 6.x and make it spit out cool metrics. Copied from http://linuxdrops.com/install-collectd-statistics-collecter-on-centos-rhel-ubuntu-debian/ and tweaked for your and my pleasure. For all other cool options, check the provided link.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Perform installation as root | |
# Install prereqs | |
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++ | |
# Get Collectd, untar it, make it and install | |
wget http://collectd.org/files/collectd-5.4.0.tar.gz | |
tar zxvf collectd-5.4.0.tar.gz | |
cd collectd-5.4.0 | |
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --mandir=/usr/share/man --enable-all-plugins | |
make | |
make install | |
# Copy the default init.d script | |
cp /root/collectd-5.4.0/contrib/redhat/init.d-collectd /etc/init.d/collectd | |
# Set the correct permissions | |
chmod +x /etc/init.d/collectd | |
# Start the deamon | |
service collectd start | |
# NOTE! FQDN lookup is enabled by default. This might give you troubles if you'r running on Vagrant or some cloud server | |
# Check /var/log/messages for something like "Looking up "<yourhost>" failed. You have set the "FQDNLookup" option, but I cannot resolve my hostname... | |
# The fix is easy, just set "FQDNLookup false" in /etc/collectd.conf | |
there's a typo in the first yum install
command. Instead of rrdtool-perl you have rrdtool-prel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reason
tcpconns
metrics are not being sent at all.I'm running CentOS6 and I used this command to install the collectd:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib64 --mandir=/usr/share/man --enable-all-plugins
All metrics are being sent except of tcpconns, any suggestions?