User Tools

Site Tools


extensions:teemip-ip-discovery-collector

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
extensions:teemip-ip-discovery-collector [2023/03/15 17:30] – [Configuration] cnaudextensions:teemip-ip-discovery-collector [2023/08/08 15:07] – [Discovery functions] cnaud
Line 1: Line 1:
-{{ icons8-binoculars-48.png}}====== IP Discovery - Collector ======+{{ icons8-binoculars-48.png}} 
 +====== IP Discovery - Collector ======
 ---- dataentry summary ---- ---- dataentry summary ----
 name                : IP Discovery - Collector name                : IP Discovery - Collector
Line 5: Line 6:
 index_hidden        : no index_hidden        : no
 level_hidden        : 2 level_hidden        : 2
-version             : 3.1.0 +version             : 3.1.1 
-release_dt          : 2023-04-01+release_dt          : 2023-08-07
 TeemIp              : 3.x TeemIp              : 3.x
 iTop                : 3.x iTop                : 3.x
Line 15: Line 16:
 product_hidden      : included (standalone) product_hidden      : included (standalone)
 module-lists_hidden :  module-lists_hidden : 
-keyword_tags        : discovery, ping, lookup, scan+keyword_tags        : discovery, ping, fping, lookup, scan
 dependencies_s      :  dependencies_s      : 
-download_wiki       : [[https://sourceforge.net/projects/teemip/files/teemip%20-%20extensions/IP%20Discovery/IP%20Discovery%20-%20Collector/3.0.1/teemip-ip-discovery-collector-3.0.1-352.zip/download|teemip-ip-discovery-collector-3.0.1-352.zip]]+download_wiki       : [[https://sourceforge.net/projects/teemip/files/teemip%20-%20extensions/IP%20Discovery/IP%20Discovery%20-%20Collector/3.1.1/teemip-ip-discovery-collector-3.1.1-354.zip/download|teemip-ip-discovery-collector-3.1.1-354.zip]]
 github_wiki         : [[https://github.com/TeemIp/teemip-ip-discovery-collector|teemip-ip-discovery-collector]] github_wiki         : [[https://github.com/TeemIp/teemip-ip-discovery-collector|teemip-ip-discovery-collector]]
 php-max             : 8.1 php-max             : 8.1
Line 42: Line 43:
 ===== Revision History ===== ===== Revision History =====
 ^  Version  ^  Release Date  ^  Comments  ^ ^  Version  ^  Release Date  ^  Comments  ^
-|  3.1.0  |  2023-04-01  | Includes iTop Data Collector Base 1.3.0 \\ Implement collection plan feature of that collector base \\ Insure compatibility with PHP 8.1 |+|  3.1.1  |  2023-08-07  | Use fping as an option \\ Make sure collection order is respected \\ Complete list of optional attributes | 
 +|  3.1.0  |  2023-07-25  | Includes iTop Data Collector Base 1.3.0 \\ Implement collection plan feature of that collector base \\ Insure compatibility with PHP 8.1 |
 |  3.0.1  |  2022-09-21  | Align data model to TeemIp 3.x \\ Report number of discovered IPs at subnet level \\ Allow DHCP ranges to be skipped during discovery  |  3.0.1  |  2022-09-21  | Align data model to TeemIp 3.x \\ Report number of discovered IPs at subnet level \\ Allow DHCP ranges to be skipped during discovery 
 |  0.5.0  |  2020-10-20  | Improves reporting - Consider “connection refused” for scans | |  0.5.0  |  2020-10-20  | Improves reporting - Consider “connection refused” for scans |
Line 65: Line 67:
 At regular interval (defined by the administrator through a CRON command) the remote collector retrieves in TeemIp the list of networks that it has to discover and, for each of them, the list of IPs already registered. It, then, scans the network, computes  the delta between what has been discovered and the situation before the scan, stores the results of its findings locally and pushes these results back to TeemIp through a standard synchronization mechanism: At regular interval (defined by the administrator through a CRON command) the remote collector retrieves in TeemIp the list of networks that it has to discover and, for each of them, the list of IPs already registered. It, then, scans the network, computes  the delta between what has been discovered and the situation before the scan, stores the results of its findings locally and pushes these results back to TeemIp through a standard synchronization mechanism:
   * New discovered IPs are created,   * New discovered IPs are created,
-  * Ping, IP lookup or scan statuses are updated,+  * Ping / fping, IP lookup or scan statuses are updated,
   * A few statics on the discovery are documented within each subnet.   * A few statics on the discovery are documented within each subnet.
  
Line 82: Line 84:
 ===== Requirements ===== ===== Requirements =====
  
-On the application's side, the server must be configured to execute PHP files (minimum PHP version 7.1.3) and it must have a web access to the TeemIp server through https.+On the application's side, the server must be configured to execute PHP files (minimum PHP version 7.4) and it must have a web access to the TeemIp server through https.
 ===== Installation ===== ===== Installation =====
  
Line 139: Line 141:
     <ip_default_view>External</ip_default_view>     <ip_default_view>External</ip_default_view>
          
-    <!-- Discovery functions -->+    <!-- Absolute path for ping command - "ping" will be executed with no path if not provided-->
     <ping_absolute_path>/bin/</ping_absolute_path>     <ping_absolute_path>/bin/</ping_absolute_path>
-    <dig_absolute_path>/usr/bin/</dig_absolute_path>+    <!-- Absolute path for fping command - "fping" will be executed with no path if not provided--> 
 +    <fping_absolute_path>/usr/bin/</fping_absolute_path> 
 +    <!-- Absolute path for dig command - "dig" will be executed with no path if not provided--> 
 +    <dig_absolute_path>/usr/bin/</dig_absolute_path></parameters> 
 +     
 +    <!-- fping usage may be disabled here --> 
 +    <fping_enable>yes</fping_enable>
  
-</parameters>+    
 </code> </code>
  
Line 153: Line 161:
 | collectors_launch_sequence | List of collectors to run | N/A | | collectors_launch_sequence | List of collectors to run | N/A |
 | collector | Details for a collector class | N/A | | collector | Details for a collector class | N/A |
-|   name | Name of the collector class | TeemIpDiscoveryIPv4Collector | +|   name  | Name of the collector class | TeemIpDiscoveryIPv4Collector | 
-|   enable | Enbale or disable the collect | yes | +|   enable  | Enbale or disable the collect | yes | 
-|   rank | Order of the collect amongst allother collectors | 1 |  +|   rank  | Order of the collect amongst allother collectors | 1 |  
 | contact_to_notify | The email address of an existing contact in TeemIp to be notified of the results of the synchronization. | john.doe@demo.com | | contact_to_notify | The email address of an existing contact in TeemIp to be notified of the results of the synchronization. | john.doe@demo.com |
 | discovery_application_uuid | String that uniquely identifies the remote the IP Discovery Application in TeemIp. The string is automatically created at creation time of the IP Discovery object| FFF3_60D8_FEE6_520D | | discovery_application_uuid | String that uniquely identifies the remote the IP Discovery Application in TeemIp. The string is automatically created at creation time of the IP Discovery object| FFF3_60D8_FEE6_520D |
Line 163: Line 171:
 | ip_default_view | String that defines the default view to be set on discovered IPs (if relevant) | "" | | ip_default_view | String that defines the default view to be set on discovered IPs (if relevant) | "" |
 | ping_absolute_path | Absolute path of the ping tool | /bin/ | | ping_absolute_path | Absolute path of the ping tool | /bin/ |
 +| fping_absolute_path | Absolute path of the fping tool | /usr/bin/ |
 | dig_absolute_path | Absolute path of the dig tool | /usr/bin/ | | dig_absolute_path | Absolute path of the dig tool | /usr/bin/ |
 +| fping_enable | Enable usage of fping command | yes |
  
  
Line 191: Line 201:
  
 Once invoked through the command line, the discovery application will: Once invoked through the command line, the discovery application will:
-  - Connect to TeemIp to create its Synchronization Data Sources (or check their definition if they already exist and update them if needed) +  * Create its collection plan by connecting to TeemIp and retrieve: 
-  - Connect to TeemIp to retrieve: +    * The main discovery parameters to use, 
-    - What main discovery parameters to use, +    The list of subnets to discover and their specific settings (with regard the ping, ip lookup and scan functions), 
-    The list of subnets to discover and their specific settings (with regard the ping, ip lookup and scan functions), +    The list of IPs already configured in TeemIp and their attributes, 
-    The list of IPs already configured in TeemIp and their attributes, +  * Connect to TeemIp to create the related Synchronization Data Sources (or check their definition if they already exist and update them if needed) 
-  Ping and / or look up and / or scan all subnets' IPs, +  * Ping or fping (default) and / or look up and / or scan all subnets' IPs according to plan
-  Upload the collected data into TeemIp, +  Upload the collected data into TeemIp, 
-  Synchronize the collected data with the existing TeemIp IPs, +  Synchronize the collected data with the existing TeemIp IPs, 
-  Update the discovered subnets with their respective discovery durations.+  Update the discovered subnets with their respective discovery durations
 +  * Update statistics of discovery application.
  
 ==== Scheduling ==== ==== Scheduling ====
Line 211: Line 222:
 ==== Discovery functions ==== ==== Discovery functions ====
  
-The IP Discovery application discovers networks through standard network functions: ping, IP lookup and port scanning, each of them being individually activated for the applications. Furthermore, a function that is activated at the discovery application level can be inhibited for a subnet. +The IP Discovery application discovers networks through standard network functions: fping, ping, IP lookup and port scanning, each of them being individually activated for the applications. Furthermore, a function that is activated at the discovery application level can be inhibited for a subnet.  
 + 
 +**//FPing//** 
 + 
 +If it has been installed on the server and if it has not been disabled through the [[extensions:teemip-ip-discovery-collector#configuration|configuration file]], the [[https://fping.org/|fping]] command is used by default to ping IPs. Compared to ping, it provides enhanced performances and drastically reduces the time it takes to ping a network. it is called with the following parameters: 
 + 
 +^ Parameter ^ Defined in ^ Default value ^ 
 +| fping_absolute_path | /conf/params.local.xml | /usr/bin/ | 
 +| Ping timeout (s) | IP Discovery Application in TeemIp | 1 s | 
 + 
 +The command is invoked through the exec PHP function. 
 + 
 +   <fping_absolute_path/>fping -r1 -t <timeout> -ga <subnet_first_ip> <subnet_broadcast_ip - 1> 
 + 
 +For instance: 
 + 
 +   /usr/bin/fping -r1 -t1000 -ga 10.128.0.0 10.128.7.254
  
 **//Ping//** **//Ping//**
  
-This is the standard and well known command based on icmp request. It is called with the following parameters:+This is the standard and well known command based on icmp request. It is called when fping is not installed on the server or when it has been disabled. The following parameters are used:
  
 ^ Parameter ^ Defined in ^ Default value ^ ^ Parameter ^ Defined in ^ Default value ^
-| ping_absolute_path | /conf/params.local.xml | <empty_string> |+| ping_absolute_path | /conf/params.local.xml | /bin/ |
 | Ping timeout (s) | IP Discovery Application in TeemIp | 1 s | | Ping timeout (s) | IP Discovery Application in TeemIp | 1 s |
  
 The command is invoked through the exec PHP function. The command is invoked through the exec PHP function.
  
-   <ping_absolute_path/>ping c1 -w<timeout> <ip_to_ping>+   <ping_absolute_path/>ping -c 1 -W <timeout> <ip_to_ping>
  
 For instance: For instance:
  
-   /bin/ping -c1 -w2 10.11.12.13+   /bin/ping -c 1 -W 2 10.11.12.13
  
  
Line 235: Line 262:
  
 ^ Parameter ^ Defined in ^ Default value ^ ^ Parameter ^ Defined in ^ Default value ^
-| dig_absolute_path | /conf/params.local.xml | <empty_string> |+| dig_absolute_path | /conf/params.local.xml | /usr/bin/ |
 | DNS server #1 |IP Discovery Application in TeemIp - Can be a FQDN or an IP | <empty_string> | | DNS server #1 |IP Discovery Application in TeemIp - Can be a FQDN or an IP | <empty_string> |
 | DNS server #1 |IP Discovery Application in TeemIp - Can be a FQDN or an IP | <empty_string> | | DNS server #1 |IP Discovery Application in TeemIp - Can be a FQDN or an IP | <empty_string> |