# How to manage an isolated network

{% hint style="danger" %}
**This is for advanced use only. To inventory your printers and network hardware, please use this** [**procedure**](/tutorials/inventory/snmp_inventory.md)
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=mM45fIim-SY>" %}

***

Collecting inventory data from servers, network devices, and workstations across your company without installing an agent on every device is possible through the use of the [GLPI Agent](broken://spaces/QFOh36etagWOcP9q4ECb/pages/IPHl4EkPahYpoj0izLtj#where-can-i-find-the-agent-configuration-file) Remote Inventory features.

These features are particularly useful when internal policies prevent technicians from installing the GLPI agent on all servers, when there's no centralized installation method for the agent, or when the environment involves the use of isolated networks which should not connect to the internet or an additional network where the GLPI server is.

{% hint style="info" %}
**Requirements to use Remote Inventory**

* At least 1 devices running GLPI Agent version 1.6 or above
* This device must have network access to devices you want to scan&#x20;
* The GLPI Agent Toolbox activated&#x20;
* The list of IP Ranges from the network you want to scan and collect data from&#x20;
  * several VLANs mat be split into different ranges for better performance&#x20;
* SSH, SNMP and WinRM credentials with administration permissions for the targeted devices
  {% endhint %}

{% hint style="danger" %}
&#x20;**Attention**

The toolbox is not intended to be installed on insecure networks.

* Activate the [basic authentication](https://app.gitbook.com/s/QFOh36etagWOcP9q4ECb/agent#how-do-i-activate-basic-authentication-toward-glpi-agent)
* [Set the trusted IP networks or hosts authorized](https://glpi-agent.readthedocs.io/en/latest/configuration.html#httpd-trust) to access the toolbox
* Activate SSL on the agent
* Take good care of the yaml file that is created during the configuration
  {% endhint %}

{% hint style="success" %}
**Current environment**&#x20;

* The following task is going to scan one networks&#x20;
  * 172.16.10.250 to 172.16.10.254 - containing network devices with SNMP enabled, alongside Linux servers with ssh access enabled
* The task should run every every 5 hours&#x20;
* There will be ssh credentials for remote linux servers
  {% endhint %}

After the information is gathered, you can check the following steps:

## Activate the navigation bar menus

For this example you only need 4 menus:

* Credentials
* Inventory
* IP Ranges
* Scheduling
* Open the GLPI Agent Toolbox Web Interface at `http://agentip:62354/toolbox`
* Click on the cog icon on the top right of the screen

![Set-up GLPI Agent](/files/bnQGxC5pNVMF7KgPZ1nv)

* On **`Navigation bar`** session enable

  * **`Show Credentials`** in navigation bar
  * **`Show Inventory`** tasks in navigation bar
  * **`Show IP Ranges`** in navigation bar
  * **`Show Scheduling`** in navigation bar

  &#x20;

  <figure><img src="/files/Z20CvjP268Nq9kYVadwS" alt=""><figcaption></figcaption></figure>

  * Click on **`Update`** at the bottom of the page

  &#x20;

  <figure><img src="/files/ogpR7xPEhYdtLu37ovaT" alt=""><figcaption></figcaption></figure>
* Go back to home clicking on the GLPI Agent icon on top left of the screen

Now you will be able to see new menus on your left where you will create the inventory tasks.

## Create an Inventory Task

### Create an execution scheduling

{% hint style="info" %}
**Note**&#x20;

Even if you want a task to be run just once, you must create a schedule to add it to the task
{% endhint %}

* From your GLPI Agent Toolbox home page, click on the **`Scheduling`** tab
* Click on **`Add new scheduling`**
* The **Name** of the scheduling is for administrative purposes
* Choose a **Type**&#x20;
  * in this example, **`Delay`**&#x20;
  * since there's the need of running this task every 5 hours&#x20;
  * for more information about the types, please refer to the [scheduling official documentation](https://glpi-agent.readthedocs.io/en/1.12/plugins/toolbox-plugin.html#scheduling)
* Click on **`Add`**

![Alt text](/files/s2jody301xIgZzyjQJzX)

## Register SNMP, SSH, ESXi and WinRM Credentials

* From yout GLPI Agent Toolbox home page, click on the **`Credentials`** tab
* Click on **`Add Credential`**

  * Give it a **name**
  * Select the **type** according to your devices - in this case `ssh`
  * Type the `ssh` **Username**
  * Type the **Authentication password**
  * Select the **port** - here is the default port for ssh - **`22`**
  * Select Remote SSH Mode **`libssh`**
  * You can add a **descriprion** to this credential if needed
  * Click on **`Update`**

  !!! note Add more credentials to different usernames and/or protocols

![Set up credentials](/files/ojZA67SEaGG9uEfzsbSC)

For more information, please refer to the [official documentation](https://glpi-agent.readthedocs.io/en/1.12/plugins/toolbox-plugin.html#credentials)

## Create the IP Ranges to be scanned

* Click on **`IP Ranges`**
* Name the **IP Range** `Network A`
* On **`IP range start`** type the first IP address be scanned on your range
  * `172.16.10.250`
* On **`IP range end`** type the last IP address to be scanned on your range
  * `172.16.10.254`
* Add the **credentials** previously created that will be used in this IP range
  * `rootlinux`

![IP range parameters](/files/yx1hY41rh9vaiRldppQu)

!!!note Repeat the step above for the second IP range

For more information, please refer to the [official documentation](https://glpi-agent.readthedocs.io/en/1.12/plugins/toolbox-plugin.html#ip-ranges)

## Create the Inventory Task

* Click on **`Add new inventory task`**
* Name your task to be easy to find and understand it after
* Select the type
  * **Local inventory** for only the computer where the agent is installed
  * **Network scan** to run a network scan
* Select a **Target** for this task
  * It will use the servers that you have created before as targets or the **Agent folder** when you need to create an XML and import it to GLPI after
  * **server0** - it's the URL set up in GLPI Agents config file or installation
* Select the **scheduling type**
  * **`Every 5 hours`**
* Add a **tag** to make business rules an easier task&#x20;

<div align="left"><figure><img src="/files/GQ9xSRfkLZwJ1iNfzEIb" alt="" width="563"><figcaption></figcaption></figure></div>

* Associate the **ip ranges** created

<div align="left"><figure><img src="/files/m7PfaEfGOV6VPbjo8e7F" alt="" width="563"><figcaption></figcaption></figure></div>

* Set the **number of threads** that you desire to run
* Set the time of **Connection timeout**

<div align="left"><img src="/files/K6HWxBNdG8V1ShKpq7of" alt="Set up the inventory task parameters"></div>

{% hint style="success" %}
**Tip**

**Threads** is the number of remote devices the task will query for at the same time - **Timeout** is the number of seconds before the agent will decide a remote device is not responding&#x20;
{% endhint %}

{% hint style="warning" %}
**Warning**

You may set a higher number of threads to request for more devices at the same time, and a higher timeout for devices that may be much further from your GLPI Agent scanner. **Keep in mind that it consumes more resources of your Agent and Network**.
{% endhint %}

* Enable the Inventory task by clicking on the respective select box and on Enable&#x20;

  <div align="left"><figure><img src="/files/Y41hBEHUACVkWwj0eHEt" alt=""><figcaption></figcaption></figure></div>

You may also refer to our video about setting up the GLPI Remote Inventory at our YouTube Channel.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.glpi-project.org/tutorials/inventory/advanced-usage/remote_inventory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
