cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
309
Views
1
Helpful
2
Replies

Get L3Out unicast bytes agg via rest api

renderman
Level 1
Level 1

Hi Guys,

How to get L3Out ingress / egress stats via REST API, I'm unable find the reference in the API documentation.

Screenshot 2024-03-25 125712.png

1 Accepted Solution

Accepted Solutions

mfr-6
Spotlight
Spotlight

Hi @renderman 

In GUI, right click on your L3Out object and click "Open in Object Store Browser". Click on a "show stats" button

mfr6_0-1711350522682.png


Visore will show you all statistics classes that are attached to this L3Out. Example:
mfr6_1-1711350607786.png
Now you know the class names - you can query them directly to get the statistics you need.

 

/api/node/mo/uni/tn-<tenant name>/out-<l3out name>/CDl2IngrPktsAg15min.json?query-target=self

 

Example response:

 

{
    "totalCount": "1",
    "imdata": [
        {
            "l2IngrPktsAg15min": {
                "attributes": {
                    "childAction": "",
                    "cnt": "1",
                    "dn": "uni/tn-xxx/out-xxx/CDl2IngrPktsAg15min",
                    "dropCum": "200006186",
                    "dropPer": "13628",
                    "dropRate": "45.330717",
                    "dropSpct": "0",
                    "dropThr": "",
                    "dropTr": "0",
                    "dropTrBase": "40767",
                    "floodCum": "0",
                    "floodPer": "0",
                    "floodRate": "0.000000",
                    "floodSpct": "0",
                    "floodThr": "",
                    "floodTr": "0",
                    "floodTrBase": "0",
                    "lastCollOffset": "300",
                    "multicastCum": "0",
                    "multicastPer": "0",
                    "multicastRate": "0.000000",
                    "multicastSpct": "0",
                    "multicastThr": "",
                    "multicastTr": "0",
                    "multicastTrBase": "0",
                    "repIntvEnd": "2024-03-25T08:04:58.638+01:00",
                    "repIntvStart": "2024-03-25T07:59:58.003+01:00",
                    "status": "",
                    "unicastCum": "6170512066289",
                    "unicastPer": "298627290",
                    "unicastRate": "993321.768922",
                    "unicastSpct": "0",
                    "unicastThr": "",
                    "unicastTr": "0",
                    "unicastTrBase": "806665933"
                }
            }
        }
    ]
}

 

And I believe you are looking for: l2EgrBytes and l2IngrBytes

Mateusz Frak NetDevOps | DevNet | Automation
Please mark this post as helpful if it solves your issue, to make this visible for other users, thank you!

View solution in original post

2 Replies 2

mfr-6
Spotlight
Spotlight

Hi @renderman 

In GUI, right click on your L3Out object and click "Open in Object Store Browser". Click on a "show stats" button

mfr6_0-1711350522682.png


Visore will show you all statistics classes that are attached to this L3Out. Example:
mfr6_1-1711350607786.png
Now you know the class names - you can query them directly to get the statistics you need.

 

/api/node/mo/uni/tn-<tenant name>/out-<l3out name>/CDl2IngrPktsAg15min.json?query-target=self

 

Example response:

 

{
    "totalCount": "1",
    "imdata": [
        {
            "l2IngrPktsAg15min": {
                "attributes": {
                    "childAction": "",
                    "cnt": "1",
                    "dn": "uni/tn-xxx/out-xxx/CDl2IngrPktsAg15min",
                    "dropCum": "200006186",
                    "dropPer": "13628",
                    "dropRate": "45.330717",
                    "dropSpct": "0",
                    "dropThr": "",
                    "dropTr": "0",
                    "dropTrBase": "40767",
                    "floodCum": "0",
                    "floodPer": "0",
                    "floodRate": "0.000000",
                    "floodSpct": "0",
                    "floodThr": "",
                    "floodTr": "0",
                    "floodTrBase": "0",
                    "lastCollOffset": "300",
                    "multicastCum": "0",
                    "multicastPer": "0",
                    "multicastRate": "0.000000",
                    "multicastSpct": "0",
                    "multicastThr": "",
                    "multicastTr": "0",
                    "multicastTrBase": "0",
                    "repIntvEnd": "2024-03-25T08:04:58.638+01:00",
                    "repIntvStart": "2024-03-25T07:59:58.003+01:00",
                    "status": "",
                    "unicastCum": "6170512066289",
                    "unicastPer": "298627290",
                    "unicastRate": "993321.768922",
                    "unicastSpct": "0",
                    "unicastThr": "",
                    "unicastTr": "0",
                    "unicastTrBase": "806665933"
                }
            }
        }
    ]
}

 

And I believe you are looking for: l2EgrBytes and l2IngrBytes

Mateusz Frak NetDevOps | DevNet | Automation
Please mark this post as helpful if it solves your issue, to make this visible for other users, thank you!

renderman
Level 1
Level 1

Hi mfr-6,

Awesome works like a charm, thank you.