Ad Widget

Collapse

System.run functionality

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hbm
    Junior Member
    • Mar 2017
    • 9

    #1

    System.run functionality

    Hello,

    I am looking to create a template to test some command status , I tried the below method to collect the info ,but my trigger seems not working ...

    I am trying to get the alert if I see the DOWN from that command

    My Item is like this
    Type :Zabbix agent
    Key : system.run[lpconfig -l | grep drive | grep DOWN |awk {'print "This " $9 " is " $6'} ,wait]
    Type of information :text

    Trigger
    Expression :{Template-XXX-Status:system.run[lpconfig -l | grep drive | grep DOWN |awk {'print "This " $9 " is " $6'} ,wait].last(#3)}<>0

    I see the latest data with the DOWN .. but its not triggering ,

    Any help would be appreciated.

    Thanks.
  • zampd
    Junior Member
    • Sep 2017
    • 3

    #2
    Have you tried configuring the expression with a regular expression statement?

    Comment

    • allexpetrov
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2017
      • 361

      #3
      Hi,
      first thing ipconfig is the Windows OS command and the linux will have ifconfig. Second - you are receiving textual value, not the numeric value.

      Regards,
      Alex!

      Comment

      • hbm
        Junior Member
        • Mar 2017
        • 9

        #4
        Yep ..that worked

        Thanks

        Comment

        • allexpetrov
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • May 2017
          • 361

          #5
          Cool, one more hint: UserParameteres https://www.zabbix.com/documentation...userparameters , this could shorten your keys and make the expressions look prettier

          Regards,
          Alex!

          Comment

          Working...