Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-6510

Rewrite hostname for alerts

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 5.0.8
    • Server (S)
    • None

      Hi,

      at the moment we receive lots of SNMP traps from our scheduling application BMC Control-M.

      These traps will notify Zabbix when a scheduled job (script/program) failed.

      I added a typical trap as attachment.

      We already use snmptt to manipulate the output of the trap for Zabbix to:

      07:29:33 2021/02/15 BMC-CONTROLEM-MIB::alertTrap.10 Critical "Control-M" ctmemp01xxxxxx - ZBXTRAP 10.x.x.x"ControlM PROD-ITD, Job JOBNAME : Ended not OK on Host: linconvp1.xxxxxxx OrderID : 2ums1 Runcounter: 8 AlertId: 74134 CtrlmType: U CtrlmStatus: Noticed CtrlmGroup: xxxxx CtrlmApplication: xxxxxxx"

       

      These traps are send to our Zabbix Proxy. So for each alert received,the hostname is the proxy in Zabbix, but not the actual hostname where the Job failed.

      Sure is it possible to modify snmptt to change the source and put the correct SNMP OID/value as sender.

      But it would be useful to have some kind of HOST REWRITE in the trigger definition.

      F. ex. some kind of HOSTNAME = "{

      {ITEM.VALUE}

      .regsub(".on\sHost:\s(.)", "\1")}" field.  Same as we do for Tags.

       

       

      The same would be also useful when doing a tcp check:

      When you define an item on host "testserver":

      net.tcp.port[testserver,1234]

      The check will be done locally on the "testserver" and not from a proxy. So an issue with a firewall/switch between will not be detected.

      When adding the same item to a proxy:
      net.tcp.port[testserver,1234]

      The check will be done from the proxy, but the actual issue will be reported as hostname "proxy" and not "testserver".

       

      Here a HOST REWRITE to something like "{ITEM.KEY}.regsub(".[(.)]", "\1")}"" would be good.

       

       

       

            wiper Andris Zeila
            d1nd141 Dirk Hilges
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: