Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Hi there, I’ve found a bug in calculating time drift. The timestamps of hosts are collected as epoch numbers, and put into an array. When the array is sorted, a new array is created but the newly created array is not used in the script. Without sorting, you cannot calculate the drift.
This is what I found: my $epoch_oldest = $Host_Epoch_Hash{$Host_Epoch_Array[0]}{‘epoch’}; my $epoch_newest = $Host_Epoch_Hash{$Host_Epoch_Array[-1]}{‘epoch’};
This is what I changed: my $epoch_oldest = $Host_Epoch_Hash{$Host_Epoch_Array_Sorted[0]}{‘epoch’}; my $epoch_newest = $Host_Epoch_Hash{$Host_Epoch_Array_Sorted[-1]}{‘epoch’};
Checks works fine now!