Hello,

I'm using a filesensor to detect if the last line of a file containss OK Or NOT_OK. This file is on append mode, added by a Windows Schedule Task.

The file is like this :

launch-1;2018-01-01;OK
launch-2;2018-01-02;NOT_OK

My Regex is .*;NOT_OK$

The alarm is triggered but when a new line is added, the alarm is not canceled.

I think the Regex is executed on each line of the file, and not on the whole content, even if i check "always transmis the whole file" in sensor options.

How can I do that ?


Article Comments

Hi elo,

Thank you very much for your contact.

The RegEx appears to be well formatted. Do I understand you correctly, that this is a contentiously growing file? If so, I would also expect the sensor to change its state based on the findings of the last line. For instance, if the last line does not contain OK or NOT_OK, the sensor should behave differently than when the string is found.

Does this sum up your situation?

Best regards,
Sebastian


Aug, 2019 - Permalink