Skip to content
Snippets Groups Projects
panel_target.json.j2 2.16 KiB
Newer Older
{
    "alias": "{{ alias }}",
    "groupBy": [
        {% if not percentile %}
        {
            "params": ["5m"],
            "type": "time"
        },
        {
            "params": ["linear"],
            "type": "fill"
        }
        {% endif %}
    ],
    {% if measurement %}
    "measurement": "{{ measurement }}",
    {% else %}
    "measurement": "interface_rates",
    {% endif %}
    "orderByTime": null,
    "policy": null,
    "refId": "{{ refId }}",
    "resultFormat": "time_series",
    "select": [
        [
            {
                "params": ["{{ select_field }}"],
                "type": "field"
            },
        {% if not percentile %}
            {
                "params": [],
                "type": "mean"
        {% else %}
            {
                "params": [95],
                "type": "percentile"
                "params": ["*8"],
                "type": "math"
            }
        {% if isp %}
        {
            "condition": null,
            "key": "tag",
            "value": "{{ interface_tag }}"
        },
        {
            "condition": "AND",
            "key": "isp",
            "value": "{{ isp }}"
        },
        {
            "condition": "AND",
            "key": "nren",
            "operator": "=",
            "value": "{{ nren }}"
        {% elif subscription %}
        {
            "condition": null,
            "key": "hostname",
            "operator": "=",
            "value": "{{ hostname }}"
        },
        {
            "condition": "AND",
            "key": "subscription",
            "operator": "=",
            "value": "{{ subscription }}"
        }
        {% else %}
        {
            "condition": null,
            "key": "hostname",
            "operator": "=",
            "value": "{{ hostname }}"
        },
        {
            "condition": "AND",
            "key": "interface_name",
            "operator": "=",
            "value": "{{ interface }}"