Christian- Your immediate problem is that Append() requires two arguments; it returns a string that is the result of appending the first argument to the second. (Really it should be called Concatenate().) If you¹re going to do any event procedures work, you should enable error logging by adding these two lines to your .vnmrc:
event_disp_error_file=path/to/event_disp.log
procedure_error_file=path/to/procedure_error.log
With logging enabled when you reloaded your EventDisp files, you would have
seen a parser error in the event_disp.log about the missing argument to
Append(). Also, while there¹s nothing in the PDFs about the built-in event
procedures (please open an enhancement for this!), you can get some details
by reading their specifications in $SPECROOT/SS/CsVendor/CA/Procedures/. If
you look at Append.xml, you¹ll see that it requires two string parameters,
and returns a string result.
Since you¹re not appending anything, you can simply get rid of that call,
leaving you with:
0xffff0029 P "CreateEventWithAttributes( \
{C CURRENT_MODEL}, \
{H 0xffff0054}, \
SetEventAttribute( \
GetEventAttributeList(), \
{ H 0x12b4c }, \
GetEventAttribute( {U 7} ) \
) \
)"
0xffff0054 E 50 A,3,0xffff0054
However, since you¹re just setting the alarm title and not making any other
changes, you can skip the event procedure altogether. Instead, you can write
directly to 0x12b4c from the AlertMap, just like any other event variable.
Just make an entry like this in your AlertMap:
1.3.6.1.4.1.5646.1.5.6.3 0xffff0029 1.3.6.1.4.1.5646.1.1.2(1,0)\
# Use this next varbind as the alarm
title
1.3.6.1.4.1.5646.1.6.2.2(0x12b4c,0)
Believe me, you don¹t want to use event procedures unless you absolutely
have to. Note that by setting the title in the AlertMap, the integer value
is no longer written to variable 7. If you need the string version in the
EventDisp, you can still reference the string as {S 0x12b4c}. If you need
the integer version specifically though, you¹ll have to use the event
procedure above.
HTH,
Jim
On 8/5/10 5:24 AM, "Christian Schneider" <[email protected]>
wrote:
> Hi Coding Gurus :-)
>
> I would like to have the String from the Variable {A 7} from the original
> Event (0xfff00029) as the Title for the Alarm of Event 0xfff00054. It just
> doesn't react as it should. Any hint what I am doing wrong?
>
>
> 0xffff0029 P "CreateEventWithAttributes( \
> {C CURRENT_MODEL}, \
> {H 0xffff0054}, \
> SetEventAttribute( \
> GetEventAttributeList(), \
> { H 0x12b4c }, \
> Append ( \
> GetEventAttribute( {U 7} ) \
> ) \
> ) \
> )"
> 0xffff0054 E 50 A,3,0xffff0054
>
>
> --
>
> Christian Schneider
> Enterprise Service Specialist
>
> 4-tune GmbH
> Sägereistrasse 29
> CH - 8152 Glattbrugg
>
> web: http://www.4-tune.ch <http://www.4-tune.ch/>
> e-mail: [email protected] <mailto:[email protected]>
>
> Office ZH: +41 (0)44 818 02 03
> Office SG: +41 (0)71 930 07 00
> Mobile: +41 (0)79 418 4542
> Fax: +41 (0)71 930 0701
>
>
>
>
>>
>>
>>
>>
>
> * --To unsubscribe from spectrum, send email to [email protected] with the
> body: unsubscribe spectrum [email protected]
>
---
To unsubscribe from spectrum, send email to [email protected] with the body:
unsubscribe spectrum [email protected]<<image.gif>>
<<image.gif>>
