-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
261 additions
and
120 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
{ | ||
"name":"simplerest", | ||
"tags":["bdp","nothing","aalto"], | ||
"port": 3000, | ||
"address":"192.168.2.14", | ||
"check": { | ||
"id": "checksimplerest", | ||
"name": "Simple Status", | ||
"args": ["curl","http://localhost:3000/health"], | ||
"interval": "20s", | ||
"timeout": "10s" | ||
} | ||
} | ||
"name": "simplerest", | ||
"tags": [ | ||
"bdp", | ||
"nothing", | ||
"aalto" | ||
], | ||
"port": 3000, | ||
"address": "192.168.8.106", | ||
"check": { | ||
"id": "checksimplerest", | ||
"name": "Simple Status", | ||
"args": [ | ||
"curl", | ||
"http://192.168.8.106:3000/health" | ||
], | ||
"interval": "20s", | ||
"timeout": "10s" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
#example: -datacenter=aaltocs -data-dir=/tmp/consul -bind=0.0.0.0 - | ||
#example: -datacenter=aaltocs -node=cse4640 -data-dir=/tmp/consul -bind=0.0.0.0 - | ||
/opt/consul/consul agent -enable-script-checks -datacenter=$1 -node $2 -data-dir=$3 -bind=$4 -server -dev |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
#!/usr/bin/python3 | ||
import argparse | ||
from pymongo import MongoClient | ||
import sys | ||
## Just hardcode | ||
client = MongoClient(sys.argv[1]) | ||
result=client.db_name.command('ping') | ||
if result is None: | ||
print("Problem") | ||
sys.exit(2) | ||
sys.exit (0) | ||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('--service_url', default='mongodb://localhost:27017',help='URL of the server') | ||
args = parser.parse_args() | ||
url =args.service_url | ||
if url: | ||
client = MongoClient(url) | ||
result=client.db_name.command('ping') | ||
if result is None: | ||
print("Problem") | ||
sys.exit(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters