We're creating a procedure which will be triggered by an offline agent alert. Because the agent is offline, the script will have to run from the Kaseya server itself.
One thing the script will need is a managed variable which has been assigned to the offline agents group. This has me stumped.
Is there a method to get a managed variable from the OFFLINE agent's group into the script? If I use "<VariableName>" it will just get the variable from the group the Kaseya server is in.
Again, the script will be triggered from the offline agent, but we need to include a managed variable (or custom field value) for THAT servers group in a script that's being run on the Kserver.
Variables that are passed automatically from the alert to the script include the group name, computer name, time offline, etc. I'm hoping I can use the group or group.machinename variables to somehow call the managed variable.
Looking forward to some very creative ideas!
You will either need to have another machine in that group write the variable to a file on the VSA server or... and the better option is a SQL Read procedure that just reads the variable for that machine group... I do this exact same thing... I get some email addresses from the System >> Orgs >> Custom Fields. If you need any help with it let me know... I probably need to write that code anyway for some stuff on our roadmap.