cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
58
Views
0
Helpful
6
Replies
Highlighted
Cisco Employee

NSO/NCS HA status CDB or Navu API

 

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

 

Everyone's tags (4)
6 REPLIES 6
Cisco Employee

Re: NSO/NCS HA status CDB or Navu API

 

Hi Bostjan,

 

 

Try this:

 

 

curl -u admin:admin http://localhost:8080/api/operational/ncs-state/ha

 

 

Thanks!

Michel

Cisco Employee

Re: NSO/NCS HA status CDB or Navu API

 

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

 

Cisco Employee

Re: NSO/NCS HA status CDB or Navu API

 

Bostjan,

 

Have you tried the getHaState() method in the NCS HaStatus Class?

 

  1. com.tailf.ha

 

Class HaStatus

 

  

Cisco Employee

Re: NSO/NCS HA status CDB or Navu API

 

Yes.

-Dan

 

Cisco Employee

Re: NSO/NCS HA status CDB or Navu API

 

Wasn’t aware of that class. Will look into it tomorrow morning but it sounds promising!

 

B.

 

Cisco Employee

Re: NSO/NCS HA status CDB or Navu API

 

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

 

Content for Community-Ad
August's Community Spotlight Awards