typo in ionosphere.service + check_containers.sh

This commit is contained in:
nitramiz 2019-06-17 11:03:18 -07:00
parent 43bb58792d
commit 6bb327293e
No known key found for this signature in database
GPG key ID: 2352C35346C5D534

View file

@ -40,14 +40,14 @@ write_files:
RUNNING_CONT="$$(docker ps --format '{{.Names}}' | tr '\n' ', ' | sed -e 's/,$//g')" RUNNING_CONT="$$(docker ps --format '{{.Names}}' | tr '\n' ', ' | sed -e 's/,$//g')"
# If less than 10 are running, send alert to opsgenie # If less than 10 are running, send alert to opsgenie
if [ $${NUM_CONT} != '10' ] if [ $${NUM_CONT} != '9' ]
then then
curl -s -X POST https://api.opsgenie.com/v2/alerts \ curl -s -X POST https://api.opsgenie.com/v2/alerts \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: GenieKey ${opsgenie_key}" \ -H "Authorization: GenieKey ${opsgenie_key}" \
-d \ -d \
'{ '{
"message": "Satellite API instance does not have all 10 containers running", "message": "Satellite API instance does not have all 9 containers running",
"alias": "satapi-missing-containers", "alias": "satapi-missing-containers",
"description":"Currently running '$${NUM_CONT}'/10: '$${RUNNING_CONT}'", "description":"Currently running '$${NUM_CONT}'/10: '$${RUNNING_CONT}'",
"tags": ["SatAPI","Critical"], "tags": ["SatAPI","Critical"],
@ -207,7 +207,7 @@ write_files:
Environment=HOME=/home/bs Environment=HOME=/home/bs
ExecStartPre=/usr/bin/docker pull ${ionosphere_docker} ExecStartPre=/usr/bin/docker pull ${ionosphere_docker}
ExecStartPre=/sbin/iptables -A INPUT -p tcp -s 10.138.0.0/16 --dport 9292 -j ACCEPT ExecStartPre=/sbin/iptables -A INPUT -p tcp -s 10.138.0.0/16 --dport 9292 -j ACCEPT
ExecStopPost=/sbin/iptables -A INPUT -p tcp -s 10.138.0.0/16 --dport 4500 -j ACCEPT ExecStartPre=/sbin/iptables -A INPUT -p tcp -s 10.138.0.0/16 --dport 4500 -j ACCEPT
ExecStartPre=/usr/bin/docker run \ ExecStartPre=/usr/bin/docker run \
--user root \ --user root \
-v /mnt/disks/data/ionosphere:/data \ -v /mnt/disks/data/ionosphere:/data \