{
    <% set prj = prj|default('*') %>
    <% set rtcstage = rtcstage|default('*') %>
    <% set host = hosts|default('ASEARCH') %>
    <% set geo = geo|default('*') %>

    <% set vlan_list = [(688, 'MTN BB 688'), (788, 'MTN FB 788'), (700, 'HOST FB 700'), (761, 'FB 761')] %>

    <% set geo_tag = '' ~ ( ';geo=' ~ geo if geo is defined ) %>

    <% set rtc_tag = 'itype=runtimecloud'
        ~ ( ';rtcstage=' ~ rtcstage if rtcstage is defined )
        ~ ( ';prj=' ~ prj if prj is defined )
        ~ geo_tag %>

    <% set rtcsys_tag = 'itype=rtcsys'
        ~ ( ';rtcstage=' ~ rtcstage if rtcstage is defined )
        ~ ( ';prj=' ~ prj if prj is defined )
        ~ geo_tag %>



    "title": "rtc_system",
    "type": "panel",
    "editors": [],
    "charts": [
        {
            "type": "graphic",
            "title": "Network Drop pps",
            "description": "",
            "normalize": true,
            "stacked": false,
            "width": 2,
            "height": 1,
            "col": 1,
            "row": 1,
            "minValue" : 0,
            "yAxis": [
                {},
            ],
            "signals": [
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "sum(netstat-idrops-eth<0|1|2|3|4|5>_summ)",
                    "title": "Uplink RX Drop pps",
                    "yAxis": 0,
                    "normalizable": true
                },
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "sum(netstat-odrops-eth<0|1|2|3|4|5>_summ)",
                    "title": "Uplink TX Drop pps",
                    "yAxis": 0,
                    "normalizable": true
                },
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "sum(netstat-ierrs-eth<0|1|2|3|4|5>_summ)",
                    "title": "Uplink RX Error pps",
                    "yAxis": 0,
                    "normalizable": true
                },
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "sum(netstat-oerrs-eth<0|1|2|3|4|5>_summ)",
                    "title": "Uplink TX Error pps",
                    "yAxis": 0,
                    "normalizable": true
                },
    <% for vlan_id, vlan_name in vlan_list %>
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "netstat-idrops-vlan<< vlan_id >>_summ",
                    "title": "<< vlan_name >> RX Drop pps",
                    "yAxis": 0,
                    "normalizable": true
                },
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "netstat-odrops-vlan<< vlan_id >>_summ",
                    "title": "<< vlan_name >> TX Drop pps",
                    "yAxis": 0,
                    "normalizable": true
                },

                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "netstat-ierrs-vlan<< vlan_id >>_summ",
                    "title": "<< vlan_name >> RX Error pps",
                    "yAxis": 0,
                    "normalizable": true
                },
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "netstat-oerrs-vlan<< vlan_id >>_summ",
                    "title": "<< vlan_name >> TX Error pps",
                    "yAxis": 0,
                    "normalizable": true
                },
    <% endfor %>
            ]
        },

        {
            "type": "graphic",
            "width": 2,
            "height": 1,
            "col": 3,
            "row": 1,
            "title": "Qdisc drops",
            "normalize": true,
            "signals": [
                {
                    "title": "push-net_host_qdisc_drops_tmmv",
                    "color": "#37bff2",
                    "tag": "<<rtcsys_tag>>",
                    "host": "<<host>>",
                    "name": "push-net_host_qdisc_drops_tmmv",
                },
            ],
            "consts": []
        },
        {
            "type": "graphic",
            "width": 2,
            "height": 1,
            "col": 1,
            "row": 2,
            "title": "Retransmits, segs",
            "normalize": true,
            "signals": [
                {
                    "title": "push-net_total_retrans_segs_tmmv",
                    "color": "#37bff2",
                    "tag": "<<rtcsys_tag>>",
                    "host": "<<host>>",
                    "name": "push-net_total_retrans_segs_tmmv",
                },
            ],
            "consts": []
        },
        {
            "type": "graphic",
            "width": 2,
            "height": 1,
            "col": 3,
            "row": 2,
            "title": "Reordering",
            "normalize": true,
            "signals": [
                {
                    "title": "push-net_total_sack_reorder_tmmv",
                    "color": "#37bff2",
                    "tag": "<<rtcsys_tag>>",
                    "host": "<<host>>",
                    "name": "push-net_total_sack_reorder_tmmv"
                },
            ],
            "consts": []
        },
        {
            "type": "graphic",
            "title": "Network MBps",
            "description": "",
            "normalize": true,
            "stacked": false,
            "width": 2,
            "height": 1,
            "col": 1,
            "row": 3,
            "minValue" : 0,
            "yAxis": [
                {}
            ],
            "consts": [
                {
                    "value": 119.2,
                    "title": "1Gbps",
                },
            ],
            "signals": [
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "const(1192.0)",
                    "title": "10Gbps",
                    "yAxis": 0,
                    "normalizable": false
                },
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "conv(sum(netstat-ibytes-eth<0|1|2|3|4|5>_summ), Mi)",
                    "title": "Uplink RX MBps",
                    "yAxis": 0,
                    "normalizable": true
                },
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "conv(sum(netstat-obytes-eth<0|1|2|3|4|5>_summ), Mi)",
                    "title": "Uplink TX MBps",
                    "yAxis": 0,
                    "normalizable": true
                },
    <% for vlan_id, vlan_name in vlan_list %>
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "conv(netstat-ibytes-vlan<< vlan_id >>_summ, Mi)",
                    "title": "<< vlan_name >> RX MBps",
                    "yAxis": 0,
                    "normalizable": true
                },
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "conv(netstat-obytes-vlan<< vlan_id >>_summ, Mi)",
                    "title": "<< vlan_name >> TX MBps",
                    "yAxis": 0,
                    "normalizable": true
                },
    <% endfor %>
            ]
        },

        {
            "type": "graphic",
            "title": "Network pps",
            "description": "",
            "normalize": true,
            "stacked": false,
            "width": 2,
            "height": 1,
            "row": 3,
            "col": 3,
            "minValue" : 0,
            "yAxis": [
                {},
                {},
                {}
            ],
            "signals": [
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "sum(netstat-ipkts-eth<0|1|2|3|4|5>_summ)",
                    "title": "Uplink RX pps",
                    "yAxis": 0,
                    "normalizable": true
                },
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "sum(netstat-opkts-eth<0|1|2|3|4|5>_summ)",
                    "title": "Uplink TX pps",
                    "yAxis": 0,
                    "normalizable": true
                },
    <% for vlan_id, vlan_name in vlan_list %>
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "netstat-ipkts-vlan<< vlan_id >>_summ",
                    "title": "<< vlan_name >> RX pps",
                    "yAxis": 1,
                    "normalizable": true
                },
                {
                    "tag": "<< rtc_tag >>",
                    "host": "<< host >>",
                    "name": "netstat-opkts-vlan<< vlan_id >>_summ",
                    "title": "<< vlan_name >> TX pps",
                    "yAxis": 1,
                    "normalizable": true
                },
    <% endfor %>
            ]
        },
    ]

}
