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?
Ad Widget
Collapse
Zabbix top process list shown while triggers
Collapse
X
-
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 -
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
if the item will become not supported, it will affect the whole triggerCode:or {Template:system.run["ps aux | sort -nrk 3,3 | head -n 5"].str()}<>1)
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,
KasparsComment
-
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
-
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
KasparsComment
Comment