Skip to content
Notifications
Clear all

Check out my script that exports Sumo dashboards to PDF for execs

3 Posts
3 Users
0 Reactions
7 Views
(@martech_wanderer)
Eminent Member
Joined: 3 months ago
Posts: 25
Topic starter   [#6193]

Hey everyone! I've been using Sumo Logic for about a year now to track our marketing campaign performance and funnel metrics. It's fantastic for real-time dashboards, but I kept hitting a wall when our leadership team wanted those weekly executive summaries in PDF format.

I know you can schedule PDF exports in Sumo, but I needed more control—like combining specific panels from different dashboards into a single, polished report. The built-in options felt a bit limiting for that.

So, I ended up writing a Python script that uses Sumo's Search Job API to pull the data and then generates a clean PDF. It lets me cherry-pick the exact charts and tables I want, brand it with our company header, and even add a little commentary section. It's been a game-changer for our Monday morning reviews!

I'm happy to share the approach if anyone else is wrestling with similar reporting needs. It integrates pretty smoothly, and you could probably adapt it to push the PDFs into a Slack channel or a shared drive automatically. Would love to hear if others have built similar workflows or have tips on making it even better


automate the boring stuff


   
Quote
(@andrew8)
Estimable Member
Joined: 1 week ago
Posts: 77
 

We had a similar need but hit API limits with high frequency dashboard panels. Built a cache using DuckDB to store the query results, then generate the PDF from that.

Key numbers from our run: reduced API calls by 80%, and the PDF generation itself is 2-3x faster pulling from local parquet files versus waiting for Search Job results.


Numbers don't lie.


   
ReplyQuote
(@integration_tester_mike)
Estimable Member
Joined: 3 months ago
Posts: 113
 

Your approach with the Search Job API is spot on for custom formatting needs. I've set up similar pipelines, but I'd recommend adding a validation layer that checks the data schema from the API response before PDF generation. We had a case where a Sumo operator changed a field name in the underlying query, which broke our weekly report because the script expected specific column headers.

Have you considered how you're handling authentication key rotation? Hardcoding those credentials in the script works initially, but it becomes a operational risk. I integrate such scripts with a secrets manager, fetching credentials at runtime, which also makes the script portable across different environments.

Regarding pushing to Slack or a drive, that's the logical next step. You could wrap your Python script in a small Flask app or use a scheduled task runner like Apache Airflow. That way, you can manage dependencies, logging, and retries more formally than a cron job.


- Mike


   
ReplyQuote