Skip navigation
2617 Views 9 Replies Latest reply: Jul 9, 2012 2:47 AM by G. Xh. RSS
G. Xh. Rank: White Belt 30 posts since
Mar 22, 2012
Currently Being Moderated

Jun 15, 2012 10:23 AM

Where does Zenoss replace the tabs with a space

Hi everybody

 

I got a problem. I'm trying to write a Regular-Expression, where the variable "component" can have an string with spaces in it.

 

But my problem is, that the incoming string is separated with tabs.

 

2012-06-15 16:19:58,789 DEBUG zen.Syslog: Jun 15 16:19:58 srvhs1025.sanacare.local MSWinEventLog[1]:System     16223     Fri Jun 15 16:19:54 2012     13     Print     SYSTEM     User     Information     SRVHS1025     None          Document 42, Document owned by SZ101 was deleted on DRSZ1006.       16198 

 

But than Zenoss replace the tabs with an spaces

 

2012-06-15 16:19:58,789 DEBUG zen.Syslog: MSWinEventLog[1]:System 16223 Fri Jun 15 16:19:54 2012 13 Print SYSTEM User Information SRVHS1025 None Document 42, Document owned by SZ101 was deleted on DRSZ1006. 16198 

 

My wish is now, to disable that Zenoss replace this tabs with an space, so that I can write a regex who allocate a whole string till the next tab to a variable

 

Greeting from switzerland

  • Ryan Matte ZenossMaster 653 posts since
    Mar 26, 2009
    Currently Being Moderated
    3. Jun 20, 2012 10:47 AM (in response to G. Xh.)
    Re: Where does Zenoss replace the tabs with a space

    Can you show us exactly what you're hoping to do with that string?  It's very difficult to help you when we don't know exactly what you're trying to accomplish.  I would really recommend that you not go editing Zenoss code, I'm sure there's a way to write a regex that'll work for your specific case.

  • Ryan Matte ZenossMaster 653 posts since
    Mar 26, 2009
    Currently Being Moderated
    5. Jun 21, 2012 6:09 PM (in response to G. Xh.)
    Re: Where does Zenoss replace the tabs with a space

    Why don't you make it go until it sees " System" or " \d+"?

  • Ryan Matte ZenossMaster 653 posts since
    Mar 26, 2009
    Currently Being Moderated
    7. Jun 22, 2012 9:24 AM (in response to G. Xh.)
    Re: Where does Zenoss replace the tabs with a space

    So base it on the 6th colon (":").  You're not limited to using regex in event mappings, you can also use python rules and transforms.

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points