Description

The customer is subscribing to the MX304 router to retrieve telemetry statistics.


Path: /junos/system/linecard/firewall/

https://apps.juniper.net/telemetry-explorer/search?q=Firewall


The goal is to retrieve Ingress and Egress counters for:

* out-of-spec-bytes

/junos/firewall_stats/state/policer_stats/out-of-spec-bytes


* out-of-spec-packets

/junos/firewall_stats/state/policer_stats/out-of-spec-packets


Upon checking the logs, I can see the following:


* Egress:

```

key: __prefix__

str_value: /junos/firewall[name=\'ae1.1121-inet-o\']/

key: state/timestamp

uint_value: 1745566609

key: state/policer[name=\'POLICER-VIF-50M-filter-ae1.1121-inet-o\']/out-of-spec-packets

uint_value: 1077843

key: state/policer[name=\'POLICER-VIF-50M-filter-ae1.1121-inet-o\']/out-of-spec-bytes

uint_value: 9675555644

```



* Ingress:

```

key: __prefix__

str_value: /junos/firewall[name=\'POLICER-INPUT-FILTER-VIF-50M-ae2.1119-i\']/

key: state/timestamp

uint_value: 1745566609

key: state/policer[name=\'POLICER-VIF-50M-filter-ae2.1119-i\']/out-of-spec-packets

uint_value: 265

key: state/policer[name=\'POLICER-VIF-50M-filter-ae2.1119-i\']/out-of-spec-bytes

uint_value: 2378905

```


As you can compare, the are clear differences in the "str_value" for the path.


Symptoms

The outbound path shows: str_value: /junos/firewall[name=\'ae1.1121-inet-o\']/

While the ingress path shows: str_value: /junos/firewall[name=\'POLICER-INPUT-FILTER-VIF-50M-ae2.1119-i\']/


Solution

The naming convention changes if the filter is an individual one or a filter-list:

 

Filter-list: https://www.juniper.net/documentation/us/en/software/junos/routing-policy/topics/concept/firewall-filter-option-multiple-listed-overview.html#understanding-multiple-firewall-filters-applied-as-a-list__d42323e93

 

Individual filters/policers: https://www.juniper.net/documentation/us/en/software/junos/routing-policy/topics/concept/firewall-filter-option-interface-specific-instances-overview.html#interface-specific-firewall-filter-instances-overview__d41804e54

 

Also, the behavior should be general for Junos.

Modification History

2025-05-01 : Article Created