0% found this document useful (0 votes)
3 views2 pages

Python Monitoring Solution

A Python-based CXO monitoring app has been developed to avoid exceeding 89.42% Apex character usage while providing essential monitoring features. Key functionalities include tracking data storage, file storage, API requests, and Apex code size, with a user interface for CXO dashboards. The app can be run locally or deployed using Docker, with all necessary files and instructions provided.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Python Monitoring Solution

A Python-based CXO monitoring app has been developed to avoid exceeding 89.42% Apex character usage while providing essential monitoring features. Key functionalities include tracking data storage, file storage, API requests, and Apex code size, with a user interface for CXO dashboards. The app can be run locally or deployed using Docker, with all necessary files and instructions provided.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Prepared a Python-based CXO monitoring app so you don’t add Apex to an org

already at 89.42% Apex character usage. This solution increases Apex usage
by 0%, staying safely under your “not more than 1%” constraint.
Created deployable app here:
python-monitoring-app
Key files:
 [Link] - Flask app + scheduler
 salesforce_client.py - Salesforce REST/Tooling API client
 [Link] - KPI collection and scoring
 [Link] - CXO dashboard UI
 Dockerfile and [Link]
 .[Link]
It monitors:
 Data Storage via DataStorageMB
 File Storage via FileStorageMB
 API Requests via DailyApiRequests
 Apex Code Size via Tooling
API ApexClass / ApexTrigger LengthWithoutComments
 CXO health score, trends, and alerts

Run locally:
cd python-monitoring-app
python3 -m venv .venv
source .venv/bin/activate
pip install -r [Link]
cp .[Link] .env
python [Link]
Or deploy with Docker:
cd python-monitoring-app
cp .[Link] .env
docker compose up --build -d
I ran Python syntax checks successfully. I couldn’t run the Flask app here because
runtime dependencies like Flask aren’t installed locally yet.
Sources referenced: Salesforce REST Limits API/API monitoring guidance and Tooling
API Apex metadata fields: API limits monitoring, Tooling API PDF.
[Link] · MD
Open
15 files changed+1568-0
UndoReview
python-monitoring-app/.[Link]
python-monitoring-app/.gitignore
python-monitoring-app/Dockerfile
python-monitoring-app/[Link]
python-monitoring-app/[Link]
python-monitoring-app/[Link]
python-monitoring-app/[Link]
python-monitoring-app/[Link]
python-monitoring-app/[Link]
python-monitoring-app/[Link]
python-monitoring-app/salesforce_client.py
python-monitoring-app/static/[Link]
python-monitoring-app/static/[Link]
python-monitoring-app/[Link]
python-monitoring-app/templates/[Link]
23:37

You might also like