It is important that administrators understand briefly how these tasks works. Thus, in this section, all tasks will be described in details.

## Enrollment¶

– POST /api/agents :

1 - After retrieving computer’s UUID, the agent sends a request containing enrollment key to add or update agent in database.

2 - Enrollment key validity is checked on server side.

3 - An ID from 0 to number_of_agents is assigned and sent back to agent if enrollment is authorized.

4 - Then the agent stores persistently this ID.

Enrollment is mandatory and need to be done when agent is not in database (removed or first time). If your computer changes his UUID, a new agent ID will be assigned when running this task again. It means that the previous ID will still be in database. It is then administrator’s choice to keep it or remove it by using plugin’s web interface.

Example :



## Getjobs¶

– GET /api/jobs :

1 - Enrolled agent sends a request to get assigned jobs.

2 - The plugin sends back an array of jobs in a json message.

3 - The agent parses the message and stores it for later use.

There is a getJobs limit which defines the maximum of jobs that can be retrieved for each request to API. By default, it is limited to 10 jobs but you can change this value in General > Configuration > Jobs from Armadito plugin in GLPI.

Example :

$armadito-agent -t "Getjobs"  ## Runjobs¶ – POST /api/jobs 1 - Get list of previously stored jobs (locally) 2 - Execute these jobs sequentially 3 - Sends Jobs execution statuses to GLPI. It can includes error messages. A Job can have 4 differents levels of priority : • low = 0 • medium = 1 • high = 2 • urgent = 3 Job priority can be selected by administrator when creating a new job in Armadito Plugin for GLPI. Note that, at each call of Runjobs, jobs are executed sequentially according to their priority level. Example 1, tasks are executed after waiting 10 seconds : $ armadito-agent -t "Runjobs" -w 10


Example 2, tasks are executed after waiting randomly between 0 and 10 seconds :



## Scan¶

– POST /api/scans

1 - Ask Antivirus for a new on-demand scan

2 - Send progress regularly to GLPI before scan’s end (optional)

3 - Send scan results to plugin Armadito for GLPI

Example :

$armadito-agent -t "Scan"  ## Alerts¶ – POST /api/alerts 1 - Retrieve Antivirus specific alerts 2 - Send alerts in a json message to plugin Armadito for GLPI 3 - Store these alerts in database Example : $ armadito-agent -t "Alerts"


Note

A checksum considering main characteristics is computed on server side. It allows to avoid inserting duplicates.

## AVConfig¶

– GET & POST /api/avconfigs

1 - Retrieve Antivirus configuration defined into plugin Armadito for GLPI (if there is one)

2 - Update local computer Antivirus’ configuration (if needed)

3 - Retrieve current local Antivirus configuration

4 - Send it in a json message to plugin Armadito for GLPI

5 - Store only differences in database

Example :

\$ armadito-agent -t "AVConfig"


Note

The way Step 5 has been implemented leads to a great reduction of database size. Indeed, if 1000 agents have the same configuration, only 1 copy will be stored.