Created
February 10, 2014 19:41
-
-
Save marianogg9/8922747 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"check":{ | |
"output":"HTTP CRITICAL: HTTP/1.1 503 Service Temporarily Unavailable - pattern not found - 593 bytes in 0.001 second response time |time=0.000500s;;;0.000000 size=593B;;;0\n", | |
bla bla | |
I need to get the first text before the "|". Tried this: | |
def foo | |
@event['check']['output'].split(' | ').first | |
end | |
puts foo | |
And I still get the full text of "output": HTTP CRITICAL: HTTP/1.1 503 Service Temporarily Unavailable - pattern not found - 593 bytes in 0.001 second response time |time=0.000500s;;;0.000000 size=593B;;;0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment