[j-nsp] Publish API data over SNMP

Phil Shafer phil at juniper.net
Thu Mar 8 10:46:40 EST 2018


[changed subject line)

Saku Ytti writes:
>You have | display json and xml, I assume json was relatively modest
>amount of work, as you have formal source of data, so someone only
>needed to write translator, without being aware of all context to
>support | display json, which also means, no one needs to do any work
>to get display xml or json to work on new command introduced?

It needs _some_ details (e.g. what are the keys for lists), but
it doesn't look at most of the schema/data model.

>If this is remotely true, shouldn't it be equally possibly to present
>all data over SNMP which is presentable as JSON and XML? There are
>bunch of gaps on relatively important stuff, which I'd love to see
>available in SNMP. This week particularly I was frustrated to find how
>'show class-of-service fabric statistics' is not available over SNMP.
>Perhaps introduce some CLI-MIB where all json/xml supporting commands
>are generated in OIDs and command in CLI to ask OID for particular
>command?

I'm not an snmp-head, but something could certainly be done here.
I see two issues, one being the need for a formal MIB where our
content evolves release-to-release.  Making per-release MIBs would
be a pain, and I'm not sure how well tools would handle those.  A
"generic" MIB might be suitable, where the key is the RPC (and it's
arguments?) and the fields are the results of the RPC.

The second issue (which is mostly my lack of snmp depth) is how
to ensure the results of multiple queries are given data from the
same RPC results.  Looking at "show chassis environment" results
should give consistent output.

Let me know what you think and I'll forward the thread to the snmp
folks.

Thanks,
 Phil


More information about the juniper-nsp mailing list