Hello Everyone,
I would like to ask some help in referencing a value of an attribute node for a NETCONF Proxy Telemetry Sensor!
I'm following the corresponding documentation , so I'm using it as example here too, because it includes exactly the same challange I'm facing with currently.
This example creates a yang module which creates a sensor using the output of the show system users command to provide telemetry data.
My challenge is around this line of the command's XML output:
<up-time junos:seconds="17710200">204 days, 23:30</up-time>
The aforementioned example is using the up-time XML tag to reference the uptime in the output:
leaf up-time { // YANG model leaf
type string; // Type of value
dr:source up-time; // Exact name of the XML tag
}
Problem is the following: the streamed value via the sensor data is the "204 days, 23:30" in this case. But I would like to have streamed the value of the "junos:second" attribute node rather.
My assumption is the dr:source should be followed by an Xpath expression point to this node, but I could not find a working one until now.
If anyone could help to reference this value in this context with an example, that would be awesome!
I have tried varous XPath expressions, but without success until now.
Many thanks,
------------------------------
BALAZS SZALAI
------------------------------