Hi,
Trying to get NSO/NCS status via NAVU or CDB API but without success. Originally I thought it is Operation data but based on XML path output it seems Config. Still, however I form a path I always get error that path is not valid.
This is what I was using to see where data resides.
show ncs-state ha mode | display xml
<config xmlns="http://tail-f.com/ns/config/1.0">
<ncs-state xmlns="http://tail-f.com/yang/ncs-monitoring">
<ha>
<mode>master</mode>
</ha>
</ncs-state>
</config>
I started forming query with “ncs-monitoring:ncs-state/ha/mode” etc but without success. Always get exception "com.tailf.conf.ConfException: Tag 'ncs-state' not recognized in /ncs-monitoring:ncs-state/ha/mode”…
Thanks for help in advance,
Bostjan
Hi Bostjan,
Try this:
curl -u admin:admin http://localhost:8080/api/operational/ncs-state/ha
Thanks!
Michel
Hi Michel,
Thanks for the suggestion. I am creating a NCS package, so it doesn’t seem the best option to use REST API for it but if nothing else works… I know this one works since we are using it on NetScaler to route traffic to master NSO device.
BR<
Bostjan
Bostjan,
Have you tried the getHaState() method in the NCS HaStatus Class?
Yes.
-Dan
Wasn’t aware of that class. Will look into it tomorrow morning but it sounds promising!
B.
FYI,
The class/method info for NSO APIs is provided in each NSO distribution under the docs directory (<nso-local-install-dir>/docs/api)
-Larry