Ad Widget

Collapse

Help with preprocessing on discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Robilly
    Junior Member
    • Mar 2014
    • 10

    #1

    Help with preprocessing on discovery

    Hello guys,

    I've just created a discovery rule, but the names of the discovery rules (mib on vmware vcenter via snmp) contain also some parameters of the process (like java parameters, batch parameters and so on) and then if i use it as a name of the process i'll have also the parameters in the name (and the it's not readable for the trigger for example).
    I can use the regex to obtain just the part before the space to exclude the parameters in the name, but on discovery, the preprocessing seems to work on just one unique list with all the results, and not every single value/raw extracted via snmp.
    do you have some suggestions?
    for example now I've
    "Process status vmware-eam.launcher -Xmx128m -XX:CompressedClassSpaceSize=64m -Xss256k -XX:ParallelGCThreads=1 -Dlog4j2"
    as a name of the discovered item -.-

    Thanks!​
  • Robilly
    Junior Member
    • Mar 2014
    • 10

    #2
    Nobody knows how to fix it?

    Thanks!

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4806

      #3
      I think you are looking for this.. https://www.zabbix.com/documentation...acro-functions

      Comment

      • Robilly
        Junior Member
        • Mar 2014
        • 10

        #4
        Originally posted by cyber
        Thanks cyber! This sounds good.
        But I've already tried and probably I'm an idiot and I'm missing something, seems that the regsub it's not applied
        Example:

        On the trigger prototype:
        {{#SNMPNAMEPROC}.regsub("^([^ ]+)", \1)}
        (I've tried inTags section, and with Name and Event Name in Trigger section)

        In all cases the SNMPNAMEPROC it's expanded with the vmware value, but the regexp it's not applied, then the output is something like:
        Service not running {vmware-vmafd/sbin/vmafdd -s.regsub("^([^ ]+)", \1)}
        then with the variable SNMPNAMEPROC expanded and then with the string of the regsub :\


        Thanks!

        Comment

        • Robilly
          Junior Member
          • Mar 2014
          • 10

          #5
          I've try many tests but all without success any suggestion?

          Thanks!​

          Comment

          Working...