Cacti / plugin_mactrack

Mactrack Plugin for Cacti
GNU General Public License v2.0
12 stars 24 forks source link

Interface ifLastChange unable to handle results returned in timetics #181

Closed bytestore closed 11 months ago

bytestore commented 1 year ago

No timestamp in table mac_track_interfaces row ifLastChange On the web page Last Change date is incorrect in the list of interfaces

изображение

debug variable ifLastChange In the file mactrack_functions.php

DEBUG: ifLastChange
array(27) {
  [1]=>
  string(12) "0:0:01:48.59"
  [1000]=>
  string(12) "0:0:02:27.39"
  [10101]=>
  string(15) "121:21:06:54.76"
  [10102]=>
  string(15) "271:20:51:44.11"
  [10103]=>
  string(15) "164:22:38:52.55"

Cacti Version 1.2.22 SPINE 1.2.16 PHP Version 5.6.40-63+0~20220929.69+debian11~1.gbp639d4c Debian GNU/Linux 11 (bullseye)

I fixed it this way for now In the file mactrack_functions.php on line 863 converted data in variable $ifLastChange[$ifIndex] into timeticks and the database started to receive timesticks But it's a temporary solution, maybe i need to tweak php or something?

TheWitness commented 11 months ago

What math did you use? What function?

TheWitness commented 11 months ago

I'm an idiot ;)

TheWitness commented 11 months ago

This should be resolved now.