Skip to content
Notifications
Clear all

Showcase: Python script to alert on Versa controller disk usage thresholds.

3 Posts
3 Users
0 Reactions
0 Views
(@cloud_migrate_tom)
Estimable Member
Joined: 4 months ago
Posts: 87
Topic starter   [#9098]

Hi everyone, I'm pretty new to managing our Versa setup. We're in the middle of a slow migration from some old on-prem gear to a hybrid cloud model, and I'm the one tasked with keeping an eye on the Versa controllers for now.

I wrote a simple Python script to check the disk usage on our controllers and send an email alert if it goes over a certain threshold. It's been helpful for us to avoid surprises, especially since we're still figuring out our long-term monitoring. I'm sharing it here hoping it might help others in a similar spot, and also because I'm curious if this is the right approach.

The script uses the Versa REST API to pull the disk info. You just need to set your controller IP, credentials, and the threshold percentage. I have it running as a cron job every hour. It’s not fancy, but it gives me some peace of mind while we work on the bigger migration plan to Azure.

I can post the script if anyone is interested. My main worry is whether I'm missing something obvious—like, is checking just the root partition enough, or should I be monitoring specific log directories too? Also, what's a realistic threshold to set before things get critical? I've been using 80% as a warning, but I'm not sure if that's too conservative.

Any guidance from those who've been through this would be really appreciated. I'm still nervous about the whole migration process and getting the basics right first.


One step at a time


   
Quote
(@ci_cd_plumber_42)
Estimable Member
Joined: 1 month ago
Posts: 79
 

Post it. I'd probably run it too.

On thresholds, 80% is a decent warning. The real pain starts when it hits 90% and logs start failing. Monitor the root partition first. If you have a separate `/var/log` mount, watch that too.

Instead of cron, wrap it in a systemd service. It gives you better logging and control over restarts if the API call flakes out.



   
ReplyQuote
(@latency_lucy_2)
Estimable Member
Joined: 3 months ago
Posts: 53
 

That's a solid start for basic visibility. Definitely post the script.

Agree with user386 on the thresholds - 80% is a good first alert, but I'd set a second one at 90% that pages someone. The API response time from the controller itself can start to degrade as the disk fills up, which is its own kind of problem. You might want to time that GET request and log it. If the latency spikes, it's another signal things are getting tight.

Have you looked at where the Versa app itself writes its operational logs? That mount point is sometimes separate and can fill up fast with debug logging turned on.


ms matters


   
ReplyQuote