Ad Widget

Collapse

LLD Preprocessing trouble

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • errorsmith
    Junior Member
    • Jul 2015
    • 11

    #1

    LLD Preprocessing trouble

    Hi all

    I'm trying to refine the default template "Template OS Windows SNMPv2" for my few Windows Boxes.
    When it comes to disk discovery, all drives are recognized and items are created like this: "C:\\ Label: Serial Number 9e783127"
    I do not like having labels and serials in the item name, I'd rather have only the drive letter like "C:"

    I tried to use lld preprocessing for removing the unwanted part of the drive name with this parameters:
    1. Regular expressing
    Parameter 1: ^[A-Z]:\\
    Parameter 2: \0

    When using the "Test" function and inputting the string "C:\\ Label: Serial Number 9e783127", I get the expected result: "C:"
    This works also for the other drive letters I have.

    However, when I update my lld rule, it becomes unsupported with this error:

    discovery rule "mywindowsserver:vfs.fs.discovery[snmp]" became not supported: Preprocessing failed for: [{"{#SNMPINDEX}":"1","{#FSNAME}":"C:\\\\ Label: Serial Number 9e783127","{#FSTYPE}":"HOST-RESOUR...
    1. Failed: cannot perform regular expression "^[A-Z]:\" match for value of type "string": pattern does not match


    I also tried with [A-Z]:\\ as Parameter 1, which leads to this error:

    discovery rule "mywindowsserver:vfs.fs.discovery[snmp]" became not supported: Invalid discovery rule value: cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'C:\'

    Now I'm stuck - I really dont know what I'm doing wrong here.
    Can somone point me in the right direction please?

    Running zabbix Zabbix 4.4.6 on a centos7 Box.

    greetings,
    errorsmith
Working...