[ZBX-25975] Unoptimized Temperature CPU discovery for Mikrotik template Created: 2025 Feb 03  Updated: 2025 Jun 10

Status: Reopened
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 7.0.9, 7.2.3
Fix Version/s: 7.0.12rc1, 7.2.6rc1, 7.4.0beta1

Type: Problem report Priority: Minor
Reporter: Aigars Kadikis Assignee: Denis Rasikhov
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2025-02-03-05-48-51-403.png    
Issue Links:
Causes
causes ZBX-26386 mikrotik Temperature CPU discovery ch... Open
Team: Team INT
Story Points: 0.1

 Description   

In the official template, the LLD discovery rule "Temperature CPU discovery" will read the value of temperature:

Since the raw data (primary walk item) changes every minute and the temperature frequently changes, the LLD rule will rerun the full cycle frequently.



 Comments   
Comment by Aigars Kadikis [ 2025 Feb 03 ]

One way to improve is to add JavaScript preprocessing:

var json = JSON.parse(value);

result = json.map(function (el) {
	return {
		'{#SNMPINDEX}': el['{#SNMPINDEX}']
	};
});

return JSON.stringify(result);
Comment by Denis Rasikhov [ 2025 Apr 01 ]

Fixed in:

Comment by Michel Lobert [ 2025 Jun 10 ]

I have multiple Mikrotik routers, (RB5009, wAP ax, hAP ac3), after implementing this fix the temperature sensor is no longer discovered.

How can we resolve this ? 

Comment by Denis Rasikhov [ 2025 Jun 10 ]

Hello michel.lobert! My bad, I've made a mistake: the "Temperature CPU discovery" rule uses the OID from "Temperature sensor discovery", it will be fixed a bit later. Just change the OID in "SNMP OID" field for "Temperature CPU discovery":
walk[1.3.6.1.4.1.14988.1.1.3.10] -> walk[1.3.6.1.4.1.14988.1.1.3.11]

Comment by Michel Lobert [ 2025 Jun 10 ]

Hi Denis Rasikhov, that was indeed the solution, the CPU and Device temperature is discovered again. Thank you for the quick fix and response!

Generated at Sat Jun 14 17:38:36 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.