For server-to-endpoint management products, management services can contain a management server plugin and associated settings. The plugin will be executed on the management server and will receive various parameter values that can enable it to perform any relevant per-endpoint server-end tasks, such as:
- Register the agent with the management server, and unregister upon removal
- Associate the endpoint with a server policy group
- Schedule endpoint polls or backups
- Configure the server's host file to recognize the managed agent by hostname
You'll need to create an appropriate plugin script (scripts for some common agents may be provided by JetAgent) as below, and to then upload the plugin to a management service.
For JetAgent to be able to execute the plugin on the management server, the management server needs to have a JetAgent connector installed on it (either by having a managed agent deployed to it, or via the JetAgent API). JetAgent will use this connector for executing the plugin.
Supported languages for the plugin script are:
- Linux: any script language. The script should identify the language using a standard Shebang line.
- Windows: Batch (.bat) or Visual Basic (.vbs).
The plugin should accept the following command-line arguments. JetAgent will execute the plugin script on the management server with these arguments in the following cases:
- register: Upon management service deployment to an endpoint, unless the endpoint is already registered to this management server.
- deregister: Upon management service removal from the endpoint, or a service update that no longer associates the endpoint with this management server (the script defined in the new service will be used).
- set_groups: Upon management servcie deployment including a change to the Configuration Group field (the script defined in the new service will be used), except when the change requires the above register action and/or deregister action.
Configuring or canceling a server policy group when the endpoint is being newly registered with a management server (or, if necessary, when the endpoint is being unregistered from a management server) should be performed upon the register argument (possibly by calling the same code that is called upon the set_groups argument).
The script should pass the following outputs:
- Status: one of the following exit codes:
- 0: OK
- 1: command not supported by script
- 2-19: reserved for other errors
- Detailed message as printed to standard output
In addition to the above command-line argument, JetAgent passes the following variables to the script:
- ORCH_COMMAND: Same as the command-line argument: register, deregister, or set_groups.
- ORCH_ENDPOINT_HOSTNAME: The endpoint's hostname.
- ORCH_ENDPOINT_IP: The endpoint's IP address.
- ORCH_GROUPS (not passed for deregister): The configuration group to which the endpoint should be assigned (from management service Configuration Group field).
- TEMPDIR: A temporary directory for writing in; will be automatically emptied after the script is completed.
- vAgent-specific parameters: All the fields that appear in the Managed Agent Settings tab of the management package. For a list of the actual parameter names, please contact JetAgent support.