OK I'm now a little confused by all this!
I'm trying to do the exact same thing and have lifted Jim's code but it's not filling in the title as expected. I've tried debugging in various ways and it seems you can only use 1 GetEventAttribute statement. If I use (Where U1 = "TestDevice" and U7 is set on a test trap to read "TEST ALARM TITLE") GetEventAttributeList(), \ { H 0x12b4c }, \ Append ( { S \"DAVE - \" } , GetEventAttribute( {U 7} ) ) \ ) \ Then I get exactly what I expect - "DAVE - TEST ALARM TITLE" But I don't want a string with my name, I want the first bit to be the hostname (U1) So I tried: GetEventAttributeList(), \ { H 0x12b4c }, \ Append (GetEventAttribute( {U 1} ) , GetEventAttribute( {U 7} ) ) \ ) \ Which I'd expect to just blindly join the 2 variables together to read "TestDeviceTEST ALARM TITLE". It totally ignores what I want and takes the title from the PCAUSE file. If I use Jim's code below exactly as he's typed it but with my variable IDs - 0xffff0001 P "CreateEventWithAttributes( \ {C CURRENT_MODEL}, \ {H 0xffff0002}, \ SetEventAttribute( \ GetEventAttributeList(), \ { H 0x12b4c }, \ Append ( \ Append ( \ GetEventAttribute( {U 1} ), \ { S \" \" } \ ), \ GetEventAttribute( {U 7} ) \ ) \ ) \ )" I'd expect to see "TestDevice TESTALARMTITLE" - but I don't. Again it just uses the PCause file title. If I set the attribute to just one GetEventAttributeList() variable with no appends, it displays that fine too. It's just not interpreting how I'm appending the variables correctly. I've got the same issue on 8.1HF12 and 9.1SP3 so I don't think it's a version issue, more a "the code doesn't work" issue! Any ideas where I'm going wrong - or how to make the event procedure come up with "TestDevice - TEST ALARM TITLE" in the custom title variable? Dave From: Pfleger, Jim [mailto:jim.pfle...@calence.com] Sent: July 23 2010 19:52 To: spectrum Subject: Re: [spectrum] Alarm Title: Concatenation We're doing this with event procedures. You'll need to combine several procedures to fill in the alarm title variable 0x12b4c we've been discussing. Here's a short example where 0xffff0001 is the raw event coming in, and 0xffff0002 is the event that you'll use to create your alarm. 0xffff0001 P "CreateEventWithAttributes( \ {C CURRENT_MODEL}, \ {H 0xffff0002}, \ SetEventAttribute( \ GetEventAttributeList(), \ { H 0x12b4c }, \ Append ( \ Append ( \ GetEventAttribute( {U 2} ), \ { S \" \" } \ ), \ GetEventAttribute( {U 3} ) \ ) \ ) \ )" 0xffff0002 E 50 A,3,0xffff0002 This sets the title to a concatenation of var 2 and var 3, with a space in between. Event procedures are very arcane, poorly documented, and hard to debug, but they're the only way to perform event modifications like this. HTH, Jim On 7/23/10 9:55 AM, "Saurabh Bohra" <sbmaill...@gmail.com> wrote: Hello All, Environment: SPECTRUM 9.2 on Windows 2008 I want to have alarm title based on concatenation of a static text and the trap varbind. As an example: A trap with 5th varbind contains a string "ABC is not running" or "XYZ is stopped". I want to display the Alarm Title as follows (having static text "Process Down:"): Process Down: ABC is not running or Process Down: XYZ is stopped =================================== Concatenation of two or more trap varbind. As an example: A trap with va22 contains a string "CPU Utilization exceeded" and var3 contains the current value say "87" as: CPU Utilization exceeded 87 Thanks in advance. Saurabh * --To unsubscribe from spectrum, send email to lists...@unc.edu with the body: unsubscribe spectrum jim.pfle...@calence.com * --To unsubscribe from spectrum, send email to lists...@unc.edu with the body: unsubscribe spectrum david.g...@uk.logicalis.com ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ This email communication does not create or vary any contractual relationship between Logicalis and you. Internet communications are not secure and accordingly Logicalis does not accept any legal liability for the contents of this message. The contents of this email are confidential to the intended recipient at the email address to which it has been addressed. It may not be disclosed to or used by anyone other than this addressee, nor may it be copied in any way. If received in error, please contact Logicalis on the above switchboard number quoting the name of the sender and the addressee and then delete it from your system. Please note that neither Logicalis nor the sender accepts any responsibility for viruses and it is your responsibility to scan the email and attachments (if any). Logicalis UK Ltd, Registered in England and Wales No: 3732397, Registered Office: 110 Buckingham Avenue, Slough. Berkshire, SL1 4PF ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ --- To unsubscribe from spectrum, send email to lists...@unc.edu with the body: unsubscribe spectrum arch...@mail-archive.com