Ad Widget

Collapse

Item preprocessing failes regex with non-latin chars.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • a13x
    Junior Member
    • Apr 2020
    • 4

    #1

    Item preprocessing failes regex with non-latin chars.

    Hi.

    I got Discovery Item prototype with key:

    Code:
    "eventlog[Microsoft-Windows-TaskScheduler/Operational,.*{#TASKNAME}.*,Information,TaskScheduler,201,100,]"
    Code:
    {#TASKNAME}
    is the Windows TaskScheduler task name, which i collect with PS script in Discovery Rule:

    Code:
    system.run[chcp 65001 > NULL && powershell.exe c:\zb\bin\tsched.ps1]
    I'm using chcp because that was the only way to make {#TASKNAME} displayed correctly on zabbix front.

    PS script returns JSON data

    Code:
    {
     "data":{
        "{#TASKNAME}":  "проверка"
    }
    }
    Item Preprocessing regular expression:

    Code:
    Task Scheduler.*\".*{#TASKNAME}\"\ ,\ .*code\ ([0-9x]+)\.
    And that produced error shown below. Other {#TASKNAME} that contains only latin character processed perfectly.

    Click image for larger version

Name:	2020-04-09_19-23.png
Views:	140
Size:	31.0 KB
ID:	399044

    Please, help! It seems, i'm stuck for long at this point.

  • a13x
    Junior Member
    • Apr 2020
    • 4

    #2
    noone want to help?

    Comment

    Working...