aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuel-plugin/deployment_scripts
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-01-17 17:16:27 -0800
committerGuo Ruijing <ruijing.guo@intel.com>2017-01-18 19:25:47 -0500
commit43d5947f671a83d0658c5c0215f63c343781d92f (patch)
tree352eaaaa85d945dc76cd9d085be1e26ce8b4976d /src/fuel-plugin/deployment_scripts
parent92bb2e468b8f9e939ecf86f3d1ae652e96429d9d (diff)
add collectd feature attributes for fuel plugin
Change-Id: I26b70963644527e3f4dfa1c0c7442fe257fb0a97 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'src/fuel-plugin/deployment_scripts')
-rwxr-xr-xsrc/fuel-plugin/deployment_scripts/install.sh17
-rw-r--r--src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp9
2 files changed, 23 insertions, 3 deletions
diff --git a/src/fuel-plugin/deployment_scripts/install.sh b/src/fuel-plugin/deployment_scripts/install.sh
index 5491f340..08efca81 100755
--- a/src/fuel-plugin/deployment_scripts/install.sh
+++ b/src/fuel-plugin/deployment_scripts/install.sh
@@ -7,6 +7,10 @@ HOST=$1
OS_AUTH_URL=$2
OS_USERNAME=$3
OS_PASSWORD=$4
+enable_mcelog=$5
+enable_intel_rdt=$6
+enable_hugepages=$7
+enable_ovs_events=$8
CEILOMETER_URL_TYPE=${CEILOMETER_URL_TYPE:-internalURL}
CEILOMETER_TIMEOUT=${CEILOMETER_TIMEOUT:-1000}
@@ -66,7 +70,9 @@ cat << EOF > /etc/collectd/collectd.conf.d/collectd-ceilometer-plugin.conf
</Plugin>
EOF
-cat << EOF > /etc/collectd/collectd.conf.d/intel-rdt.conf
+if [ $enable_intel_rdt = 'true' ]
+then
+ cat << EOF > /etc/collectd/collectd.conf.d/intel-rdt.conf
<LoadPlugin intel_rdt>
Interval 1
</LoadPlugin>
@@ -75,8 +81,11 @@ cat << EOF > /etc/collectd/collectd.conf.d/intel-rdt.conf
Cores ""
</Plugin>
EOF
+fi
-cat << EOF > /etc/collectd/collectd.conf.d/hugepages.conf
+if [ $enable_hugepages = 'true' ]
+then
+ cat << EOF > /etc/collectd/collectd.conf.d/hugepages.conf
LoadPlugin hugepages
<Plugin hugepages>
@@ -87,7 +96,10 @@ LoadPlugin hugepages
ValuesPercentage false
</Plugin>
EOF
+fi
+if [ $enable_mcelog = 'true' ]
+then
cat << EOF > /etc/collectd/collectd.conf.d/mcelog.conf
<LoadPlugin mcelog>
Interval 1
@@ -96,5 +108,6 @@ cat << EOF > /etc/collectd/collectd.conf.d/mcelog.conf
McelogClientSocket "/var/run/mcelog-client"
</Plugin>
EOF
+fi
service collectd restart
diff --git a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp
index cd77016b..cbbfcad2 100644
--- a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp
+++ b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp
@@ -12,12 +12,19 @@ $ceilometer_hash = hiera_hash('ceilometer', {'user'=>'ceilometer'})
$auth_user = 'ceilometer'
$auth_password = $ceilometer_hash['user_password']
+
+$collectd_settings = hiera('fuel-plugin-collectd-ceilometer')
+$enable_mcelog = $collectd_settings['enable_mcelog']
+$enable_intel_rdt = $collectd_settings['enable_intel_rdt']
+$enable_hugepages = $collectd_settings['enable_hugepages']
+$enable_ovs_events = $collectd_settings['enable_ovs_events']
+
$exe_url = "http://${master_ip}:8080/plugins/fuel-plugin-collectd-ceilometer-1.0/deployment_scripts/install.sh"
if ($use_ceilometer) {
exec { "install collectd-ceilometer":
- command => "curl ${exe_url} | bash -s ${master_ip} ${auth_uri} ${auth_user} ${auth_password}",
+ command => "curl ${exe_url} | bash -s ${master_ip} ${auth_uri} ${auth_user} ${auth_password} ${enable_mcelog} ${enable_intel_rdt} ${enable_hugepages} ${enable_ovs_events}",
path => "/usr/bin:/usr/sbin:/bin:/sbin";
}
}