This commit is contained in:
sputtene 2022-07-15 11:50:42 +02:00 committed by GitHub
commit a1d0173dfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -36,8 +36,8 @@ tree in a SNMP MIB file.
Zabbix item configuration
--check-delay=SECONDS check interval in seconds (default: 60)
--disc-delay=SECONDS discovery interval in seconds (default: 3600)
--check-delay=TIME check interval in Zabbix time units (default: 1m)
--disc-delay=TIME discovery interval in Zabbix time units (default: 1h)
--history=DAYS history retention in days (default: 7)
--trends=DAYS trends retention in days (default: 365)

View file

@ -75,6 +75,7 @@ http://www.webnms.com/snmp/help/snmpapi/snmpv3/table_handling/snmptables_basics.
use strict;
#use warnings;
no warnings 'experimental::smartmatch';
use Cwd 'abs_path';
use Data::Dumper;
@ -173,8 +174,8 @@ my $snmpv3_sec_protocol_map = {
# Default command line options
my $opts = {
delay => 60, # 1 minute check interval
disc_delay => 3600, # Hourly discovery
delay => '1m', # 1 minute check interval
disc_delay => '1h', # Hourly discovery
enableitems => 0, # Disable items
group => 'Templates',
history => 7,
@ -222,8 +223,8 @@ GetOptions(
'x|privacy=s' => \$opts->{ v3sec_protocol }, # SNMPv3 Privacy protocol
'X|privpass=s' => \$opts->{ v2sec_pass}, # SNMPv3 Privacy passphrase
'check-delay=i' => \$opts->{ delay }, # Update interval in seconds
'disc-delay=i' => \$opts->{ disc_delay }, # Update interval in seconds
'check-delay=s' => \$opts->{ delay }, # Update interval in seconds
'disc-delay=s' => \$opts->{ disc_delay }, # Update interval in seconds
'history=i' => \$opts->{ history }, # History retention in days
'trends=i' => \$opts->{ trends }, # Trends retention in days