Use this operational API to get the SPAN monitor session status.
curl -v -u admin:XXXXX -H Accept:application/vnd.yang.data+xml -H Content-Type:application/vnd.yang.data+xml -k -X
GET https://209.165.201.1/api/operational/monitor\?deep
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 209.165.201.1...
* Connected to 209.165.201.1 (209.165.201.1) port 443 (#0)
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* NPN, negotiated HTTP1.1
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Unknown (67):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* Server certificate:
* subject: CN=Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* start date: Mar 13 23:55:53 2017 GMT
* expire date: Mar 11 23:55:53 2027 GMT
* issuer: CN=Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
> GET /api/operational/monitor?deep HTTP/1.1
> Host: 209.165.201.1
> Authorization: Basic YWRtaW46TXlUZXN0MTIzIw==
> User-Agent: curl/7.50.1
> Accept:application/vnd.yang.data+xml
> Content-Type:application/vnd.yang.data+xml
>
< HTTP/1.1 200 OK
< Server: nginx/1.10.1
< Date: Wed, 15 Mar 2017 04:43:15 GMT
< Content-Type: application/vnd.yang.data+xml
< Transfer-Encoding: chunked
< Connection: keep-alive
< Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
< Pragma: no-cache
<
<monitor xmlns="http://www.cisco.com/nfv/span_session" xmlns:y="http://tail-f.com/ns/rest" xmlns:span-session="http://www.cisco.com/nfv/span_session">
<session>
<number>20</number>
<source>
<interfaces>
<vm-vnic>
<vm-name>Linux1</vm-name>
<vnic-id>0</vnic-id>
<direction>both</direction>
</vm-vnic>
<interface>
<name>GE0-0</name>
<direction>both</direction>
</interface>
</interfaces>
</source>
<destination>
<vm-vnic>
<vm-name>Linux2</vm-name>
<vnic-id>0</vnic-id>
</vm-vnic>
</destination>
<status>CREATE_SUCCESS</status>
</session>
</monitor>
Use this GET API to get the SPAN session configuration details.
curl -v -u admin:XXXXX -H Accept:application/vnd.yang.data+xml -H Content-Type:application/vnd.yang.data+xml -k -X
GET https://209.165.201.1/api/config/monitor\?deep
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 209.165.201.1...
* Connected to 209.165.201.1 (209.165.201.1) port 443 (#0)
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* NPN, negotiated HTTP1.1
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Unknown (67):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* Server certificate:
* subject: CN=Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* start date: Mar 13 23:55:53 2017 GMT
* expire date: Mar 11 23:55:53 2027 GMT
* issuer: CN=Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
> GET /api/config/monitor?deep HTTP/1.1
> Host: 209.165.201.1
> Authorization: Basic YWRtaW46TXlUZXN0MTIzIw==
> User-Agent: curl/7.50.1
> Accept:application/vnd.yang.data+xml
> Content-Type:application/vnd.yang.data+xml
>
< HTTP/1.1 200 OK
< Server: nginx/1.10.1
< Date: Wed, 15 Mar 2017 04:39:29 GMT
< Content-Type: application/vnd.yang.data+xml
< Transfer-Encoding: chunked
< Connection: keep-alive
< Last-Modified: Wed, 15 Mar 2017 02:42:25 GMT
< Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
< Etag: 1489-545745-460682
< Pragma: no-cache
<
<monitor xmlns="http://www.cisco.com/nfv/span_session" xmlns:y="http://tail-f.com/ns/rest" xmlns:span-session="http://www.cisco.com/nfv/span_session">
<session>
<number>20</number>
<source>
<interfaces>
<vm-vnic>
<vm-name>Linux1</vm-name>
<vnic-id>0</vnic-id>
<direction>both</direction>
</vm-vnic>
<interface>
<name>GE0-0</name>
<direction>both</direction>
</interface>
</interfaces>
</source>
<destination>
<vm-vnic>
<vm-name>Linux2</vm-name>
<vnic-id>0</vnic-id>
</vm-vnic>
</destination>
</session>
</monitor>