Ad Widget

Collapse

Please give us advice on the Zabbix entry key regular expression

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ywm
    Junior Member
    • Feb 2025
    • 3

    #1

    Please give us advice on the Zabbix entry key regular expression

    Hello, I am a user using zabbix in Korea.

    logrt.count["/example/.*/([0-9]{1,5}_)?[a-zA-Z]{1,30}\.log$","INFO",,1000,skip]
    logrt.count["/example/[a-zA-Z]{1,10}/([0-9]{1,5}_)?[a-zA-Z]{1,30}\.log$","INFO",,1000,skip]

    If the directory name on the path is expressed as a regular expression as shown in the example key above, it is not applied and Not found directory error is displayed.
    Can't regular expressions be used in directory names in Zabbix key? Please let me know if there is a good way.

    Thank you.​
  • Answer selected by ywm at 26-02-2025, 02:05.
    Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    logrt.count[file regexp,<regexp>,<encoding>,<maxproclines>,<mode>,< maxdelay>,<options>,<persistent dir>]

    file regexp - the absolute path to file, with the file name specified using a regular expression. Note that the regular expression applies only to the file name and does not need to match the entire name (e.g., /path/to/agent will match zabbix_agentd.log).

    Comment


    • ywm
      ywm commented
      Editing a comment
      Thank you for your help.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    logrt.count[file regexp,<regexp>,<encoding>,<maxproclines>,<mode>,< maxdelay>,<options>,<persistent dir>]

    file regexp - the absolute path to file, with the file name specified using a regular expression. Note that the regular expression applies only to the file name and does not need to match the entire name (e.g., /path/to/agent will match zabbix_agentd.log).

    Comment


    • ywm
      ywm commented
      Editing a comment
      Thank you for your help.
Working...