Ad Widget

Collapse

Zabbix top process list shown while triggers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iftitutul
    Member
    • Sep 2017
    • 51

    #1

    Zabbix top process list shown while triggers

    I am using zabbix 3.4 and using zabbix trigger: processor load is too high (default template: os linux). But I want to add more. Likewise while these triggers are generated it will shows top 5 processes on zabbix history/mail. Is it any way to solve it?
  • kaspars.mednis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2017
    • 349

    #2
    You can try to create an action on trigger event, that will execute top5 command on your system and send the output to email

    regards,
    Kaspars

    Comment

    • iftitutul
      Member
      • Sep 2017
      • 51

      #3
      kindly share the expression please.

      Comment

      • sby
        Member
        • Jan 2017
        • 59

        #4
        if you can share would that be great.

        Comment

        • kaspars.mednis
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2017
          • 349

          #5
          Hello !

          one POSSIBLE solution may be:

          create second item on your host

          zabbix agent: system.run["ps aux | sort -nrk 3,3 | head -n 5"]

          remote commands must be enabled on every agent to execute that !!!

          include this second item in trigger expression (make same second fake test in trigger like
          Code:
          or {Template:system.run["ps aux | sort -nrk 3,3 | head -n 5"].str()}<>1)
          if the item will become not supported, it will affect the whole trigger

          with this kind of trigger, you can use the message template

          Item values:
          1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}
          2. {ITEM.NAME2} ({HOST.NAME1}:{ITEM.KEY2}): {ITEM.VALUE2}

          this solution is not ideal, it collects a lot of unneeded history info for CPU top, thats just an idea how to do that

          regards,
          Kaspars

          Comment

          • iftitutul
            Member
            • Sep 2017
            • 51

            #6
            I just added userparameter in zabbix agent configuration and also created an history item. So these item I am just shown in action mail section. but it generates lots of history which I don't need.
            I have so many hosts and each host generates lots of history in everyday. So I need to solution that when only zabbix trigger generates it gets the only top process list.

            Comment

            • kaspars.mednis
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Oct 2017
              • 349

              #7
              Hello !

              I see two possible scenarios

              - make very short history keeping period, the shortest is 1 hour. It will still have impact on housekeeper/DB performance, but the DB will not grow so much

              - make your custom script, that will be executed from an action operation step. This script will generate TOP5, and send this information to email address. But this email will be sent from script, not from zabbix, which may be not good by design considerations

              regards
              Kaspars

              Comment

              Working...