You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2022-06-20 18:41:10

spinal_df
Member
Registered: 2019-02-20
Posts: 10

Help with SNMP

Dears, 
      I pretend expand timeout of fusioninventory-netinventory, What file can I change this config:

====> Details:
fusioninventory-netinventory --version
NetInventory task 4.2
based on FusionInventory Agent v2.6-1.el8

====> My error:
fusioninventory-netinventory --host 10.1.1.1 --credentials version:2c,community:tomato --timeout 120

<?xml version="1.0" encoding="UTF-8" ?>
<REQUEST>
  <CONTENT>
    <DEVICE>
      <ERROR>
        <ID>0</ID>
        <MESSAGE>SNMP communication error: The timeout value 120 is out of range (1..60)</MESSAGE>
      </ERROR>
    </DEVICE>
    <MODULEVERSION>4.2</MODULEVERSION>
    <PROCESSNUMBER>1</PROCESSNUMBER>
  </CONTENT>
  <DEVICEID>foo</DEVICEID>
  <QUERY>SNMPQUERY</QUERY>
</REQUEST>

Offline

#2 2022-06-22 14:30:05

gbougard
Moderator
From: Montpellier, France
Registered: 2021-07-21
Posts: 534
Website

Re: Help with SNMP

Hi spinal_df,

it seems to be a Net::SNMP perl module limitation: the timeout must be between 1 and 60 seconds. It's 5 by default.

Are you really sure to need such long timeout ?


GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer

Offline

#3 2022-06-22 15:53:25

spinal_df
Member
Registered: 2019-02-20
Posts: 10

Re: Help with SNMP

Yes, I need add more time with snmp command I have more results.

Offline

#4 2022-06-22 18:17:27

gbougard
Moderator
From: Montpellier, France
Registered: 2021-07-21
Posts: 534
Website

Re: Help with SNMP

That timeout is really for only one SNMP request at a time. Unless you have a very busy device which can't answer one SNMP request in a minute, this makes no sens to have a great value here.
If you mean your inventory is aborted by the agent, this is really what you want. What's really happening when you don't set timeout ?

Please, if you know you have one SNMP request which takes more than a minute, can you share more details ?


GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer

Offline

#5 2022-06-23 16:39:42

spinal_df
Member
Registered: 2019-02-20
Posts: 10

Re: Help with SNMP

Well, if I use this command:

snmpwalk -v2c -c example 192.168.15.3 (complete informations)

If I change these files for 'timeout' for 120 seconds, i have complete info.

/usr/share/fusioninventory/lib/FusionInventory/Agent/Config.pm

'timeout'                 => 120,

/usr/share/fusioninventory/lib/FusionInventory/Agent/Task/NetInventory.pm

timeout      => $params->{timeout} || 120,

I need only change parameter for accept 120 seconds for some occasions.

I would like only use fusioninventory-netinventory with 120 seconds, because I use on glpi inventory with snmp protocol about switches and anothers scripts.

Offline

#6 2022-06-27 11:22:59

gbougard
Moderator
From: Montpellier, France
Registered: 2021-07-21
Posts: 534
Website

Re: Help with SNMP

If a walk takes more than 2 minutes with the system command, this doesn't mean you need a greater timeout for the agent. A I said, the timeout if only for one snmp request. When you run a walk, snmpwalk makes on snmp request for each OID line from the generated walk. So the timeout for snmpwalk command is really not the same than the one for Net::SNMP perl module.
And as I said, the Net::SNMP module doesn't support a greater timeout (by snmp request again).

Have you even try to run the agent with 60 as timeout ? And in that case, do you have an error ? And if you have an error, can you report it ?


GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer

Offline

Board footer

Powered by FluxBB