View previous topic :: View next topic |
Author |
Message |
itelio
Joined: 06 Nov 2014 Posts: 120
|
Posted: Wed Jan 10, 2024 4:29 am Post subject: set Use normal status if "reply" value |
|
|
Hello,
I would like to set a "normal" status for certain reply values.
A reply value would be for example in QNAP Health Status
Volume [Single Disk Volume: Host Drive: '3.5" SATA HDD 3'] status Global Spare
If is set to "Use normal status if"
("%SuggestedReply%"=="Volume [Single Disk Volume: Host Drive: 3] status Global Spare")
then the message comes back from the RMA: Invalid expression: ConditionEval: Unknown operator: "SATA"
I would also like to classify the return value as "normal".
358:Power Supply 3 Unknown Power Supply 4 Unknown
(Whereby the number at the front unfortunately always changes)
Use normal Status if: ("%SuggestedReply%"=="*Power Supply 3 Unknown Power Supply 4 Unknown") unfortunately does not work.
Am I missing something here?
How can I generally classify a longer "reply" message as "normal"?
Thanks
Hostmon 14.28
Windows Server 2022
Windows Defender Up2Date
RCC 9.28 |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12805 Location: USA
|
Posted: Wed Jan 10, 2024 6:08 am Post subject: |
|
|
HostMonitor supports single and double quotation marks for expressions.
If you have some string (e.g. reply) with single quotation marks, you may use double quotation marks for expression, like "%SuggestedReply%"
If you have some string (e.g. reply) with double quotation marks, you may use single quotation marks for expression, like '%SuggestedReply%'
Unfortunately this string contains all possible quotation marks so it will not work regardless of expression
Volume [Single Disk Volume: Host Drive: '3.5" SATA HDD 3'] status Global Spare
May be you can rename volume on target device? E.g. remove " after 3.5, then use '%SuggestedReply%' variable with single quotation marks.
Regards
Alex |
|
Back to top |
|
|
itelio
Joined: 06 Nov 2014 Posts: 120
|
Posted: Wed Jan 10, 2024 6:23 am Post subject: |
|
|
Hi Alex,
thanks for the answer.
I will rename the volume as a test because there are really a lot of quotation marks in here.
For the second example.
Is it possible to specify the "Reply" value with a placeholder?
("%SuggestedReply%"=="*Power Supply 3 Unknown Power Supply 4 Unknown")
--> if, for example, "Power Supply 3" occurs then set normal status?
("%SuggestedReply%"=="*Power Supply 3*")
With " * " I can also exclude services from the check using placeholders.
regards |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12805 Location: USA
|
Posted: Wed Jan 10, 2024 8:28 am Post subject: |
|
|
There is operator IN
("Power Supply 3" in "%SuggestedReply%")
BTW: HostMonitor offers context sensitive help system (over 700 pages), just press F1 when "warning" expression field is selected and you will see the answer to all questions
Regards
Alex |
|
Back to top |
|
|
itelio
Joined: 06 Nov 2014 Posts: 120
|
Posted: Thu Jan 11, 2024 4:54 am Post subject: aw |
|
|
Hi Alex,
thanks, that was the operator I was looking for.
Have a nice day |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12805 Location: USA
|
Posted: Thu Jan 11, 2024 8:29 am Post subject: |
|
|
You are welcome.
Have a nice day
Regards
Alex |
|
Back to top |
|
|
|