3 enrichment_service_url=${1:-localhost:9082}
4 a1_sim_OSC_url=${2:-localhost:8085}
5 a1_sim_STD_url=${3:-localhost:8085}
6 a1_sim_STD_v2_url=${4:-localhost:8085}
7 policy_agent_url=${5:-localhost:8081}
8 a1_controller_url=${6:false}
10 echo -e "NONRTRIC HealthCheck\n"
11 echo "using enrichment service url: "$enrichment_service_url
12 echo "using a1-sim-OSC url: "$a1_sim_OSC_url
13 echo "using a1-sim-STD url: "$a1_sim_STD_url
14 echo "using a1-sim-STD-v2 url: "$a1_sim_STD_v2_url
15 echo "using policy agent url: "$policy_agent_url
16 if [ "$a1_controller_url" != "false" ]; then
17 echo "using a1 controller url: "$a1_controller_url
27 if [[ $res == *"$expect"* ]]; then
28 echo -e "$3 is alive!\n"
37 echo "check SIM1(OSC) status:"
38 checkStatus "curl -vskw %{http_code} http://$a1_sim_OSC_url/" "OK200" "SIM1"
41 echo "check SIM2(STD) status:"
42 checkStatus "curl -vskw %{http_code} http://$a1_sim_STD_url/" "OK200" "SIM2"
45 echo "check SIM3(STD) status:"
46 checkStatus "curl -vskw %{http_code} http://$a1_sim_STD_v2_url/" "OK200" "SIM3"
49 echo "check Policy Agent status:"
50 checkStatus "curl -vskw %{http_code} http://$policy_agent_url/status" "success200" "PMS"
53 echo "check Enrichment service status:"
54 checkStatus "curl -vskw %{http_code} http://$enrichment_service_url/status" '{"status":"hunky dory"' "ECS"
56 if [ "$a1_controller_url" != "false" ]; then
58 echo "check A1 Controller (SDNC) status:"
59 checkStatus "curl -s -o /dev/null -I -w %{http_code} http://$a1_controller_url/apidoc/explorer/" "200" "SDNC"
64 echo "NONRTRIC health check passed."