NetApp / ontap-rest-python

This repository contains sample code illustrating how to access the ONTAP REST API using Python. This Repository also contains ONTAPI Usage reporting code that helps to identify ONTAPI usage in your environment using ONTAP REST APIs.
BSD 3-Clause "New" or "Revised" License
60 stars 41 forks source link

apache_scraper.py - add caller IP and user to report #37

Closed asteigerLOD closed 11 months ago

asteigerLOD commented 2 years ago

The apache log scraper is great for customers that slowly want to transition from ZAPI to REST over a longer time period. They can use the date filter and run the report every once in a while, to make sure that there are no ZAPI calls left, and identify calls that fell through the cracks.

In the case of a larger customer with a bigger storage footprint and a lot of distributed automation, there could be a possibility of older scripts still being executed on an admin machine (e.g. self-made executables to provision volumes & shares).

To better identify those ZAPI calls, it would be great to add the caller IP and user to the report. The data is already available in the apache logs.

I have created a version of the script that includes that. (may not be 100% perfect due to insufficient python/regex skills). apache_scraper_incl_user_sourceip.txt

github-actions[bot] commented 2 years ago

Thank you for reporting an issue! If you haven't already joined our Slack community, then we invite you to do so. This is a great place to get help and ask questions from our community.

noorbuchi commented 11 months ago

Cleaning up stale issues. If you're interested in merging this into main please open a PR. Thanks!