Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
9 changes: 5 additions & 4 deletions mib2zabbix.pl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ =head1 SUBROUTINES

use strict;
#use warnings;
no warnings 'experimental::smartmatch';

use Cwd 'abs_path';
use Data::Dumper;
Expand Down Expand Up @@ -173,8 +174,8 @@ =head1 SUBROUTINES

# 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,
Expand Down Expand Up @@ -222,8 +223,8 @@ =head1 SUBROUTINES
'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

Expand Down