Software Development Kit (SDK) and API Discussions

API Services - Executive view of clusters, nodes, aggregates, SVMs, volumes and LIFs

Adly
3,816 Views

This is a web interface dashboard showing a list of your clusters, nodes, aggregates, SVMs, volumes and LIFs. Can easily be customized to display whatever keys you want to show.
This does not show performance data at the moment.


Prerequisites:
- Apache web server (2.4.7) with PHP5 (5.5.9)
- API services 1.1 (connected to OCUM 6.3 and OCPM 2.0)

 

Installation:

- Extract the tgz file into the Apache DocumentRoot directory
root@server /var/www/html # tar zxvf ~/clusters.tgz

 

- Change at least the cache directory to be writable with the Apache user
root@server /var/www/html # chown www-data.www-data clusters/cache

 

- Edit the apiserver to reflect your IP address or hostname (line#179 of index.php)
$api = "https://apiservices:8443/api/1.0/ontap/";

 

- Edit the username/password combination for authorization. (line#56 of index.php)

$header[] = 'Authorization: Basic b2NhcGk6I09jYXBpMTIz';

The above username/password pair can be generated as follows: assuming the user is ocapi (with a minimum privilege of monitor) and a password of #Ocapi123, separated with a colon :

root@server ~ # echo -n "ocapi:#Ocapi123"|base64

or

root@server ~ # python -c "exec(\"import base64\\nprint base64.urlsafe_b64encode('ocapi:#Ocapi123')\")"

 

- Optionally, change the retention period of the cache files (line#30 of index.php)
$cachetime = 600;
This setting option helps with a faster display of pages by serving them from disk. Therefore, with the above setting data is gathered the first time from the API services server and any subsequent client request will be served from disk for the next 10 minutes. Until the cache time is exhausted and the cache directory refreshed with the latest data from the API services server. If the API services server is unreachable, the data will still be displayed from cache with a footer warning message. i.e. "Server unreachable. displaying data from 3 hours 16 minutes 35 seconds". In a way, the data will be displayed "offline".

 

N.B.: the nextTag is checked against volumes and lifs only when more than 500 records are present. For example, If you have more than 500 svms, the svm list will max out at 500. So leave a note on this post and I will update it accordingly.

 

Screenshot views at different levels:

 

Clusters view:

Clusters

 

Nodes view:

Nodes

 

Aggregates view:

Aggregates

 

SVMs view:

SVMs

 

Volumes view:

Volumes

 

LIFs view:

LIFs

0 REPLIES 0
Public