2 ##############################################################################
3 # Copyright (c) 2019 Huawei Tech and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
11 promyml=~/prometheus.yml
18 if [ $count -gt $firstline ]; then
22 nodeip=$(echo ${nodeinfo} | cut -d"|" -f2)
34 cat <<EOF > "${promyml}"
40 - job_name: 'prometheus'
43 - targets: ['localhost:9090']
48 - targets: ['$workernodeip']