Re: pdbtool validate now requires type information.

Balazs Scheidler <[email protected]> Wed, 29 Mar 2023 12:15:56 +0200
Newsgroups gmane.comp.syslog-ng
Message-ID <CAKcfE+ZYN4uzmtBTfTCD_RqjBHy0KhRc3-tuSO+T7xpNo55jtQ@mail.gmail.com>
This PR should fix both issues (this one and the one you reported as an
issue):

https://github.com/syslog-ng/syslog-ng/pull/4405

Sorry for the inconvenience,
Balazs



On Tue, Mar 28, 2023 at 11:58 PM Balazs Scheidler <[email protected]> wrote:

> It was supposed to ignore type information if it's not specified.
>
> Just checked the code and it now seems to default to using string instead.
>
> It's on line 838 of pdbtool.c
>
> I'm fixing it tomorrow
>
>
> On Tue, Mar 28, 2023, 19:01 Evan Rempel <[email protected]> wrote:
>
>> I'm working with syslog-ng-4.1.1-1 and attempting to validate a
>> patterndb xml file.
>>
>> I understand that the pattern parsers will produce type aware values,
>> but it seems that if the tests in the patterndb xml file do not contain
>> any type information that all tests against non-string values will fail.
>>
>> Is that intended behavior to require type information on all tests?
>>
>> If that is by design I propose that this makes thing difficult because
>> @NUMBER:var@ and @STRING:var@ will both successfully parse the same
>> value out of the syslog message, but the test would now have to be
>> different. Tools that programmatically produce the patterndb need to
>> become a lot smarter.
>>
>> Can anyone comment on this behavior?
>>
>> When attempting to validate the attached patterndb.xml file I get the
>> error
>>
>> Testing message: program='xinetd' message='EXIT: gsiftp status=0
>> pid=23133 duration=0(sec)'
>>   Wrong match name='status', value='0', type='integer', expected='0',
>> expected_type='string'
>>   Wrong match name='sec', value='0', type='integer', expected='0',
>> expected_type='string'
>>   Wrong match name='pid', value='23133', type='integer',
>> expected='23133', expected_type='string'
>>
>>
>> --
>> Evan
>>
>> ______________________________________________________________________________
>> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
>> Documentation:
>> http://www.balabit.com/support/documentation/?product=syslog-ng
>> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>>
>>

-- 
Bazsi

______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq