(parser)
Add receiver monitoring options to parser
Add receiver monitoring options to parser
Add receiver monitoring options to parser
def add_to_parser(parser):
    """Add receiver monitoring options to parser"""
    m_p = parser.add_argument_group('receiver logging options')
    m_p.add_argument(
        '--log-scrolling',
        default=False,
        action='store_true',
        help='Print receiver logs line-by-line rather than repeatedly on the \
        same line')
    m_p.add_argument('--log-file',
                     default=False,
                     action='store_true',
                     help='Save receiver logs on a file')
    m_p.add_argument('--log-interval',
                     type=float,
                     default=1.0,
                     help="Logging interval in seconds")

    ms_p = parser.add_argument_group('receiver monitoring server options')
    ms_p.add_argument('--monitoring-server',
                      default=False,
                      action='store_true',
                      help='Run HTTP server to monitor the receiver')
    ms_p.add_argument('--monitoring-port',
                      default=defs.monitor_port,
                      type=int,
                      help='Monitoring server\'s port')

    r_p = parser.add_argument_group('receiver reporting options')
    r_p.add_argument('--report',
                     default=False,
                     action='store_true',
                     help='Report receiver metrics to a remote HTTP server')
    r_p.add_argument(
        '--report-dest',
        default=monitoring_api.metric_endpoint,
        help='Destination address in http://ip:port format. By default, '
        'report to Blockstream\'s Satellite Monitoring API')
    r_p.add_argument('--report-hostname', help='Reporter\'s hostname')
    r_p.add_argument(
        '--report-cert',
        default=None,
        help="Certificate for client-side authentication with the destination")
    r_p.add_argument(
        '--report-key',
        default=None,
        help="Private key for client-side authentication with the destination")
    r_p.add_argument(
        '--report-gnupghome',
        default=".gnupg",
        help="GnuPG home directory, by default created inside the config "
        "directory specified via --cfg-dir option. This option is used when "
        "reporting to Blockstream's Satellite Monitoring API only, where it "
        "determines the name of the directory (inside --cfg-dir) that holds "
        "the key for authentication with the API")
    r_p.add_argument(
        '--report-passphrase',
        default=None,
        help="Passphrase to the private GnuPG key used to sign receiver "
        "status reports sent to Blockstream's Satellite Monitoring API. If "
        "undefined (default), the program prompts for this passphrase instead."
    )
def add_to_parser ( parser ) : m_p = parser . add_argument_group ( 'receiver logging options' ) m_p . add_argument ( '--log-scrolling' , default = False , action = 'store_true' , help = 'Print receiver logs line-by-line rather than repeatedly on the \
        same line' ) m_p . add_argument ( '--log-file' , default = False , action = 'store_true' , help = 'Save receiver logs on a file' ) m_p . add_argument ( '--log-interval' , type = float , default = 1.0 , help = "Logging interval in seconds" ) ms_p = parser . add_argument_group ( 'receiver monitoring server options' ) ms_p . add_argument ( '--monitoring-server' , default = False , action = 'store_true' , help = 'Run HTTP server to monitor the receiver' ) ms_p . add_argument ( '--monitoring-port' , default = defs . monitor_port , type = int , help = 'Monitoring server\'s port' ) r_p = parser . add_argument_group ( 'receiver reporting options' ) r_p . add_argument ( '--report' , default = False , action = 'store_true' , help = 'Report receiver metrics to a remote HTTP server' ) r_p . add_argument ( '--report-dest' , default = monitoring_api . metric_endpoint , help = 'Destination address in http://ip:port format. By default, ' 'report to Blockstream\'s Satellite Monitoring API' ) r_p . add_argument ( '--report-hostname' , help = 'Reporter\'s hostname' ) r_p . add_argument ( '--report-cert' , default = None , help = "Certificate for client-side authentication with the destination" ) r_p . add_argument ( '--report-key' , default = None , help = "Private key for client-side authentication with the destination" ) r_p . add_argument ( '--report-gnupghome' , default = ".gnupg" , help = "GnuPG home directory, by default created inside the config " "directory specified via --cfg-dir option. This option is used when " "reporting to Blockstream's Satellite Monitoring API only, where it " "determines the name of the directory (inside --cfg-dir) that holds " "the key for authentication with the API" ) r_p . add_argument ( '--report-passphrase' , default = None , help = "Passphrase to the private GnuPG key used to sign receiver " "status reports sent to Blockstream's Satellite Monitoring API. If " "undefined (default), the program prompts for this passphrase instead." )