I’ve done something like this in Spectrum 9.3 so it should also work in 9.4.
You can use a GetRegexp function in your EventDisk file and set a variable like
this:
SetVariable({V MyVariable}, GetRegexp(ToString(GetEventVariable({U 101})), {S
\"^.*([0-9a-zA-Z]{4})$\"}, {I 1}))
Change the variable name (MyVariable ) and the event variable ID (101) to suit
your needs. You might also want to change the regex string if you need to
capture non-alpha-numeric characters. The above regex only includes a-z and 0-9
characters. The {4} captures 4 of those characters.
Then you just assign that value to 0x12b4c (change the 0xffffffff event code to
whatever you need):
CreateEventWithVariables({C CURRENT_MODEL}, {H 0xffffffff},
SetEventVariable(GetEventVariableList({C CURRENT_EVENT}), {H 0x12b4c}, {V
MyVariable }))
Craig Porter, Enterprise Systems Management - Availability & Performance
Monitoring
Marsh & McLennan Companies
Global Technology Infrastructure (MGTI) | Centralized Operations
Sackville House 1.6, 143-149 Fenchurch Street, London EC3M 6BN, Great Britain
+44 (0)20 7178 4827 | Mobile +44 (0)7585 803 093 |
[email protected]<mailto:[email protected]>
www.mmc.com<http://www.mmc.com/>
From: Fereydoon Mallahi Karai [mailto:[email protected]]
Sent: 23 September 2015 15:11
To: spectrum
Subject: [spectrum] show a customized alarm title
Hello All,
I have set in Spectrum (version 9.4x) to get the title of an alarm from one of
the variables (using 0x00012b4c to copy the contents of one of the variables)
and i want to know if there is any way that i customize this alarm title to say
just to show the last 4 characters/digits of the variable contents and not all
of it as the alarm title?
For example the contents of the variable that is being used is: ABCD123456
And alarm title shows: 3456
I will appreciate if you inform me if you have any idea/comment for that.
Thank you in advance.
Regards,
Ferey
* --To unsubscribe from spectrum, send email to
[email protected]<mailto:[email protected]> with the body: unsubscribe spectrum
[email protected]<mailto:[email protected]>
________________________________
The Insurance Act 2015 – Are you prepared? Check our website, uk.marsh.com, or
ask your Marsh contact for further details.
Marsh Ltd. Registered in England and Wales Number: 1507274
Registered office 1 Tower Place West, Tower Place, London, EC3R 5BU.
Marsh Ltd is authorised and regulated by the Financial Conduct Authority.
This message and any attachments are confidential.
If you have received this message in error please delete it from your system.
If you require any assistance please notify the sender. Thank you.
---
To unsubscribe from spectrum, send email to [email protected] with the body:
unsubscribe spectrum [email protected]