Ad Widget

Collapse

Trigger when host added to host group

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • danoreilly
    Junior Member
    • Feb 2017
    • 6

    #1

    Trigger when host added to host group

    I need to create a trigger that will pop when a host is added to a host group. So far, I'm not getting very far. Any suggestions?
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #2
    you mean when someone adding new server to zabbix GUI -
    you can make a script via DB

    you have 3 tables that contains all this info:
    1. groups - youll need to collect groupid
    2. hosts_groups - there you can see which host connected to which group

    for exsample if i run this quary :
    Code:
    mysql  -N -s -D zabbixdb -e "select * from hosts_groups  where groupid = 9 "  | wc -l
    it will show me how mant host connected to hostgroup number 9
    and then you can make a trigger for that

    you'll identify group name using the table "groups "

    hope i helped

    Comment

    Working...