Ad Widget

Collapse

Regexp with last/avg

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dj4jux
    Junior Member
    • Apr 2014
    • 2

    #1

    Regexp with last/avg

    Hello. I'm quite a beginner in zabbix and question is that is it possible to add regexp trigger with last or average.
    Item gets value over SNMPv3 agent
    Output example: 70% of maximum

    Example of trigger: {SNMPv3_template:FanSpeed_10.regexp("^8[5-9]|9[0-9]|100")}=1

    Is there a way to add avg 10 minutes or last 5 times to this trigger?

    Using zabbix version 2.2.2
  • Slash
    Member
    • May 2011
    • 64

    #2
    Forget about regex and use something like this :

    Code:
    {SNMPv3_template:FanSpeed_10.avg(10m)}>70
    But I'm not sure about your fan speed to begin with... is it a percentage? This need to be one for the previous trigger to work. All of my fan speed items are in RPM, so I think a better way to monitor fans is just to get their status with the correct SNMP OID (you usually have one for fan status).

    In this case, you only want to know when the fan status changes, example for a cisco 3560G switch:

    Code:
    {Cisco 3560G:snmp.1.3.6.1.4.1.9.9.13.1.3.1.6.1005.last(0)}#1

    Comment

    • dj4jux
      Junior Member
      • Apr 2014
      • 2

      #3
      Hy Slash, thanks for replay.
      I'm monitoring IBM blade chassi h and using CME-MIB to monitore it.
      Why i used regexp because i get this kind of reply from chassi:
      Code:
      [root@zabbix /]# snmpget -v3 -u User -l authnoPriv -a MD5 -A Password IP CME-MIB::chassisFanSpeed.1
      CME-MIB::chassisFanSpeed.1 = STRING: "67% of maximum"
      [root@zabbix /]# snmpget -v3 -u User -l authnoPriv -a MD5 -A Password IP 1.3.6.1.4.1.2.3.51.2.2.3.50.1.3.1
      SNMPv2-SMI::enterprises.2.3.51.2.2.3.50.1.3.1 = STRING: "67% of maximum"
      OK Fan trigger i can configure to Fan.state. Thanks

      But there's also Temperature trigger, what bothers me most. Client gave the temperature differences when alert should be trigged, but triggers should be trigged when alert have been up for ~10 minutes.
      Code:
      [root@zabbix /]# snmpget -v3 -u User -l authnoPriv -a MD5 -A Password IP CME-MIB::componentTemperaturesSensorValue.6.1.1.3.1.3.1.1
      CME-MIB::componentTemperaturesSensorValue."......".1 = STRING: "18.00 Centigrade"
      Item:

      Trigger:
      {SNMPv3_template:componentTemperaturesSensorValue1 0_1.regexp("^(([0-9]|[1][0-4])\.[0-9][0-9])")}=1

      Comment

      • Slash
        Member
        • May 2011
        • 64

        #4
        For temperature, you usually have a MIB of type "gauge32" or "integer", I never saw one like you with a string type. With a string type, you cannot graph it so it sucks. Also the easiest way to create a trigger is simply to set a threshold, but again with a string, it's not possible.

        Maybe look with snmpwalk to see if an other MIB with temperature exists with an interger type?

        Something like :

        Code:
        snmpwalk -v3 -u User -l authnoPriv -a MD5 -A Password IP CME-MIB::componentTemperaturesSensorValue.6.1.1.3.1.3.1
        You should get all the parent MIB, if you don't find one with th temperature as a simple integer, just remove an other number at the end and retry. Also look for the temperature state if it exists, you could monitor this one instead.

        If you can't find one, if it were me, I'll create a script to convert the string to an integer before getting it into zabbix to be able to graph it.

        Comment

        Working...