KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Macro Variables

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
thomasschmeidl



Joined: 15 Apr 2006
Posts: 166
Location: Germany, Bavaria

PostPosted: Sun Dec 31, 2006 5:16 am    Post subject: Macro Variables Reply with quote

Hi Alex,

my setting: HM6.51c on XP SP2 running as application (for testing)

The HM-Manual wrote:
In the string that represents a value of a UDV you may use the name of another macro variable(s)


This is very helpful and works, but now there seems to be a problem with the following variables:

udv_nofallback: (('%Status%'=='Warning') or ('%SimpleStatus%'=='UP') or (%Recurrences%<3))

udv_warnbc1: (('%SuggestedReply%'<'100') and ('%SuggestedReply%'>'10')) and (('%Status%'=='Warning') or ('%SimpleStatus%'=='UP') or (%Recurrences%<3))

udv_warnbc2: (('%SuggestedReply%'<'100') and ('%SuggestedReply%'>'10')) and %udv_nofallback%

IMHO udv_warnbc1 and udv_warnbc2 should be equal, but if you you use them in the advanced status processing dialogue

[x] use Warning status if %udv_warnbc1%
is ok, whereas

[x] use Warning status if %udv_warnbc2%
produces reply "illegal expression"

The problem seems to be the (%Recurrences%<3) as there is no error when it is replaced by another expression.

Regards

Thomas
Back to top
View user's profile Send private message
JuergenF



Joined: 26 Jan 2003
Posts: 331
Location: Germany, North Rhine-Westphalia

PostPosted: Mon Jan 01, 2007 4:14 am    Post subject: Re: Macro Variables Reply with quote

thomasschmeidl wrote:
udv_nofallback: (('%Status%'=='Warning') or ('%SimpleStatus%'=='UP') or (%Recurrences%<3))


This works
udv_nofallback: (('%Status%'=='Warning') or ('%SimpleStatus%'=='UP') or ("%Recurrences%"<3))
this too
udv_nofallback: (('%Status%'=='Warning') or ('%SimpleStatus%'=='UP') or ("%Recurrences%"<"3"))

Maybe it can help analysing the problem

All the best for 2007

Juergen
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Tue Jan 02, 2007 9:23 pm    Post subject: Reply with quote

Quote:
udv_nofallback: (('%Status%'=='Warning') or ('%SimpleStatus%'=='UP') or (%Recurrences%<3))
udv_warnbc1: (('%SuggestedReply%'<'100') and ('%SuggestedReply%'>'10')) and (('%Status%'=='Warning') or ('%SimpleStatus%'=='UP') or (%Recurrences%<3))
udv_warnbc2: (('%SuggestedReply%'<'100') and ('%SuggestedReply%'>'10')) and %udv_nofallback%
IMHO udv_warnbc1 and udv_warnbc2 should be equal

udv_warnbc1 <> udv_warnbc2.
Why?
udv_warnbc1 uses variables that can be resolved in 1 step.
udv_warnbc2 uses variable (%udv_nofallback%) that points to another variable that uses more variables - 3 level recursion.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
thomasschmeidl



Joined: 15 Apr 2006
Posts: 166
Location: Germany, Bavaria

PostPosted: Wed Jan 03, 2007 2:47 am    Post subject: Reply with quote

OK

So I understand that:
- you can use macro variables in an udv
- you can use udvs, which contain a string, in an udv
- you cannot use udvs that contain other macro variables or udvs in an udv

1. Is that correct?

2. Is there a reason for the fact that there is no error message with the following combination?
udv_nofallback: (('%Status%'=='Warning') or ('%SimpleStatus%'=='UP'))
udv_warnbc2: (('%SuggestedReply%'<'100') and ('%SuggestedReply%'>'10')) and %udv_nofallback%

3. Will the behaviour be changed to "more-level-recursion" (would be helpful )?

4. Could you add a sentence about it to the manual - or did I miss it?

Cheers

Thomas
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Wed Jan 03, 2007 8:38 pm    Post subject: Reply with quote

Quote:
- you can use macro variables in an udv
- you can use udvs, which contain a string, in an udv
- you cannot use udvs that contain other macro variables or udvs in an udv
1. Is that correct?

Almost. You may use UDV variable that refers to another UDV variable, but that 2nd variable cannot refer to test related macro variables.

Quote:
Is there a reason for the fact that there is no error message with the following combination?

H'm... probably expression evaluator cannot catch all possible errors. Will check that

Quote:
Will the behaviour be changed to "more-level-recursion"

Do you really need this? May be you are trying to use complicated configuration schemes without a reason?

Quote:
Could you add a sentence about it to the manual - or did I miss it?

Officially recurrences are not supported

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
thomasschmeidl



Joined: 15 Apr 2006
Posts: 166
Location: Germany, Bavaria

PostPosted: Thu Jan 04, 2007 1:51 am    Post subject: Reply with quote

Thanx for your work and your explanations.

Alex wrote:
Do you really need this? May be you are trying to use complicated configuration schemes without a reason?


I set up many udv_s which are absolutely helpful for the "normal" and "warning" expressions. 15 of them contain "%udv_nofallback%" which prevents status switching back to "warning" after it was "bad" three times (otherwise new actions would be triggered after every status change). To avoid redundancies and to facilitate changes in the future it would help to substitute this part of the expression. Now you may judge whether one really needs this.

But I understand, that it is more important now to release a final version of HM with new statuses.

Cheers

Thomas
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Fri Jan 05, 2007 1:04 pm    Post subject: Reply with quote

May be we improve some code but not right now. We are testing 6.52 release, I hope it will be available for download next week

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index