Quantcast
Channel: Questions Tagged “script” — Paessler Knowledge Base
Viewing all articles
Browse latest Browse all 87

Using regular expression on whole file

$
0
0

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 ?


Viewing all articles
Browse latest Browse all 87

Trending Articles