Can you provide a function which returns a string in an if statement? For example:
if(src=="-" OR src=="127.0.0.1", Computer, trim(Source_Workstation,"some string")) , reads as:
if src = - or 127.0.0.1, return the value of the Computer field. Else, return as string value of trim, where some string has been removed.
When I run this eval, the first result performs as expected. However, the trim statement returns 1 or 0. In testing, this reports whether the trim actually trimmed anything (1 for yes, 0 for no). If I pipe as separate command, then I get the expected results (e.g. eval src=trim(Source_Workstation,"some string")) . However, I want this to be in a calculated field extraction and I can't seem to have multiple calculations running over the same field (makes sense). This is an attempt to remove the leading "::ffff:" from some Windows event logs.
... View more