Merge "[COMMON] Add monitoring to postgres"
[oom.git] / kubernetes / consul / resources / config / consul-agent-config / scripts / sdnc-cluster-health.sh
old mode 100644 (file)
new mode 100755 (executable)
index d328d04..ed7aefc
@@ -1,4 +1,5 @@
 #!/bin/sh
+{{/*
 
 # Copyright © 2018 Amdocs
 # Modifications Copyright © 2018 AT&T
@@ -14,6 +15,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+*/}}
 
 # query ODL cluster state
 USERNAME="{{.Values.odl.jolokia.username}}"
@@ -28,7 +30,7 @@ fi
 for instance in $(seq $count);do
   shard=member-$(( $siteId*$count + $instance ))-shard-default-config
   mbean=Category=Shards,name=$shard,type=DistributedConfigDatastore
-  url=http://{{.Release.Name}}-sdnc-$(( $instance-1 )).sdnc-cluster.{{.Release.Namespace}}:8181/jolokia/read/org.opendaylight.controller:$mbean
+  url=http://{{ include "common.release" . }}-sdnc-$(( $instance-1 )).sdnc-cluster.{{.Release.Namespace}}:8181/jolokia/read/org.opendaylight.controller:$mbean
 
   response=$( curl -s -u $USERNAME:$PASSWORD $url )
   rc=$?