Beispiel #1
0
def render_dashboard_progress():
    valid_integrations = sorted(get_valid_integrations())
    total_integrations = len(valid_integrations)
    integrations_with_dashboard = 0

    lines = [
        '## Dashboards',
        '',
        '!!! note',
        '    This is not representative of _all_ dashboards, as many exist in legacy locations.',
        '',
        None,
        '',
        '??? check "Completed"',
    ]

    for integration in valid_integrations:
        if has_dashboard(integration):
            integrations_with_dashboard += 1
            status = 'X'
        else:
            status = ' '

        lines.append(f'    - [{status}] {integration}')

    percent = integrations_with_dashboard / total_integrations * 100
    formatted_percent = f'{percent:.2f}'
    lines[5] = f'[={formatted_percent}% "{formatted_percent}%"]'
    return lines
Beispiel #2
0
def render_dashboard_progress():
    valid_integrations = sorted(
        set(get_valid_integrations()).difference(DASHBOARD_NOT_POSSIBLE))
    total_integrations = len(valid_integrations)
    integrations_with_dashboard = 0

    lines = [
        '## Dashboards',
        '',
        '',
        '',
        '',
        None,
        '',
        '??? check "Completed"',
    ]

    for integration in valid_integrations:
        if 'snmp' in integration:
            continue
        if has_dashboard(integration):
            integrations_with_dashboard += 1
            status = 'X'
        else:
            status = ' '

        lines.append(f'    - [{status}] {integration}')

    percent = integrations_with_dashboard / total_integrations * 100
    formatted_percent = f'{percent:.2f}'
    lines[5] = f'[={formatted_percent}% "{formatted_percent}%"]'
    lines[
        7] = f'??? check "Completed {integrations_with_dashboard}/{total_integrations}"'
    return lines
Beispiel #3
0
def render_dashboard_progress():
    # Integrations that either do not emit metrics or have a too customer-specific setup to have an OOTBD
    not_possible = {
        'agent_metrics',  # Not for the end user
        'snmp',  # Too custom
        'openmetrics',  # No default metrics
        'pdh_check',  # No default metrics
        'prometheus',  # No default metrics
        'teamcity',  # No metrics
        'windows_service',  # No metrics
        'win32_event_log',  # No metrics
        'wmi_check',  # No default metrics
        'windows_service'  # No metrics
    }
    valid_integrations = sorted(
        set(get_valid_integrations()).difference(not_possible))
    total_integrations = len(valid_integrations)
    integrations_with_dashboard = 0

    lines = [
        '## Dashboards',
        '',
        '',
        '',
        '',
        None,
        '',
        '??? check "Completed"',
    ]

    for integration in valid_integrations:
        if 'snmp' in integration:
            continue
        if has_dashboard(integration):
            integrations_with_dashboard += 1
            status = 'X'
        else:
            status = ' '

        lines.append(f'    - [{status}] {integration}')

    percent = integrations_with_dashboard / total_integrations * 100
    formatted_percent = f'{percent:.2f}'
    lines[5] = f'[={formatted_percent}% "{formatted_percent}%"]'
    lines[
        7] = f'??? check "Completed {integrations_with_dashboard}/{total_integrations}"'
    return lines