Ad Widget

Collapse

IPMI items when the Sensor ID Strings are used more than once by an IPMI target.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jackson323
    Junior Member
    • Feb 2024
    • 1

    #1

    IPMI items when the Sensor ID Strings are used more than once by an IPMI target.

    I have some Dell IDRACs I'd like to monitor over IPMI.

    I can do this JUST fine with custom templates and custom items.

    I run into a problem though, when a Dell IDRAC IPMI server uses the same Sensor ID String for more than one sensor.

    Like this Temperature example for a Dell R610 that has only 1 temp censor and some un-used ones with the same ID String.

    Code:
    4 | Ambient Temp | Temperature | N/A | C | N/A
    6 | Ambient Temp | Temperature | N/A | C | N/A
    7 | Ambient Temp | Temperature | 25.00 | C | 'OK'​
    In this case, with IPMItool, if I index "Ambient Temp" I only get the first sensor.

    I can't IPMItool ... "sdr get" 4, 6, or 7.

    Zabbix doesn't understand 7. It only understands "Ambient Temp," and it happily collects the wrong one.

    Another example, a Dell R630 with 2 cpu temp censors :

    Code:
    24 | Temp | Temperature | 62.00 | C | 'OK'
    25 | Temp | Temperature | 64.00 | C | 'OK'​
    .... How could I "item" that second one? Zabbix will happily collect the first CPU temp, but not the second.

    It seems like Dell does a good job of naming fans and power supplies uniquely. But not temp sensors.

    So how can I index them in Zabbix?
  • PeterZielony
    Senior Member
    • Nov 2022
    • 146

    #2
    I don't he much experience with impi - I guess values comes one by one? Or it is returns all at the same time?

    either way you could have item preprocessing (javascript) to make all item as a JSON format ( this is the best approach). Once you have that you could build a low level discovery as dependent time to create more items prototypes (dependent again based on 1st value ) which then uses another preprocessing to get values based on JSON path

    i hope that makes sense?

    somethis like this for initial preprocessing:
    Code:
    const inputString = value;
    const [sensorID, sensorsSection, sensorName, sensorValue, sensorUnit, sensorStatus] = inputString.split(' | ');
    
    const resultJSON =
    [
    {
    "{#SENSORID}": sensorID.trim(),
    "{#SENSORSSECTION}": sensorsSection.trim(),
    "{#SENSORNAME}": sensorName.trim(),
    "{#SENSORVALUE}": sensorValue.trim(),
    "{#SENSORUNIT}": sensorUnit.trim(),
    "{#SENSORSTATUS}":sensorStatus.trim()
    }
    ];
    
    return resultJSON;
    (just idea - not tested)
    Last edited by PeterZielony; 03-02-2024, 16:50.

    Hiring in the UK? Drop a message

    Comment


    • Jackson323
      Jackson323 commented
      Editing a comment
      I probably don't know enough about Zabbix to make a whole lot of sense of this code.

      I was expecting something like :

      Key: ipmi.sensor.Fan2A
      IPMI Sensor: Fan2A

      But for cases where they just named 6 different fans "Fan"

      These pre-processing steps though make me wonder. Not about doing it in the item, but something in discovery?

      If I do an ipmi.get, zabbix builds a big JSON object based on what IPMI told it, maybe that's where I can find the extra sensors.
  • PeterZielony
    Senior Member
    • Nov 2022
    • 146

    #3
    You can read about preprocessing and low level discovery here:


    additional preprocessing for items:




    Hiring in the UK? Drop a message

    Comment

    Working...