Skip to content

Commit

Permalink
Fix last discovery date not updating anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Hipska committed Jun 19, 2024
1 parent 8a86d2d commit 7817537
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion module.snmp-discovery-collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'snmp-discovery-collector/1.3.1',
'snmp-discovery-collector/1.3.2',
[]
);
4 changes: 4 additions & 0 deletions params.distrib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
<!-- additional network devices to discover -->
<additional_device_where>status = 'production'</additional_device_where>

<!-- date format in collected data -->
<!-- @see https://github.com/Combodo/itop-data-collector-base/pull/54 -->
<date_format>Y-m-d H:i:s</date_format>

<json_placeholders>
<prefix/>
<uuid>$discovery_application_uuid$</uuid>
Expand Down
2 changes: 1 addition & 1 deletion src/SnmpDiscoveryCollector.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ protected function DiscoverDeviceByIP(int $iKey): ?array
'status' => $aDefaults['status'],
'serialnumber' => $bLoadSerial ? $sSerial : null,
'responds_to_snmp' => 'yes',
'snmp_last_discovery' => date('Y-m-d H:i:s'),
'snmp_last_discovery' => date(Utils::GetConfigurationValue('date_format', 'Y-m-d H:i:s')),
'snmp_sysname' => $sSysName,
'snmp_sysdescr' => trim($sSysDescr),
'snmp_syscontact' => $sSysContact,
Expand Down

0 comments on commit 7817537

Please sign in to comment.