Bulk Edit Monitors
Content parser is an advanced version of a
Content filter, which was described in the
previous topic. It also works with the content received by the HTTP, FTP, SFTP, Telnet,
SSH and Console monitors. But it doesn't simply searches for some text strings.
The placeholders for variables are marked in the template using the double curly brackets. For example, if you getting an HTML page from your server, indicating some tabled stats including a cell with the temperature in the server room:
The temperature can be parsed using the following template:
And then checked for an acceptable range using the following expression:
Temperature > 0 and Temperature < 25
You can include any number of variables to the template, just make sure to separate them with some text, so ProtoMon can define the boundaries of each variable. Opened and closed double curly brackets without the variable name inside means "any text" and allows you to skip useless parts of the content.
The parsed variables with values will be printed to the monitor check log, so you will easily know either your template extracts needed parts of content or not.
Last but not least, ProtoMon saves parsed variables prepending the underscore character to each of them. These variables will be accessible during the next monitor check. So you can compare the new value with the old one. For example, this success criteria says ProtoMon to trigger an alert, if the temperature is changed since the previous check:
Temperature = _Temperature
Please note, that on the very first monitor check, when there is no saved old value yet, ProtoMon will consider that old and new values are equal.