|
1 | | -ONTAPI Usage Reporting Tool |
2 | | ---------------------- |
3 | | - |
4 | | - * Introduction |
5 | | - * Requirements |
6 | | - * Usage |
7 | | - * Support |
8 | | - |
9 | | -INTRODUCTION |
10 | | ------------- |
11 | | -In order to help our professional services, Customers and Partners to help them identify the ONTAPI(ZAPI) usage in their cluster environment, ONTAPI Usage Reporting tool has been developed covering 3 different usecases. These scripts are python-based. |
12 | | - |
13 | | -The scripts provided in this wheel file are, |
14 | | - |
15 | | -Script | Description |
16 | | -------------- | ------------- |
17 | | -**apache_scraper.py** | Apache log scraper to find ONTAPIs (ZAPIs) called against ONTAP nodes |
18 | | -**session_stats.py** | Command line script to pull session statistics data from ONTAP |
19 | | -**zapi_to_rest.py** | Script to find REST details of ZAPI and attributes passed |
20 | | - |
21 | | - |
22 | | -REQUIREMENTS |
23 | | -------------- |
24 | | - |
25 | | -Python3.7 or higher is required to run the scripts. If there are compatibility issues with the the included packages, All versions offered can be found below: |
26 | | - |
27 | | -* numpy - https://pypi.org/project/numpy/#files |
28 | | - |
29 | | -* pandas - https://pypi.org/project/pandas/#files |
30 | | - |
31 | | -* python-dateutil - https://pypi.org/project/python-dateutil/#files |
32 | | - |
33 | | -* pytz - https://pypi.org/project/pytz/#files |
34 | | - |
35 | | -* requests - https://pypi.org/project/requests/#files |
36 | | - |
37 | | -* six - https://pypi.org/project/six/#files |
38 | | - |
39 | | -INSTALLATION |
40 | | ------------- |
41 | | -Download the wheel file and input the command to install the wheel file: **pip install netapp_ztools-1.0.0-py3-none-any** |
42 | | -- The above command installs all the required dependencies. |
43 | | -- Visit the python_folder\Lib\site-packages\netapp_ztools\ to see the installed scripts, |
44 | | - |
45 | | -  |
46 | | - |
47 | | - |
48 | | -USAGE |
49 | | ------ |
50 | | - |
51 | | -#### Script_1: python apache_scraper.py -h #### |
52 | | - |
53 | | -- **Description:** Apache log scraper to find ONTAPIs (ZAPIs) called against ONTAP nodes |
54 | | - |
55 | | -- **usage:** - apache_scraper.py [-h] [-unique] [-start START] [-end END] [-date DATE] [-node NODE] [-write-csv] [-verbose] log |
56 | | - |
57 | | -- positional arguments: |
58 | | - - log Absolute path of apache_access.log file copied from an ONTAP node |
59 | | - |
60 | | -- optional arguments: |
61 | | - - -h, help show this help message and exit |
62 | | - - -unique Filter unique ZAPIs only |
63 | | - - -start START Start time to inspect logs, formatted as H:M:S |
64 | | - - -end END End time to inspect logs, formatted as H:M:S |
65 | | - - -date DATE Date of filtered results if a multiday run |
66 | | - - -node NODE Node to search |
67 | | - - -write-csv, -w Writes to a csv file |
68 | | - - -verbose, -v |
69 | | - |
70 | | - |
71 | | - |
72 | | -#### Script_2: python session_stats.py -h #### |
73 | | - |
74 | | -- **Description:** Command line script to pull session statistics data from ONTAP |
75 | | - |
76 | | -- **usage:** session_stats.py [-h] [-username USERNAME] [-password PASSWORD] [-scope SCOPE] [-sort-by SORT_BY] [--verbose] [-write-csv] hosts |
77 | | - |
78 | | -- positional arguments: |
79 | | - hosts Comma separated list of IP addresses or FQDN of ONTAP node(s) |
80 | | - |
81 | | -- optional arguments: |
82 | | - - -h, --help show this help message and exit |
83 | | - - -username USERNAME |
84 | | - - -password PASSWORD |
85 | | - - -scope SCOPE{cluster|node} |
86 | | - - -sort-by SORT_BY {application|location|request|user|vserver} |
87 | | - - --verbose, -v |
88 | | - - -write-csv, -w |
89 | | - |
90 | | -The CLI equivalent of the session_stats.py commands is: **security session request-statistics show-by-{application|location|request|user|vserver}** |
91 | | - |
92 | | - |
93 | | - |
94 | | -#### Script_3: python zapi_to_rest.py -h #### |
95 | | - |
96 | | -- **Description:** Tools to find REST details of ZAPI and attributes passed |
97 | | - |
98 | | -- **usage:** zapi_to_rest.py [-h] [-attrs ATTRS] zapi |
99 | | - |
100 | | -- positional arguments: |
101 | | - - zapi ZAPI |
102 | | - |
103 | | -- optional arguments: |
104 | | - - -h, --help show this help message and exit |
105 | | - - -attrs ATTRS, -a ATTRS comma separated list of attributes to map REST field equivalents |
106 | | - - --version VERSION Specify target ONTAP version { 9_10_1 | 9_9_1 | 9_8 } |
107 | | - |
108 | | -  |
109 | | - |
110 | | - |
111 | | -SUPPORT |
112 | | ------------ |
113 | | - |
114 | | -For questions and for addressing bugs, please reach out to ng-ontap-restapi-queries@netapp.com |
| 1 | +ONTAPI Usage Reporting Tool |
| 2 | +--------------------- |
| 3 | + |
| 4 | + * Introduction |
| 5 | + * Requirements |
| 6 | + * Usage |
| 7 | + * Support |
| 8 | + |
| 9 | +INTRODUCTION |
| 10 | +------------ |
| 11 | +In order to help our professional services, Customers and Partners to help them identify the ONTAPI usage in their cluster environment, ONTAPI Usage Reporting tool has been developed covering 3 different usecases. |
| 12 | +These scripts are python-based. |
| 13 | + |
| 14 | +The scripts provided in this wheel file: |
| 15 | + |
| 16 | +Script | Description |
| 17 | +------------- | ------------- |
| 18 | +**apache_scraper.py** | Apache log scraper to find ONTAPIs (ZAPIs) called against ONTAP nodes |
| 19 | +**session_stats.py** | Command line script to pull session statistics data from ONTAP |
| 20 | +**zapi_to_rest.py** | Script to find REST details of ZAPI and attributes passed |
| 21 | + |
| 22 | + |
| 23 | +REQUIREMENTS |
| 24 | +------------- |
| 25 | + |
| 26 | +Python3.7 or higher is required to run the scripts. If there are compatibility issues with the the included packages, All versions offered can be found below: |
| 27 | + |
| 28 | +* numpy - https://pypi.org/project/numpy/#files |
| 29 | + |
| 30 | +* pandas - https://pypi.org/project/pandas/#files |
| 31 | + |
| 32 | +* python-dateutil - https://pypi.org/project/python-dateutil/#files |
| 33 | + |
| 34 | +* pytz - https://pypi.org/project/pytz/#files |
| 35 | + |
| 36 | +* requests - https://pypi.org/project/requests/#files |
| 37 | + |
| 38 | +* six - https://pypi.org/project/six/#files |
| 39 | + |
| 40 | +Command to install the wheel file: **pip install netapp_ztools-1.0.0-py3-none-any** |
| 41 | + |
| 42 | +USAGE |
| 43 | +----- |
| 44 | + |
| 45 | +#### Script_1: python apache_scraper.py -h #### |
| 46 | + |
| 47 | +- **Description:** Apache log scraper to find ONTAPIs (ZAPIs) called against ONTAP nodes |
| 48 | + |
| 49 | +- **usage:** - apache_scraper.py [-h] [-unique] [-start START] [-end END] [-date DATE] [-node NODE] [-write-csv] [-verbose] log |
| 50 | + |
| 51 | +- positional arguments: |
| 52 | + - log Absolute path of apache_access.log file copied from an ONTAP node |
| 53 | + |
| 54 | +- optional arguments: |
| 55 | + - -h, help show this help message and exit |
| 56 | + - -unique Filter unique ZAPIs only |
| 57 | + - -start START Start time to inspect logs, formatted as H:M:S |
| 58 | + - -end END End time to inspect logs, formatted as H:M:S |
| 59 | + - -date DATE Date of filtered results if a multiday run |
| 60 | + - -node NODE Node to search |
| 61 | + - -write-csv, -w Writes to a csv file |
| 62 | + - -verbose, -v |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +#### Script_2: python session_stats.py -h #### |
| 67 | + |
| 68 | +- **Description:** Command line script to pull session statistics data from ONTAP |
| 69 | + |
| 70 | +- **usage:** session_stats.py [-h] [-username USERNAME] [-password PASSWORD] [-scope SCOPE] [-sort-by SORT_BY] [--verbose] [-write-csv] hosts |
| 71 | + |
| 72 | +- positional arguments: |
| 73 | + hosts Comma separated list of IP addresses or FQDN of ONTAP node(s) |
| 74 | + |
| 75 | +- optional arguments: |
| 76 | + - -h, --help show this help message and exit |
| 77 | + - -username USERNAME |
| 78 | + - -password PASSWORD |
| 79 | + - -scope SCOPE{cluster|node} |
| 80 | + - -sort-by SORT_BY {application|location|request|user|vserver} |
| 81 | + - --verbose, -v |
| 82 | + - -write-csv, -w |
| 83 | + |
| 84 | +The CLI equivalent of the session_stats.py commands is: **security session request-statistics show-by-{application|location|request|user|vserver}** |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +#### Script_3: python zapi_to_rest.py -h #### |
| 89 | +-------------------------------- |
| 90 | +- **Description:** Tools to find REST details of ZAPI and attributes passed |
| 91 | + |
| 92 | +- **usage:** zapi_to_rest.py [-h] [-attrs ATTRS] zapi |
| 93 | + |
| 94 | +- positional arguments: |
| 95 | + - zapi ZAPI |
| 96 | + |
| 97 | +- optional arguments: |
| 98 | + - -h, --help show this help message and exit |
| 99 | + - -attrs ATTRS, -a ATTRS comma separated list of attributes to map REST field equivalents |
| 100 | + - --version VERSION Specify target ONTAP version { 9_10_1 | 9_9_1 | 9_8 } |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | +SUPPORT |
| 106 | +----------- |
| 107 | + |
| 108 | +These scripts were developed by the CSI team at NetApp. For questions and for addressing bugs, please reach out to ng-ontap-rest-queries@netapp.com |
0 commit comments