Kaseya Community

Updating the custom field of another agent from procedure.

  • Hey. I have agents that work in teams. To sketch the situation: A Master system has a DB running, the Slave has software that needs this DB.

    I have a procedure that finds a certain value in the DB on Master, and stores it in a Custom Field. But this value is also relevant for the Slave system from the pair. So I want to store the value in the Custom Field of the slave as well. Is that possible from a procedure ran on the Master? Or maybe for a certain Group.ID?

    I can think of some workarounds, but they are not really what I want (like scheduling a procedure with predefined value on the slave, or writing a procedure for the slave to read the master's db.)

  • Check out the commands GetVariableUniversalRead() and GetVariableUniversalCreate()  

    You can set the variable on your master, then have a your slaves read the variable from the master.

  • Oh that is interesting! I can make it work with those commands, I'm sure. Thanks Corey.

    [edited by: Maurice at 11:31 PM (GMT -8) on Feb 4, 2019]
  • One of the tools in our RMM Suite supports this - directly writing to a machine/custom field via API.

    The tool takes the field name, data, and optional machine.group name as arguments, and can be invoked from procedures or other commands or scripts. If the machine.group isn't specified, it uses the agent where the command runs.


  • It's a bit more complex but you can also setup SQL queries as saved xml files on the KServer and then call them from the agent procedure with the SQLWrite command -- this would work in your scenario, assuming you always know what agent you're writing to