Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
The infrastructure agent is an application written on Go application that can be run as a Windows service in order to facilitate communication and task handling between SimpleOne instance and external systems.
Concept
In SimpleOne, communication among the instance and customer infrastructure (for example, LDAP servers or mail servers) is implemented using the "server-agent" technology.
It is used for collaboration when integration with customer software is neededUse the infrastructure agent when you need to integrate your SimpleOne instance with any other software. Main aims of this collaboration are:
- Information synchronization on SimpleOne instance with predefined templates.
- Information synchronization on customer instances with predefined templates.
Tip |
---|
These templates are PowerShell the scripts that implements enable handling some specific tasks to handle. |
System Requirements
A The server or and the agent have been developed as a very lightweight application and do not require many any considerable system resources, such as CPU, RAM or hard disk space.
Software requirements
Software | HW Requirements (minimum) | SW Requirements |
---|---|---|
Agent |
|
|
Tip |
---|
The infrastructure server is configured on the SimpleOne instance as a dictionary record, implementing appropriate business logic on the server and client logicsides. |
Interaction procedure
To configure the interaction, complete the following steps:
- Install Install the infrastructure agent on Microsoft Windows server in a customer infrastructure.
- Configure the infrastructure server on the SimpleOne instance.
- Configure the tasks for the infrastructure agent.
As a result, the interaction is configured and starts. The agent sends requests to the server to get a job assignment. The request interval usually takes the couple of minutes.
- If there are no tasks to run, the agent performs further attempts within the intervals configured.
- If there are some tasks to run, the agent starts executing them.
- Whether tasks were completed successfully or not, the agent connects to the server to report on the execution.
Note |
---|
You need to enable the "agent→server" connections in your firewall rules. |
You can find graphical principles of this process on the diagram below:
The diagram below illustrates the process:
Image Added
Image Removed
Anchor | ||||
---|---|---|---|---|
|
To add the server parameters into the appropriate table, complete the following steps:
- Navigate to MID servers → 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 on the list. |
Hostname | Y | Specify the hostname of the external server to which to connect. |
User | Y | Specify a system user with access to the infrastructure agent functionality. |
Tip |
---|
Infrastructure agent contains two .bat files:
This functionality allows you to monitor the execution of a task at a specified interval. |
Configure the infrastructure agent
Anchor | ||||
---|---|---|---|---|
|
- Download the infrastructure agent archive.
- On disk C, create a folder named MID_agent.
- Move the downloaded .exe and .env files to the created folder.
In the .env file, set the following configurations:
Field | Description |
---|---|
MID_API_USERNAME | The system username with granted access to the functionality of the infrastructure agent. |
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. |
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 you set up your infrastructure your infrastructure agent, you need to configure the PowerShell scripts for it.
Note |
---|
Learning how to develop PowerShell scripts is out of scope of this article; refer to PowerShell product documentation. |
- Navigate to MID Servers → 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 on the list. | |||||||||||||||||||||||||
Description | N | Add a brief description of the script. | |||||||||||||||||||||||||
Is 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.
|
Anchor | ||||
---|---|---|---|---|
|
To set up a job on the external infrastructure element, you need to create a record in the MID Queue (sys_mid_queue) table. For this, please complete the steps below.
- Navigate to MID Servers → 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 JSON format. | |||
Response | N | The server response containing the output of the command (the stdout response) and other feedback. This field is populated automatically. | |||
Description | N | Specify Add a brief description of the job. | |||
Server | Y | Specify a record containing information that contains the information about the previously configured infrastructure server in the MID Server table. | |||
Script | Y | Specify a record containing that contains the infrastructure script that you configured earlier in the MID Script table. | |||
Status | Y | The job status. This field is populated automatically. Available options:
Tip |
Where run:job is a job name you need to be executed. Note: bin\agent is the path relative to the installation folder of the infrastructure agent. If you are in a different folder, specify the full path. Otherwise, the job may not be executed
| ||
Processed at | N | The date and time when the request was processed. |
Table of Contents | ||||||
---|---|---|---|---|---|---|
|