Jump to content

Search the Community

Showing results for tags 'disk space'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • MSPGeek
    • Announcements
    • The Geek Cast
    • Code of Conduct
  • ConnectWise Automate / Labtech
    • ConnectWise Automate / LabTech
    • ConnectWise Automate / LabTech - Development


  • ConnectWise Automate
    • Scripts
    • Plugins
    • SQL Snippets
    • Role Definitions
    • Automate PowerShell Code
    • Reports
    • Internal Monitors
    • Remote Monitors
  • ConnectWise Manage
    • API Interacting Code

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me


Agent Count













Found 1 result

  1. I don't know about the false positives, but you should be able to make basic edits to the created monitors. Looking at the script that adds/maintains them, "Agent Monitor Creation - Disk", it goes through these steps: 1. Retrieve list of Drive IDs (not Drive Letters) on the agent. (Have you ever seen an agent where the USB drive was swapped, and they show multiple "F:" drives and they are all red/offline except for one? Each one is a different drive id) 2. Check to see if a monitor has been created for that DriveID. If the C: drive was re-detected for some reason, it will get a new drive ID and you will see the drive listed twice. It will also end up creating a new monitor for this drive's letter. 3. Check if the monitor ID remembered exists, if it doesn't then re-add it. 4. Check that the monitor's "What" action is "3". 3 corresponds to "Greater Than", so if you tried to change the monitor to be normal when "Greater Than/Equal" 10240MB instead of 1024MB, it will re-create the monitor. If you leave the comparison to "Greater Than" it should not re-create the monitor. We addressed the uselessness of the built in monitors by using Drive percentages instead of MB Free. I copied the "Agent Monitor Creation - Disk" script and tweaked it to create a monitor that for free space, and the percentage is automatically calculated. My script does the following: 1. Retrieve list of Drive IDs on the agent. 2. Check to see if a monitor has been created for that DriveID. If it has I move on. If you deleted this monitor, then you can manually re-create it. 3. Take the current free percentage, cut it in half, then round down to the next lowest multiple of 5. So a drive with 75% free would calculate to 35%, a drive with 22% free would calculate to 10%. It has an extra check to prevent setting to anything lower than 10%, in case of drives that are already over 90% full. 4. Create the monitor using the percent threshold calculated above. When the monitor is tripped, we can just change the percentage to whatever we want, but we cannot just close the ticket, we need to return it to a normal state via adjustment to the monitor or by making enough free drive space available. That way the ticket gets auto-closed, and the monitor resets. Otherwise we wont get another warning until the drive gets under 1GB (by the default Agent Disk Monitors created by the LabTech script). I also run a second script that looks for invalid monitors. Otherwise we ended up with monitors for drives that were removed or duplicate monitors for the same drive letter. I clean off the built in disk free and my custom disk percentage monitors, and any automatically created monitors that were duplicated. I run each of these at night in our Daily Maintenance scripts. They are offline scripts, and they run through pretty quickly... I have attached both scripts here. Hope they can help! LTAgentMonitorDiskPercentFree-Creation and Cleanup Scripts.zip
  • Create New...