Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Zabbix time spec instead of just seconds for check-delay and disc-delay #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
8 changes: 4 additions & 4 deletions mib2zabbix.pl
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,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 +222,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