Ad Widget

Collapse

LLD different pre-processing for Celsius and Kelvin

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jswheeler
    Junior Member
    • Feb 2024
    • 22

    #1

    LLD different pre-processing for Celsius and Kelvin

    I've implemented a low level discovery rule for QNAP to discover SMART data.

    https://jswheeler.medium.com/monitor...x-4cea992a3ae9

    Recently I added a PCI card with four additional NVME drives to my QNAP device.

    I've made minor modification to my discovery to accommodate the PCI card and can discover all drives.

    The issue I'm running into is that the SATA drives report temperature in Celsius. For reasons I can't understand, NVME drives report temperature in Kelvin.

    I thought I may be able to change item pre-processing using overides in discovery but pre-processing is not an option with overrides. I don't believe preprocessing has logic that can evaluate item labels or some other relevant contextual data to apply the appropriate formula.

    How do people handle LLD discovery with devices (maybe from other manufactures) that have different units?

    The only other option I have is to go back to my LLD script and make changes there to detect the device and convert the given value.
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1782

    #2
    How about a item preprocessing rule with a script? Kelvins should be recognizeable: if the temperature reading is like over 250, assume it is in Kelvin and convert to Celsius, otherwise return the value as-is.

    Markku

    Comment

    • jswheeler
      Junior Member
      • Feb 2024
      • 22

      #3
      It's a bit hacky (not that I'm above that). Next thing you know, I'll have to deal with C, F and K. For now, I think your suggestion will work, A script with the logic built in to normalize to a value.

      Thanks!

      Comment

      Working...