def monitor_spec(domain, master_ip, port, registry, tag):
    return {
        "id": "monitor",
        "container": {
            "type": "DOCKER",
            "docker": {
                "image": "%s/ufaldsg/cloud-asr-monitor:%s" % (registry, tag),
                "network": "BRIDGE",
                "portMappings": [
                    {"containerPort": 80, "hostPort": 0},
                    {"containerPort": 5681, "hostPort": port + 2}
                ]
            }
        },
        "instances": 1,
        "cpus": 0.25,
        "mem": 256,
        "env": {
            "MONITOR_ADDR": "tcp://0.0.0.0:5681"
        },
        "constraints": [["hostname", "LIKE", master_ip]]
    }
dataset/ETHPy150Open UFAL-DSG/cloud-asr/deployment/run_on_mesos.py/monitor_spec/original