Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Limit OCS Agents number connected to the server

Hi!
How to limit OCS Agents number connected to the server?
I would like to configure the server to block registration of new OCS Agents if their number exceeds 1000.
I will be very grateful for Your answers.
ago in OCS Inventory NG server for Unix by (240 points)

1 Answer

0 votes

To effectively limit the number of OCS Inventory Agents connected to the server and block registration of new agents when their number exceeds a certain threshold (like 1000), you would need to implement a custom solution.

  1. Creating a script to monitor the number of registered agents.
  2. Modifying the server's configuration or implementing a filter when this number reaches the desired limit.
  3. Possibly adjusting the Communication Server to reject new agent registrations once the limit is reached.

So sorry i think there is no solution out of the box

perhaps you can try

INVENTORY_FILTER_FLOOD_IP

to limit "aggressive" ip's

https://wiki.ocsinventory-ng.org/03.Basic-documentation/Administration-of-OCS-Inventory-NG/

To use INVENTORY_FILTER_* settings for anti-flooding or filtering by IP in OCS Inventory, you can configure the following options:

    Enable inventory flooding filter:
    Set INVENTORY_FILTER_FLOOD_IP to 1 in the OCS Inventory configuration
    .
    Define the anti-flooding period:
    Use INVENTORY_FILTER_FLOOD_IP_CACHE_TIME to set the period in seconds. For example, setting it to 300 seconds (5 minutes) will allow only one new computer registration from a specific IP address within that timeframe
    
    .
    Enable the inventory filter stack:
    Set INVENTORY_FILTER_ON to 1 to activate the filter stack for inventories
    
    .
    Configure in Apache:
    In the ocsinventory-server.conf file, you can set these options using PerlSetEnv directives:

PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP
PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP_CACHE_TIME 300
PerlSetEnv OCS_OPT_INVENTORY_FILTER_ON

These settings enable the inventory flooding filter, set the cache time to 300 seconds, and turn on the inventory filter stack
 

ago by (24.7k points)
edited ago by
 
Powered by Question2Answer
...