diff options
author | Yang (Gabriel) Yu <Gabriel.yuyang@huawei.com> | 2018-05-24 14:37:06 +0800 |
---|---|---|
committer | Yu Yang (Gabriel) <Gabriel.yuyang@huawei.com> | 2018-05-25 07:34:47 +0000 |
commit | dba21d5d8e56ee647de0e167bd106426be734c2f (patch) | |
tree | e79baabd1d31b9942ba4e8d636454f5477aa17d1 /monitor/monitoring.sh | |
parent | 316f53716106bbcff780761ee1d24a610cc0e925 (diff) |
add openstack-export support
add openstack-exporter and enable ovs plugin in Barometer
Changes:
1. Add openstack-exporter docker
2. Add opnestack grafana dashboard
Change-Id: Ifd3416ad1dc48075e98c190b2048c7760f686bcb
Signed-off-by: Yang (Gabriel) Yu <Gabriel.yuyang@huawei.com>
(cherry picked from commit b1b458428b644e0df7957e3137bc75d658d68ab1)
Diffstat (limited to 'monitor/monitoring.sh')
-rw-r--r-- | monitor/monitoring.sh | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/monitor/monitoring.sh b/monitor/monitoring.sh index 524958a6..0a450b7f 100644 --- a/monitor/monitoring.sh +++ b/monitor/monitoring.sh @@ -7,24 +7,12 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -set -e - MONITOR_CONFIG="/home/opnfv/bottlenecks/monitor/config" DISPATCH="/home/opnfv/bottlenecks/monitor/dispatch" - # INSTALL GRAFANA + PROMETHEUS + CADVISOR + BAROMETER on the JUMPERSERVER # # Node-Exporter -sudo docker run --name bottlenecks-node-exporter \ - -d -p 9100:9100 \ - -v "/proc:/host/proc:ro" \ - -v "/sys:/host/sys:ro" \ - -v "/:/rootfs:ro" \ - --net="host" \ - quay.io/prometheus/node-exporter:v0.14.0 \ - -collector.procfs /host/proc \ - -collector.sysfs /host/sys \ - -collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)" +echo == installation of monitoring module is started == # # Collectd # # Configure IP Address in collectd server configuration @@ -35,20 +23,35 @@ sudo docker run --name bottlenecks-node-exporter \ # -v /proc:/mnt/proc:ro \ # fr3nd/collectd:5.5.0-1 -echo == installation of monitoring module is started == - set +e +# Prometheus +sudo docker run --name bottlenecks-prometheus \ + -d -p 9090:9090 \ + -v ${MONITOR_CONFIG}/prometheus.yaml:/etc/prometheus/prometheus.yml \ + prom/prometheus:v1.7.1 + # Collectd-Exporter sudo docker run --name bottlenecks-collectd-exporter \ -d -p 9103:9103 -p 25826:25826/udp \ prom/collectd-exporter:0.3.1 \ -collectd.listen-address=":25826" -# Prometheus -sudo docker run --name bottlenecks-prometheus \ - -d -p 9090:9090 \ - -v ${MONITOR_CONFIG}/prometheus.yaml:/etc/prometheus/prometheus.yml \ - prom/prometheus:v1.7.1 +sudo docker run --name bottlenecks-node-exporter \ + -d -p 9100:9100 \ + -v "/proc:/host/proc:ro" \ + -v "/sys:/host/sys:ro" \ + -v "/:/rootfs:ro" \ + --net="host" \ + quay.io/prometheus/node-exporter:v0.14.0 \ + -collector.procfs /host/proc \ + -collector.sysfs /host/sys \ + -collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)" + +# Openstack-Exporter +sudo docker run --name bottlenecks-openstack-exporter \ + -v /tmp:/tmp \ + -p 9104:9104 --env-file ${MONITOR_CONFIG}/openstack_exporter.conf \ + -d gabrielyuyang/att-prometheus-openstack-exporter:latest # Grafana sudo docker run --name bottlenecks-grafana \ @@ -59,7 +62,7 @@ sudo docker run --name bottlenecks-grafana \ set -e sleep 5 -python dashboard/automated_dashboard_datasource.py +python ${DISPATCH}/../dashboard/automated_dashboard_datasource.py set +e # Cadvisor @@ -74,6 +77,7 @@ sudo docker run \ --name=bottlenecks-cadvisor \ google/cadvisor:v0.25.0 + set -e # Barometer # Configure IP Address in barometer server configuration @@ -83,19 +87,19 @@ python ${DISPATCH}/server_ip_configure.py ${MONITOR_CONFIG}/barometer_server.con set +e # Install on jumpserver docker pull opnfv/barometer -sudo docker run --name bottlenecks-barometer -tid --net=host \ +sudo docker run --name bottlenecks-barometer -d --net=host \ -v ${MONITOR_CONFIG}/barometer_server.conf:/src/barometer/src/collectd/collectd/src/collectd.conf \ -v ${MONITOR_CONFIG}/barometer_server.conf:/opt/collectd/etc/collectd.conf \ -v /var/run:/var/run \ -v /tmp:/tmp \ --privileged opnfv/barometer /run_collectd.sh - set -e # INSTALL BAROMETER + CADVISOR (+ COLLECTD) CLIENTS on COMPUTE/CONTROL NODES # Configure IP Address in barometer client configuration python ${DISPATCH}/client_ip_configure.py ${MONITOR_CONFIG}/barometer_client.conf + # Automate Barometer client installation python ${DISPATCH}/automate_barometer_client.py |