Add further collectd configuration
This commit is contained in:
parent
5540a54ac9
commit
c13bf85aa4
5 changed files with 47 additions and 3 deletions
22
modules/rhizo_base/files/collectd-hack
Normal file
22
modules/rhizo_base/files/collectd-hack
Normal 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
|
|
@ -422,6 +422,16 @@ schedule { 'never':
|
||||||
require => File['/root/.ssh/bsc_dev'],
|
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':
|
file { '/var/rhizomatica/rccn/config_values.py':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
content => template('rhizo_base/config_values.py.erb'),
|
content => template('rhizo_base/config_values.py.erb'),
|
||||||
|
|
|
@ -38,7 +38,7 @@ class rhizo_base::osmocom {
|
||||||
ensure => 'absent'
|
ensure => 'absent'
|
||||||
}
|
}
|
||||||
|
|
||||||
package { 'collectd':
|
package { [ 'collectd', 'libxml2-utils' ]:
|
||||||
ensure => 'installed',
|
ensure => 'installed',
|
||||||
install_options => ['--no-install-recommends'],
|
install_options => ['--no-install-recommends'],
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,13 @@ log stderr
|
||||||
logging level ljibuf notice
|
logging level ljibuf notice
|
||||||
logging level lrspro 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
|
line vty
|
||||||
no login
|
no login
|
||||||
|
|
|
@ -52,7 +52,13 @@ log stderr
|
||||||
logging level lns error
|
logging level lns error
|
||||||
logging level lbssgp 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
|
line vty
|
||||||
no login
|
no login
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue