Jump to content

ConnectWise Automate: Extra Data Fields and Scheduling Scripts?

Recommended Posts

Have a few questions regarding scheduling scripts and extra data fields. I'd like to schedule a script to run for servers that checks the amount of free space on a drive and if it's below the threshold for that server (say below 20% available free space, though the threshold would be set per server based on an extra data field the script would reference) I'd like a ticket to be created. Perhaps there's monitors already in LabTech that can do something similar to this but I want to know how to create scripts, have them reference extra data fields, then schedule the script to run on servers and I think this is an easy enough area to start with to help me learn so that I can apply other scripts in the future as well.

The script for the most part I'm clear on how to create, but it's everything else I'm not clear on: Scheduling the script to run on servers and creating extra data fields the script can reference. Specifically, here's what I would like to know:

1. How do I create extra data fields for servers? I would like a field for free disk space threshold and be able to set that per server. I'm not sure where to go in LabTech to create this field and how to apply it to a server, or multiple servers.

2. Is it possible to reference the threshold in the LabTech script I create so I can run checks against it? If so, how might I go about referencing it?

3. Once the script is created and does what I would like how do I get to the point where that is scheduled to run on servers? From what I'm understanding so far I need to create a search, then a group, then apply that script against the group but I'm not sure how to actually go about doing these things. Are there any guides that might help me?

If anyone could clear this up for me or if there's any guides I can follow to assist with this that would be awesome. Currently running ConnectWise Automate v. 11.0

Share this post

Link to post
Share on other sites

1. EDFs are created in the System Dashboard. They are not applied to specific agents or agent types so all agents will have the EDF you create, but it doesn't need to have meaning for every agent. Simply ignore that EDF on your workstation agents. ***Note, you might want to give your new EDF a default value that is your most commonly used threshold. That way you only have to change the value of the EDF on servers with a threshold different than your default.
CWA documentation on creating EDFs and their default values: https://docs.connectwise.com/ConnectWise_Automate/ConnectWise_Automate_Documentation/060/140/020

2. Yes. In your script use the "ExtraData Get Value" function. It will let you assign the value of your EDF to a variable you can then use in your script.
CWA docs on the Database Functions: https://docs.connectwise.com/ConnectWise_Automate/ConnectWise_Automate_Documentation/070/240/050/040/020/040

3. The CWA docs will guide you through all those steps, but depending on which servers you want it to run on, CWA may already have the groups you need (such as Groups\Agent Types\Windows Servers).
CWA docs on searches, using and saving: https://docs.connectwise.com/ConnectWise_Automate/ConnectWise_Automate_Documentation/070/250/010
CWA docs on creating groups: https://docs.connectwise.com/ConnectWise_Automate/ConnectWise_Automate_Documentation/070/090/020
CWA docs on scheduling scripts: https://docs.connectwise.com/ConnectWise_Automate/ConnectWise_Automate_Documentation/070/240/030

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...