Add further collectd configuration

This commit is contained in:
Keith Whyte 2022-06-14 05:12:49 +02:00
parent 5540a54ac9
commit c13bf85aa4
5 changed files with 47 additions and 3 deletions

View file

@ -0,0 +1,22 @@
#!/bin/bash
is_empty () {
_o=`rrdtool xport DEF:A=/var/lib/collectd/rrd/$(hostname -f)/$1:value:AVERAGE XPORT:A -s -1day -m10 | xmllint --xpath 'string(xport/data/row)' -`
if [ "$_o" == "0.0000000000e+00" ] ;then
echo "$1 is empty"
return 1
fi
return 0
}
cd /var/lib/collectd/rrd/$(hostname -f)
rm -rf gauge-* derive-*
for f in statsd/* ; do #gauge-bts.0* statsd/*msc.0* statsd/*vlr.0*; do
is_empty $f
if [ $? == 1 ] ; then continue ; fi
mkdir $(basename $f .rrd)
cd $(basename $f .rrd)
ln -s ../$f .
cd ..
done

View file

@ -422,6 +422,16 @@ schedule { 'never':
require => File['/root/.ssh/bsc_dev'],
}
file { '/var/www/html/CGP/conf/config.php':
source => 'puppet:///modules/rhizo_base/CGPconfig.php',
mode => '0644'
}
file { '/root/collectd-hack':
source => 'puppet:///modules/rhizo_base/collectd-hack',
mode => '0750'
}
file { '/var/rhizomatica/rccn/config_values.py':
ensure => present,
content => template('rhizo_base/config_values.py.erb'),

View file

@ -38,7 +38,7 @@ class rhizo_base::osmocom {
ensure => 'absent'
}
package { 'collectd':
package { [ 'collectd', 'libxml2-utils' ]:
ensure => 'installed',
install_options => ['--no-install-recommends'],
}

View file

@ -34,7 +34,13 @@ log stderr
logging level ljibuf notice
logging level lrspro notice
!
stats interval 5
stats interval 10
stats reporter statsd
remote-ip 127.0.0.1
remote-port 8125
level global
no prefix
enable
!
line vty
no login

View file

@ -52,7 +52,13 @@ log stderr
logging level lns error
logging level lbssgp error
!
stats interval 5
stats interval 10
stats reporter statsd
remote-ip 127.0.0.1
remote-port 8125
level global
no prefix
enable
!
line vty
no login