<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Correct yang path with gnmic in Tools</title>
    <link>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355039#M3784</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;Unfortunately I still get an error:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;% gnmic get --path '/Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts' --encoding json_ietf
target "ce1" Get request failed: "1.2.3.4:50052" GetRequest failed: rpc error: code = InvalidArgument desc = Invalid element name [ Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data ] : unexpected prefix[ Cisco-IOS-XE-qfp-stats-oper ]
Error: one or more requests failed&lt;/LI-CODE&gt;
&lt;P&gt;I also checked that the yang model appears in the capabilities of the router:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;...
  - Cisco-IOS-XE-qfp-classification-oper, Cisco Systems, Inc., 2022-11-01
  - Cisco-IOS-XE-qfp-crypto-dp-oper, Cisco Systems, Inc., 2022-11-01
  - Cisco-IOS-XE-qfp-resource-utilization-oper, Cisco Systems, Inc., 2022-11-01
  - Cisco-IOS-XE-qfp-stats-oper, Cisco Systems, Inc., 2022-11-01
...&lt;/LI-CODE&gt;
&lt;P&gt;Damien.&lt;/P&gt;</description>
    <pubDate>Sat, 13 Dec 2025 17:36:33 GMT</pubDate>
    <dc:creator>dbillon</dc:creator>
    <dc:date>2025-12-13T17:36:33Z</dc:date>
    <item>
      <title>Correct yang path with gnmic</title>
      <link>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355001#M3782</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to use &lt;STRONG&gt;gnmic&lt;/STRONG&gt; to gather some QFP stats on a Cisco C83000-1N1S-6T running IOS 17.12.04&lt;/P&gt;
&lt;P&gt;I managed to fetch simple counters like:&lt;/P&gt;
&lt;PRE&gt;gnmic get --path '/interfaces/interface[name=GigabitEthernet0/0/0]/state'&lt;/PRE&gt;
&lt;P&gt;But I can't figure out the right path to fetch a counter from&amp;nbsp;Cisco-IOS-XE-qfp-stats.yang.&lt;/P&gt;
&lt;P&gt;Even when I use "gnmic prompt" feature I don't get the requested values:&lt;/P&gt;
&lt;PRE&gt;% gnmic prompt --file /home/user01/10-gnmic/yang/vendor/cisco/xe/17121/Cisco-IOS-XE-qfp-stats.yang --suggest-with-origin
gnmic&amp;gt; &lt;STRONG&gt;get --path Cisco-IOS-XE-qfp-stats:/global-drop-statistics&lt;/STRONG&gt;
target "ce1" Get request failed: "1.2.3.4:50052" GetRequest failed: rpc error: code = OutOfRange desc = Unsupported Path::Origin value[ cisco-ios-xe-qfp-stats ] in Request
Error: one or more requests failed&lt;/PRE&gt;
&lt;P&gt;I successfully used Yang Suite to fetch a QFP value but I can't figure out how to translate this working RPC into a correct gnmic path:&lt;/P&gt;
&lt;PRE&gt;{
  "path": [
    {
      "origin": "rfc7951",
      "elem": [
        {
          "name": "Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data"
        },
        {
          "name": "location"
        },
        {
          "name": "datapath-qfp-stats"
        },
        {
          "name": "ipsec-input-pkts"
        }
      ]
    }
  ],
  "encoding": "JSON_IETF"
}&lt;/PRE&gt;
&lt;P&gt;Any idea ?&lt;/P&gt;
&lt;P&gt;Thanks, Damien.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Dec 2025 10:14:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355001#M3782</guid>
      <dc:creator>dbillon</dc:creator>
      <dc:date>2025-12-13T10:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Correct yang path with gnmic</title>
      <link>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355018#M3783</link>
      <description>&lt;P&gt;Looks like the issue is the origin part, but gnmic is trying to use the&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Cisco-IOS-XE-qfp-stats&lt;/PRE&gt;
&lt;P&gt;try&amp;nbsp;gnmic get --path '/Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts' --encoding json_ietf&lt;/P&gt;</description>
      <pubDate>Sat, 13 Dec 2025 13:20:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355018#M3783</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2025-12-13T13:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Correct yang path with gnmic</title>
      <link>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355039#M3784</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;Unfortunately I still get an error:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;% gnmic get --path '/Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts' --encoding json_ietf
target "ce1" Get request failed: "1.2.3.4:50052" GetRequest failed: rpc error: code = InvalidArgument desc = Invalid element name [ Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data ] : unexpected prefix[ Cisco-IOS-XE-qfp-stats-oper ]
Error: one or more requests failed&lt;/LI-CODE&gt;
&lt;P&gt;I also checked that the yang model appears in the capabilities of the router:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;...
  - Cisco-IOS-XE-qfp-classification-oper, Cisco Systems, Inc., 2022-11-01
  - Cisco-IOS-XE-qfp-crypto-dp-oper, Cisco Systems, Inc., 2022-11-01
  - Cisco-IOS-XE-qfp-resource-utilization-oper, Cisco Systems, Inc., 2022-11-01
  - Cisco-IOS-XE-qfp-stats-oper, Cisco Systems, Inc., 2022-11-01
...&lt;/LI-CODE&gt;
&lt;P&gt;Damien.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Dec 2025 17:36:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355039#M3784</guid>
      <dc:creator>dbillon</dc:creator>
      <dc:date>2025-12-13T17:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Correct yang path with gnmic</title>
      <link>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355045#M3785</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use this gnmic command without the module prefix:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;gnmic get --path &lt;SPAN class=""&gt;'/qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts'&lt;/SPAN&gt; --encoding json_ietf &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;If it fails, add --origin rfc7951.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Dec 2025 19:59:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355045#M3785</guid>
      <dc:creator>NicoRomsom</dc:creator>
      <dc:date>2025-12-13T19:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Correct yang path with gnmic</title>
      <link>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355066#M3786</link>
      <description>&lt;P&gt;Hmmm interesting, try adding the rfc at the start, it’s complaining about the prefix&lt;/P&gt;
&lt;P&gt;gnmic get --path 'rfc7951:/qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts' --encoding json_ietf&lt;/P&gt;</description>
      <pubDate>Sat, 13 Dec 2025 22:20:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355066#M3786</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2025-12-13T22:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Correct yang path with gnmic</title>
      <link>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355099#M3787</link>
      <description>&lt;P&gt;Yes !! it works &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;% gnmic get --path 'rfc7951:/qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts' --encoding json_ietf
[
  {
    "source": "ce1",
    "timestamp": 1765700017973147739,
    "time": "2025-12-14T09:13:37.973147739+01:00",
    "updates": [
      {
        "Path": "rfc7951:Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data/location[bay=0][chassis=-1][fru=fru-fp][node=0][slot=0]/datapath-qfp-stats/ipsec-input-pkts",
        "values": {
          "Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts": "18"
        }
      }
    ]
  }
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;I'll have to understand when to add this origin depending on the namespace I use. On some docs it's said that a path without the rf7951 should work but it does not at least with this IOS release.&lt;/P&gt;
&lt;P&gt;Thanks again, Damien.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Dec 2025 08:28:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355099#M3787</guid>
      <dc:creator>dbillon</dc:creator>
      <dc:date>2025-12-14T08:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Correct yang path with gnmic</title>
      <link>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355245#M3788</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/187168"&gt;@dbillon&lt;/a&gt;&amp;nbsp;from a conversation with another coworker in the past, he shared the origin is client specific and that&amp;nbsp;gnmic uses the &amp;lt;origin&amp;gt;:&amp;lt;path&amp;gt; format.&amp;nbsp;So this is mostly a gnmic specific consideration and that's why I think docs say different things if they use another client.&lt;/P&gt;
&lt;P&gt;if the origin is not specified it defaults to openconfig in gnmic&lt;/P&gt;</description>
      <pubDate>Mon, 15 Dec 2025 09:30:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355245#M3788</guid>
      <dc:creator>Jesus Illescas</dc:creator>
      <dc:date>2025-12-15T09:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Correct yang path with gnmic</title>
      <link>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355465#M3789</link>
      <description>&lt;P&gt;Hi Jesus / All,&lt;/P&gt;
&lt;P&gt;Thanks for this update.&lt;/P&gt;
&lt;P&gt;I would like to share another feedback regarding the use of &lt;A href="https://github.com/openconfig/gnmic" target="_self"&gt;gnmic&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;My initial purpose was to subscribe to the previous parameter but it's been impossible:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;% gnmic --debug sub  --output output1 --sample-interval 10s --stream-mode sample --path 'rfc7951:/qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts'&lt;/LI-CODE&gt;
&lt;P&gt;This command is accepted by gnmic but the "output" is not populated despite the fact that gnmic receives feedback from the router every 10 seconds (tshark packet dump). Nothing came out of the debug option added to the gnmic command. So I opened an &lt;A href="https://github.com/openconfig/gnmic/issues/784" target="_self"&gt;Issue&lt;/A&gt;&amp;nbsp;on gnmic github with all the details. BTW, gnmic subscriptions work perfectly with more standard counters.&lt;/P&gt;
&lt;P&gt;So I chose Telegraf to be able to subscribe to this parameter and it works ! It share an extract of my telegraf.conf configuration file below. It shows that the path is different from the one I used with "gnmic get" command:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  ...
    origin = "rfc7951"
    path = "/Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts"
  ...&lt;/LI-CODE&gt;
&lt;P&gt;So I will go on now to build my full stack : Telegraf + Victoria Metrics + Grafana.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Damien.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 07:43:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355465#M3789</guid>
      <dc:creator>dbillon</dc:creator>
      <dc:date>2025-12-16T07:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Correct yang path with gnmic</title>
      <link>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355479#M3790</link>
      <description>&lt;P&gt;Thanks for sharing your findings&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/187168"&gt;@dbillon&lt;/a&gt;&amp;nbsp;the small little details are really useful. I'll keep an eye on the github issue, is a strange behaviour.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 08:52:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/correct-yang-path-with-gnmic/m-p/5355479#M3790</guid>
      <dc:creator>Jesus Illescas</dc:creator>
      <dc:date>2025-12-16T08:52:43Z</dc:date>
    </item>
  </channel>
</rss>

