Agent on Go
System Requirements
The server and agent do not require any significant system resources, such as CPU, RAM or hard disk space.
Software requirements
Software | HW Requirements (min) | SW Requirements |
---|---|---|
Agent |
| Microsoft Windows server (2012r2 or higher) |
The infrastructure server is configured on the SimpleOne instance as a dictionary record, implementing appropriate business logic on the server and client sides.
Interaction procedure
To configure the interaction, complete the following steps:
- Install the infrastructure agent on Microsoft Windows server within the customer's infrastructure.
- Configure the infrastructure server in your SimpleOne instance.
- Configure the tasks for the infrastructure agent.
Once configured, the agent starts interacting. The agent sends requests to the server to get job assignments. The request interval is usually a couple of seconds.
- If there are no tasks to run, the agent performs further attempts based on the configured intervals.
- If there are some tasks to run, the agent starts executing them and connects back to the server to report the outcome, regardless of success or failure.
-
You can specify the interval between the agent requests to the server in seconds in the
MID_POOL_TIME
environment variable. The value must be greater than or equal to 1. -
If necessary, use Microsoft Planner or similar solutions to automatically restart the agent after the system failure.
The diagram below illustrates the interaction process:
Set up the infrastructure server
The logic of the MID Server table is under active development at the moment and will be extended in the future versions of the platform.
To add the server parameters into the appropriate table, complete the following steps:
- Navigate to MID Settings → MID Server.
- Click New and fill in the form.
- Click Save or Save and exit to apply the changes.
MID Server form fields
Field | Mandatory | Description |
---|---|---|
Name | Y | Specify the infrastructure server name displayed in the list. |
Hostname | Y | Specify the hostname of the external server to connect to. For example, mid_server. |
User | Y | Specify the system user with access to the infrastructure agent functionality. The user must have the admin role. |
Configure the infrastructure agent
- Download the infrastructure agent archive and extract the files.
- On disk C, create a folder named MID_agent.
- Move the extracted .exe and .env files from the archive to the created folder.
- In the .env file, set the following configurations:
Field | Description |
---|---|
MID_API_USERNAME | The system user name with access to the infrastructure agent functionality. |
MID_API_PASSWORD | The password of the specified user. |
MID_API_SERVERID | The server ID that is configured in the MID Server table. |
MID_API_ENDPOINT | Link to the SimpleOne instance where the MID server will operate. |
Example of the configuration file:
- MID_API_USERNAME=admin
- MID_API_PASSWORD=123456
- MID_API_SERVERID=157237947616342741
- MID_API_ENDPOINT=
https://instance.example.com/rest
Add scripts
After setting up your infrastructure agent, configure the scripts:
- Navigate to MID Settings → MID Scripts.
- Click New and fill in the form.
- Click Save or Save and exit to apply the changes.
MID Script form fields
Field | Mandatory | Description |
---|---|---|
Name | Y | Specify the infrastructure server name displayed in the list. |
Description | N | Add a brief description of the script. |
Active | N | Select this checkbox to activate the script. |
Script | Y | Specify a script that handles the necessary tasks and responsibilities associated with the corresponding activities. |
In these scripts, you can use variables to facilitate the data exchange between the client infrastructure and the SimpleOne instances.
For example, you can make this definition in your MID Script:
$title='Title:\n';Write-Host($title);Write-Host($param1);
Then the value of the title variable should be transferred into the Request field of the related MID Queue record:
{"param1":"String value"}
After the script is executed, the Response field in the related MID Queue record is equal to:
Title:
String value
Set up a task
To set up a job on the external infrastructure element, create a record in the MID Queue (sys_mid_queue) table. To do so, complete the steps below:
- Navigate to MID Settings → MID Queue.
- Click New and fill in the form.
- Click Save or Save and exit to apply the changes.
MID Queue form fields
Field | Mandatory | Description |
---|---|---|
Request | N | Enter a request to an external server in the JSON format. |
Response | N | The server response containing the output of the command (the stdout response) and other feedback. This field is populated automatically. The response size should not exceed 2.5Mb. Otherwise, the process results in a verification error and the record is not saved. |
Description | N | Add a brief description of the job. |
Server | Y | Specify a record that contains information about the previously configured infrastructure server in the MID Server table. |
Script | Y | Specify a record that contains the infrastructure script that you configured earlier in the MID Script table. |
Status | Y | The job status. This field is populated automatically. Possible options:
|
Processed at | N | The date and time when the request was processed. |