Ad Widget

Collapse

Discovery and Actions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ale123
    Junior Member
    • Feb 2009
    • 10

    #1

    Discovery and Actions

    Hello,
    we have some discoveries that will detect severs with snmp and "sysDescr.0".
    After that, we have created some action that will create the host and will add it to the "Linux servers" group.

    Now, we have to add the same host even to another group if some snmp received values are equal to a custom data.

    How can we make that? Should we create another discovery rule?
    Is not possibile to have the same discovery rule and make different action based on some snmp values?

    For example, all server with sysDescr.0 containing "Linux" should be added to "Linux servers" group, and server with "myCustomSnmpItem" equal to "DELL" should be ALSO addedd to "DELL Servers"

    Thank you.
  • bee
    Senior Member
    • Jun 2007
    • 133

    #2
    Anyone have figure out of it? have same question here,

    Comment

    • danrog
      Senior Member
      • Sep 2009
      • 164

      #3
      We make HEAVY use of Discovery and Discovery Actions (in fact we never add a host manually to any group or manually link to templates). We only started rolling out Zabbix last week (after a lot of pre-config work) to replace our other monitoring system and in the past week we've moved over 1500 hosts all with discovery. I will also admit we are very strict in our server naming conventions, which helps tremendously when creating actions.

      Here is what we do:
      Code:
      Agent custom config file created during RPM install:
      # Get list of users running processes AND all custom apps stored in /home
      UserParameter=system.apps,(ps -o "%U" -A | grep -v USER; find /home -maxdepth 1 -type d -printf "%f\n")|sort|uniq|awk 'BEGIN { ORS="" }{ print $1,"" }'
      # Get Server type (returns: Dell|IBM|VMware|HP|......)
      UserParameter=system.type,dmidecode | grep -A1 -e "System Information" | awk 'BEGIN { RS="" }{ FS=":" }{ sub(/,/,"",$4) }{ print $4 }'
      Code:
      Discovery Rule Checks:
      Delay: 3600 (this varies but is never lower then an hour)
      Agent: system.uname
      Agent: system.apps
      Agent: system.type
      Agent: system.hostname
      
      Action for LINUX systems:
      (A) 	Service type = "Zabbix agent"
      (B) 	Discovery status = "Up"
      (C) 	Uptime/Downtime >= "3600"
      (D) 	Received value like "Linux"
      Operations: Link to Template_Linux, Add to group "Std - Linux"
      
      Action for DELL Systems:
      (A) 	Service type = "Zabbix agent"
      (B) 	Discovery status = "Up"
      (C) 	Uptime/Downtime >= "3600"
      (D) 	Received value like "Dell"
      Operation: Link to Template_Dell_Openmanage
      
      Action for CUSTOMAPP1 Systems:
      (A) 	Service type = "Zabbix agent"
      (B) 	Discovery status = "Up"
      (C) 	Uptime/Downtime >= "3600"
      (D) 	Received value like "customapp1"
      Operation: Link to Template_App_Custom1
      Hope this gives you guys some ideas

      Comment

      Working...