Skip to content

Commit f8e2a79

Browse files
Readme.md - ONTAPI Usage Reporting Tool
1 parent 3a219fb commit f8e2a79

File tree

1 file changed

+108
-0
lines changed

1 file changed

+108
-0
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
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+
![image](https://user-images.githubusercontent.com/61284863/153816578-0842a8b0-97d9-4a1c-90f3-358ecc5f589c.png)
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+
![image](https://user-images.githubusercontent.com/61284863/153811433-5b087671-eaf2-48dc-9a53-1f8007223f8f.png)
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+
![image](https://user-images.githubusercontent.com/61284863/153816352-4b1fc5c0-ffe0-4356-9823-9ed3c6b51099.png)
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 [email protected]

0 commit comments

Comments
 (0)