Hi Christian,
I presume the idea is that your Evproc would put the string VD211902 into
var 102 of the new event (for that example trap)?
Initially I noticed...
- getRegexp() 3rd parameter is supposed to be the number of the matched
substring part of the regex you want to extract - so maybe { U 1 } not { U
101 } ?
- Within the regex in the getRegexp() 2nd param - if you look closely one
of the double-quotes characters was actually a " instead of a " so won't
match.
Other than that, just some tidy-ups, so try:
0xfff002f2 E 0 P "\
CreateEventWithVariables( \
{ C CURRENT_MODEL }, \
{ H 0xfff002f3 }, \
SetEventVariable( \
GetEventVariableList(), \
{ U 102 },\
GetRegexp(\
GetEventVariable({ U101 } ),\
{ S \" name=\\\\"(.*)\\\\"\" }, \
{ U 1 }\
)\
)\
) "
Cheers
Dan.
*Dan White*
Senior Consultant
Service Assurance
[image: Devoteam]
*Mob. : *+44 (0)7973 533671
[email protected]
Follow us : [image: Linked In]
<http://www.linkedin.com/company/4160?trk=null> [image: Twitter]
<http://twitter.com/#!/devoteam> [image: Youtube]
<http://www.youtube.com/user/devoteam>
CONNECTING BUSINESS & TECHNOLOGY
On 13 May 2015 at 13:59, Schneider Christian <[email protected]>
wrote:
> Hi Spectrum-Regex maniacs,
>
> I am struggeling with the following:
>
>
> We get this from Syslog via SNMP Trap in Varbind 101
>
> snmptrap -v 1 -cpublic 172.16.125.160 1.3.6.1.4.1.20580.69 172.16.125.160
> 6 1 '' 1.3.6.1.4.1.20580.69.181 s '*Test 1 csc 10.5.68.27; Default; May
> 13 10:36:30 ictnexenglp01 Engine-01[1339]: source [ictnexenglp01
> name="VD211902" id="1551" computer_type="desktop"
> last_ip_address="10.6.225.13" mac_addresses="00:50:56:99:31:22"
> group_name="MS" last_boot_time="29.04.2015@00:38:31"
> last_login_time="01.05.2015@17:26:46" os_version="Windows 7 Enterprise SP1"
> disks="VMware Virtual disk SCSI Disk Device 60GB"
> system_drive_free="91.4MB" ro:Entity=""]
> ALARM-FREE_DISKSPACE_ON_SYSTEM_DRIVE [1/1]*'
>
>
> we need to cut out multiple fields like the name and produce a new Event
> 0xfff002f3
>
> 0xfff002f2 E 0 P "(CreateEventWithVariables( { C CURRENT_MODEL }, { H
> 0xfff002f3 }, SetEventVariable( GetEventVariableList(), { U 102 },
> GetRegexp( GetEventVariable( { U101 } ), { S \".*name=\\\\"(.*)\\\\".* \"
> }, { U 101 } ))))"
>
>
> Problem is it just does not create that Event 0xfff002f3
>
>
> Any hint/help appreciated.
>
> Kind regards,
>
>
> Christian Schneider
> Enterprise Service Specialist
>
> 4-tune GmbH
> Sägereistrasse 33
> CH-8152 Glattbrugg
>
> Mob +41 79 418 45 42
> Tel +41 71 930 07 00
> Fax +41 71 930 07 01
> Mail [email protected]
>
> www.nexellent.ch
> www.4-tune.ch
>
>
>
>
>
>
>
>
>
> - --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]