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

Zabbix Agent AllowKey/DenyKey to use RegEx for pattern matching

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • None
    • None
    • Zabbix 5.4.X

      It would be extremely more powerful if the Zabbix Agent AllowKey and DenyKey parameters to use regular expressions rather than the '*' character.

      It would enable more precise and flexible matching instead of lots of different entries for the same command but with different options.

      Example 1 - Before:

      • AllowKey=system.run[/bin/hostname]
      • AllowKey=system.run[/bin/hostname -f]
      • AllowKey=system.run[/bin/hostname -s]
      • AllowKey=system.run[/bin/hostname -d]
      • AllowKey=system.run[/usr/bin/hostname]
      • AllowKey=system.run[/usr/bin/hostname -f]
      • AllowKey=system.run[/usr/bin/hostname -s]
      • AllowKey=system.run[/usr/bin/hostname -d]
         

      Example 1 - After:

      • AllowKey="^system.run[(\/usr)*\/bin\/hostname -[fsd]]$"

       

      Example 2 - Before:

      • AllowKey=system.run[sc start ABC1]
      • AllowKey=system.run[sc start ABC2]
      • AllowKey=system.run[sc start ABC3]
      • AllowKey=system.run[sc start ABC4]
      • AllowKey=system.run[sc restart ABC1]
      • AllowKey=system.run[sc restart ABC2]
      • AllowKey=system.run[sc restart ABC3]
      • AllowKey=system.run[sc restart ABC4]

       

      Example 2 - After:

      • AllowKey="^system.run[sc (re)*start ABC[1-4]]$"

       

      As you can see the configuration is reduced and the matching is more specific.

            Unassigned Unassigned
            james.cook000@gmail.com James Cook
            Votes:
            9 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: