Ad Widget

Collapse

Assist defining Trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • datasheet
    Junior Member
    • Jul 2010
    • 1

    #1

    Assist defining Trigger

    Zabbix Version: 1.8.2

    I have one script that I run against my Oracle Database

    The script just find a tablespace that is 97% used.

    Result:

    Tablespace PERCENT_USED
    USERS 97

    I just want a trigger that will fire when we found any tablespace that is 97% used.

    I am using system.run[command] and it is working just fine but i am unable to define a proper function on trigger.

    Any suggestion?
  • jerrylenk
    Member
    Zabbix Certified Specialist
    • May 2010
    • 62

    #2
    Originally posted by datasheet
    Result:

    Tablespace PERCENT_USED
    USERS 97

    I just want a trigger that will fire when we found any tablespace that is 97% used.
    I understand your script returns the above result as text?
    Then you would need some RegularExpression that matches "97", "98", "99" or "100", but that sounds complicated. I am not into regex though. Perhaps it isn't.

    Easier, IMHO, would be modifying the script to print out only the Number, or writing a wrapper script to strip everything but the Number.
    Then your trigger expression would look like:

    {your.host:system.run[<your_script>,wait].last(0)}>=97

    Comment

    Working...