InterMapper Forums Forum Index InterMapper Forums
A place to talk about InterMapper and Network Monitoring
 
 Forum SubscriptionsForum Subscriptions   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is there a character limitation on the eval macro?

 
Post new topic   Reply to topic    InterMapper Forums Forum Index -> Knowledge Base - SNMP Probes
View previous topic :: View next topic  
Author Message
jlosgar



Joined: 18 Jul 2007
Posts: 651

PostPosted: Fri Apr 17, 2009 9:06 am    Post subject: Is there a character limitation on the eval macro? Reply with quote

Q. Is there a character limitation on the eval macro? The two lines below are identical, except in the second line I shortened the eval on the value == 5 from:
    == 5 ? "Major: Missing Time Update":
    To:
    == 5 ? "Major: Update":

The first line fails, while the second line is fine:

Broken:
    \4\Missing Time Update: ${eval: $semAlarmMissingTimeUpdate == 1 ? "Clear" : $semAlarmMissingTimeUpdate == 2 ? "Minor: Missing Time Update" : $semAlarmMissingTimeUpdate == 3 ? "Minor: Missing Time Update": $semAlarmMissingTimeUpdate == 5 ? "Major: Missing Time Update": $semAlarmMissingTimeUpdate}

Works:
    \4\Missing Time Update: ${eval: $semAlarmMissingTimeUpdate == 1 ? "Clear" : $semAlarmMissingTimeUpdate == 2 ? "Minor: Missing Time Update" : $semAlarmMissingTimeUpdate == 3 ? "Minor: Missing Time Update": $semAlarmMissingTimeUpdate == 5 ? "Major: Update":
    $semAlarmMissingTimeUpdate}


A. There is a 255 character limitation in the body of the eval. One possible workaround is to break up the eval into separate evals, like this (using abbreviations for better readability):
    ${eval: $sem == 1 ? "Clear" : ""}${eval: $sem == 2 ? "Minor" : ""}${eval: $sem == 3 ? "Minor" : ""}${eval: $sem == 5 ? "Major" : ""}${eval: (($sem < 1) || ($sem > 5)) ? $sem : ""}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    InterMapper Forums Forum Index -> Knowledge Base - SNMP Probes All times are GMT - 5 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