Commit bb671dcb authored by Sagar Arora's avatar Sagar Arora 🚴🏻
Browse files

Healthchecks

parent e7f705c9
#!/bin/bash
set -eo pipefail
STATUS=0
AMF_PORT_FOR_NGAP=38412
AMF_PORT_FOR_N11_HTTP=80
AMF_IP_NGAP_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_NGAP | grep inet | awk {'print $2'})
AMF_IP_N11_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_N11 | grep inet | awk {'print $2'})
N2_PORT_STATUS=$(netstat -Snpl | grep -o "$AMF_IP_NGAP_INTERFACE:$AMF_PORT_FOR_NGAP")
N11_PORT_STATUS=$(netstat -tnpl | grep -o "$AMF_IP_N11_INTERFACE:$AMF_PORT_FOR_N11_HTTP")
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
NB_UNREPLACED_AT=`cat /openair-amf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
if [ $NB_UNREPLACED_AT -ne 0 ]; then
STATUS=1
echo "Healthcheck error: configuration file is not configured properly"
fi
if [[ -z $N2_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: N2 SCTP port $AMF_PORT_FOR_NGAP is not listening"
fi
if [[ -z $N11_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: N11/SBI TCP/HTTP port $AMF_PORT_FOR_N11_HTTP is not listening"
fi
host="${MYSQL_SERVER}"
user="${MYSQL_USER:-root}"
export MYSQL_PWD="${MYSQL_PASS}"
args=(
-h"$host"
-u"$user"
--silent
)
if ! command -v mysql &> /dev/null; then
echo "Installing mysql command"
apt update
apt-get -y install mysql-client
else
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
database_check=$(mysql -h$host -u$user -D oai_db --silent -e "SELECT * FROM users;")
if [[ -z $database_check ]]; then
echo "Healthcheck error: oai_db not populated"
STATUS=1
fi
STATUS=0
else
echo "Healthcheck error: Mysql port inactive"
STATUS=1
fi
fi
exit $STATUS
\ No newline at end of file
......@@ -4,24 +4,29 @@ services:
container_name: "mysql"
image: mysql:5.7
ports:
- 3306
command: --init-file /tmp/oai_db.sql
- 3306/tcp
volumes:
- ./oai_db.sql:/tmp/oai_db.sql:rw
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
environment:
- MYSQL_DATABASE=oai_db
- MYSQL_USER=test
- MYSQL_PASSWORD=test
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
5gcore:
ipv4_address: 192.168.68.6
oai_amf:
container_name: "oai_amf"
image: oai_amf:1.0
oai-amf:
container_name: "oai-amf"
image: oai-amf:develop
ports:
- 38412
- 80
- 38412/sctp
- 80/tcp
environment:
- INSTANCE=0
- PID_DIRECTORY=/var/run
......@@ -52,7 +57,7 @@ services:
- SMF_INSTANCE_ID_1=2
- SMF_IPV4_ADDR_1=192.168.68.3
- SMF_HTTP_VERSION_1=v1
- MYSQL_SERVER=mysql
- MYSQL_SERVER=192.168.68.6
- MYSQL_USER=root
- MYSQL_PASS=linux
- MYSQL_DB=oai_db
......@@ -60,52 +65,67 @@ services:
- NRF_IPV4_ADDRESS=192.168.68.4
- NRF_PORT=80
- NRF_API_VERSION=v1
- AUSF_IPV4_ADDRESS=192.168.68.10
- AUSF_IPV4_ADDRESS=127.0.0.1
- AUSF_PORT=80
- AUSF_API_VERSION=v1
depends_on:
- mysql
- oai_nrf
- oai-nrf
volumes:
- ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks:
5gcore:
ipv4_address: 192.168.68.2
oai_smf:
container_name: "oai_smf"
image: oai_smf:1.0
oai-smf:
container_name: "oai-smf"
image: oai-smf:develop
ports:
- 80
- 80/tcp
- 9090/tcp
environment:
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=8080
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=8081
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=192.168.106.12
- DEFAULT_DNS_SEC_IPV4_ADDRESS=192.168.106.10
- DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129
- DEFAULT_DNS_SEC_IPV4_ADDRESS=8.8.8.8
- AMF_IPV4_ADDRESS=192.168.68.2
- AMF_PORT=8082
- AMF_PORT=80
- AMF_API_VERSION=v1
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=8083
- UDM_PORT=80
- UDM_API_VERSION=v1
- UPF_IPV4_ADDRESS=192.168.68.5
- NRF_IPV4_ADDRESS=192.168.68.4
- NRF_PORT=80
- NRF_API_VERSION=v1
depends_on:
- oai_nrf
- oai_amf
- oai-nrf
- oai-amf
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
5gcore:
ipv4_address: 192.168.68.3
oai_nrf:
container_name: "oai_nrf"
image: oai_nrf:1.0
oai-nrf:
container_name: "oai-nrf"
image: oai-nrf:develop
ports:
- 80
- 9090
- 80/tcp
- 9090/tcp
environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80
......@@ -116,35 +136,44 @@ services:
networks:
5gcore:
ipv4_address: 192.168.68.4
oai_spgwu:
container_name: "oai_spgwu"
image: oai_sgpwu:1.0
volumes:
- ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
oai-spgwu:
container_name: "oai-spgwu"
image: oai-spgwu:develop
ports:
- 2152
- 8805
- 2152/udp
- 8805/udp
environment:
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=192.168.22.0/24
- THREAD_S1U_PRIO=9090
- S1U_THREADS=16
- THREAD_SX_PRIO=64
- SX_THREADS=1
- THREAD_SGI_PRIO=64
- SGI_THREADS=16
- NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.68.3
- BYPASS_UL_PFCP_RULES=no
- NRF_IPV4_ADDRESS=192.168.68.4
- NRF_PORT=80
- NRF_API_VERSION=v1
depends_on:
- oai_smf
- oai-smf
cap_add:
- NET_ADMIN
- SYS_ADMIN
cap_drop:
- ALL
privileged: true
volumes:
- ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
5gcore:
ipv4_address: 192.168.68.5
......@@ -153,4 +182,4 @@ networks:
driver: bridge
ipam:
config:
- subnet: 192.168.68.0/24
\ No newline at end of file
- subnet: 192.168.68.0/24
......@@ -4,24 +4,29 @@ services:
container_name: "mysql"
image: mysql:5.7
ports:
- 3306
command: --init-file /tmp/oai_db.sql
- 3306/tcp
volumes:
- ./oai_db.sql:/tmp/oai_db.sql:rw
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
environment:
- MYSQL_DATABASE=oai_db
- MYSQL_USER=test
- MYSQL_PASSWORD=test
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
5gcore:
ipv4_address: 192.168.68.6
oai_amf:
container_name: "oai_amf"
image: oai_amf:1.0
oai-amf:
container_name: "oai-amf"
image: oai-amf:develop
ports:
- 38412
- 80
- 38412/sctp
- 80/tcp
environment:
- INSTANCE=0
- PID_DIRECTORY=/var/run
......@@ -52,7 +57,7 @@ services:
- SMF_INSTANCE_ID_1=2
- SMF_IPV4_ADDR_1=192.168.68.3
- SMF_HTTP_VERSION_1=v1
- MYSQL_SERVER=mysql
- MYSQL_SERVER=192.168.68.6
- MYSQL_USER=root
- MYSQL_PASS=linux
- MYSQL_DB=oai_db
......@@ -60,73 +65,92 @@ services:
- NRF_IPV4_ADDRESS=192.168.68.4
- NRF_PORT=80
- NRF_API_VERSION=v1
- AUSF_IPV4_ADDRESS=192.168.68.10
- AUSF_IPV4_ADDRESS=127.0.0.1
- AUSF_PORT=80
- AUSF_API_VERSION=v1
depends_on:
- mysql
- oai-nrf
volumes:
- ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks:
5gcore:
ipv4_address: 192.168.68.2
oai_smf:
container_name: "oai_smf"
image: oai_smf:1.0
oai-smf:
container_name: "oai-smf"
image: oai-smf:develop
ports:
- 80
- 80/tcp
- 9090/tcp
environment:
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=8080
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=8081
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=192.168.106.12
- DEFAULT_DNS_SEC_IPV4_ADDRESS=192.168.106.10
- DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129
- DEFAULT_DNS_SEC_IPV4_ADDRESS=8.8.8.8
- AMF_IPV4_ADDRESS=192.168.68.2
- AMF_PORT=8082
- AMF_PORT=80
- AMF_API_VERSION=v1
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=8083
- UDM_PORT=80
- UDM_API_VERSION=v1
- UPF_IPV4_ADDRESS=192.168.68.5
- NRF_IPV4_ADDRESS=192.168.68.4
- NRF_PORT=80
- NRF_API_VERSION=v1
depends_on:
- oai_amf
- oai-nrf
- oai-amf
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
5gcore:
ipv4_address: 192.168.68.3
oai_spgwu:
container_name: "oai_spgwu"
image: oai_sgpwu:1.0
oai-spgwu:
container_name: "oai-spgwu"
image: oai-spgwu:develop
ports:
- 2152
- 8805
- 2152/udp
- 8805/udp
environment:
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=192.168.22.0/24
- THREAD_S1U_PRIO=9090
- S1U_THREADS=16
- THREAD_SX_PRIO=64
- SX_THREADS=1
- THREAD_SGI_PRIO=64
- SGI_THREADS=16
- NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.68.3
- BYPASS_UL_PFCP_RULES=no
- NRF_IPV4_ADDRESS=192.168.68.4
- NRF_PORT=80
- NRF_API_VERSION=v1
depends_on:
- oai_smf
- oai-smf
cap_add:
- NET_ADMIN
- SYS_ADMIN
cap_drop:
- ALL
privileged: true
volumes:
- ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
5gcore:
ipv4_address: 192.168.68.5
......@@ -135,4 +159,4 @@ networks:
driver: bridge
ipam:
config:
- subnet: 192.168.68.0/24
\ No newline at end of file
- subnet: 192.168.68.0/24
#!/bin/bash
set -eo pipefail
if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
exit 0
fi
host="$(hostname --ip-address || echo '127.0.0.1')"
user="${MYSQL_USER:-root}"
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
args=(
# force mysql to not use the local "mysqld.sock" (test "external" connectivity)
-h"$host"
-u"$user"
--silent
)
STATUS=0
if command -v mysqladmin &> /dev/null; then
if mysqladmin "${args[@]}" ping > /dev/null; then
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
if [[ -z $database_check ]]; then
echo "Healthcheck error: oai_db not populated"
STATUS=1
fi
STATUS=0
else
echo "Healthcheck error: Mysql port inactive"
STATUS=1
fi
else
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
if [[ -z $database_check ]]; then
echo "Healthcheck error: oai_db not populated"
STATUS=1
fi
STATUS=0
else
echo "Healthcheck error: Mysql port inactive"
STATUS=1
fi
fi
exit $STATUS
#!/bin/bash
set -eo pipefail
STATUS=0
NRF_IP_SBI_INTERFACE=$(ifconfig $NRF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
NRF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$NRF_IP_SBI_INTERFACE:$NRF_INTERFACE_PORT_FOR_SBI")
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
NB_UNREPLACED_AT=`cat /openair-nrf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
if [ $NB_UNREPLACED_AT -ne 0 ]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
fi
if [[ -z $NRF_SBI_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $NRF_INTERFACE_PORT_FOR_SBI is not listening."
fi
exit $STATUS
\ No newline at end of file
......@@ -190,7 +190,7 @@ CREATE TABLE `users` (
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES ('20834123456789','380561234567','35609204079300',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,'+Eų\0,IHH',0,0,00000000000000000096,'PxX \Z1x','^KFeU'),('20810000001234','33611123456','35609204079299',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000281454575616225,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','4s@z~'),('31002890832150','33638060059','35611302209414',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012416,'`F݆Dϛ','4s@z~'),('001010123456789','33600101789','35609204079298',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'\0 \n \r',1,0,00000000000000000351,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','L*\\^] '),('208930000000001','33638030001','35609204079301',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208950000000002','33638050002','35609204079502',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000020471,'\0 \n \r','4s@z~'),('208950000000003','33638050003','35609204079503',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012343,'\0 \n \r','4s@z~'),('208950000000004','33638050004','35609204079504',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000005','33638050005','35609204079505',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000001','33638050001','35609204079501',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208950000000006','33638050006','35609204079506',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000007','33638050007','35609204079507',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208930000000002','33638030002','35609204079302',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208930000000003','33638030003','35609204079303',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208930000000004','33638030004','35609204079304',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208930000000005','33638030005','35609204079305',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208930000000006','33638030006','35609204079306',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208930000000007','33638030007','35609204079307',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000007','33638040007','35609204079407',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000006','33638040006','35609204079406',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000005','33638040005','35609204079405',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000004','33638040004','35609204079404',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000003','33638040003','35609204079403',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000002','33638040002','35609204079402',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000001','33638040001','35609204079401',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208920100001100','33638020001','35609204079201',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001101','33638020001','35609204079201',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000281044204937234,'\0 \n \r','$I6;+fku|'),('208920100001102','33638020002','35609204079202',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001103','33638020003','35609204079203',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001104','33638020004','35609204079204',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001105','33638020005','35609204079205',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001106','33638020006','35609204079206',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000000000000006103,'ebd07771ace8677a','$I6;+fku|'),('208920100001107','33638020007','35609204079207',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001108','33638020008','35609204079208',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001109','33638020009','35609204079209',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001110','33638020010','35609204079210',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208930100001111','33638030011','35609304079211',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208930100001112','33638030012','35609304079212',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208930100001113','33638030013','35609304079213',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006263,'SNܒIve6','4s@z~'),('208950000000008','33638050008','35609204079508',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000009','33638050009','35609204079509',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000010','33638050010','35609204079510',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000011','33638050011','35609204079511',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000012','33638050012','35609204079512',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000013','33638050013','35609204079513',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000014','33638050014','35609204079514',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000015','33638050015','35609204079515',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000000000,'3536663032363164','4s@z~'),('208920100001118','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000281044204934762,'~?03u-%eyy','$I6;+fku|'),('208920100001121','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000281044204935293,'&@xg]\nVp','$I6;+fku|'),('208920100001119','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000281044204935293,'269482407867805d','$I6;+fku|'),('208920100001120','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000281044204935293,'3236393438323430','$I6;+fku|');
INSERT INTO `users` VALUES ('20834123456789','380561234567','35609204079300',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,'+Eų\0,IHH',0,0,00000000000000000096,'PxX \Z1x','^KFeU'),('20810000001234','33611123456','35609204079299',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000281454575616225,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','4s@z~'),('31002890832150','33638060059','35611302209414',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012416,'`F݆Dϛ','4s@z~'),('001010123456789','33600101789','35609204079298',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'\0 \n \r',1,0,00000000000000000351,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','L*\\^] '),('208930000000001','33638030001','35609204079301',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208950000000002','33638050002','35609204079502',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000020471,'\0 \n \r','4s@z~'),('208950000000003','33638050003','35609204079503',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012343,'\0 \n \r','4s@z~'),('208950000000004','33638050004','35609204079504',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000005','33638050005','35609204079505',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000001','33638050001','35609204079501',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208950000000006','33638050006','35609204079506',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000007','33638050007','35609204079507',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208930000000002','33638030002','35609204079302',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208930000000003','33638030003','35609204079303',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208930000000004','33638030004','35609204079304',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208930000000005','33638030005','35609204079305',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208930000000006','33638030006','35609204079306',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208930000000007','33638030007','35609204079307',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000007','33638040007','35609204079407',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000006','33638040006','35609204079406',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000005','33638040005','35609204079405',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000004','33638040004','35609204079404',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000003','33638040003','35609204079403',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000002','33638040002','35609204079402',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208940000000001','33638040001','35609204079401',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'wqgzWЁZ]','4s@z~'),('208920100001100','33638020001','35609204079201',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001101','33638020001','35609204079201',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000281044204937234,'\0 \n \r','$I6;+fku|'),('208920100001102','33638020002','35609204079202',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001103','33638020003','35609204079203',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001104','33638020004','35609204079204',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001105','33638020005','35609204079205',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001106','33638020006','35609204079206',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000000000000006103,'ebd07771ace8677a','$I6;+fku|'),('208920100001107','33638020007','35609204079207',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001108','33638020008','35609204079208',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001109','33638020009','35609204079209',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208920100001110','33638020010','35609204079210',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208930100001111','33638030011','35609304079211',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208930100001112','33638030012','35609304079212',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006103,'ebd07771ace8677a','4s@z~'),('208930100001113','33638030013','35609304079213',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000006263,'SNܒIve6','4s@z~'),('208950000000008','33638050008','35609204079508',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000009','33638050009','35609204079509',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000010','33638050010','35609204079510',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000011','33638050011','35609204079511',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000012','33638050012','35609204079512',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000013','33638050013','35609204079513',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000014','33638050014','35609204079514',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000012215,'56f0261d9d051063','4s@z~'),('208950000000015','33638050015','35609204079515',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'G?/Д |hb',1,0,00000000000000000000,'3536663032363164','4s@z~'),('208920100001118','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000281044204934762,'~?03u-%eyy','$I6;+fku|'),('208920100001121','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000281044204935293,'&@xg]\nVp','$I6;+fku|'),('208920100001119','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000281044204935293,'269482407867805d','$I6;+fku|'),('208920100001120','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'kp~Љu{K',1,0,00000281044204935293,'3236393438323430','$I6;+fku|'),('208950000000031','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
......
#!/bin/bash
set -eo pipefail
STATUS=0
SMF_IP_SBI_INTERFACE=$(ifconfig $SMF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
SMF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$SMF_IP_SBI_INTERFACE:$SMF_INTERFACE_PORT_FOR_SBI")
NB_UNREPLACED_AT=`cat /openair-smf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
if [ $NB_UNREPLACED_AT -ne 0 ]; then
STATUS=-1
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
fi
if [[ -z $SMF_SBI_PORT_STATUS ]]; then
STATUS=-1
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $SMF_INTERFACE_PORT_FOR_SBI is not listening."
fi
exit $STATUS
\ No newline at end of file
#!/bin/bash
set -eo pipefail
STATUS=0
SGW_PORT_FOR_S1U_S12_S4_UP=2152
SGW_PORT_FOR_SX=8805
SGW_IP_S1U_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP | grep inet | awk {'print $2'})
SGW_IP_SX_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_SX | grep inet | awk {'print $2'})
S1U_S12_S4_UP_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_S1U_INTERFACE:$SGW_PORT_FOR_S1U_S12_S4_UP")
SX_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_SX_INTERFACE:$SGW_PORT_FOR_SX")
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
NB_UNREPLACED_AT=`cat /openair-spgwu/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
if [ $NB_UNREPLACED_AT -ne 0 ]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
fi
if [[ -z $S1U_S12_S4_UP_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY S1U port $SGW_PORT_FOR_S1U_S12_S4_UP is not listening."
fi