import json


def get_req_str(template: str, hub_id: str, seq_number: int, monitor_name: str) -> str:
    """
    Returns phoenix request string, built from the given template and hub_id.

    Args:
        template(str): template file
        hub_id(str): hub_id
        seq_number(int): message's sequence number starting from 1
        monitor_name(str): display name of this monitor program

    Returns:
        str: Phoenix request string after replacement
    """
    with open(template) as template_file:
        template_str = template_file.read()
        json_str = template_str.replace("{$hub_id}", hub_id)
        json_str = json_str.replace("{$seq_num}", str(seq_number))
        json_str = json_str.replace("{$monitor_name}", monitor_name)
        json_data = json.loads(json_str)
        return json.dumps(json_data)