ltpitt
asked on
Check for occurrencies of values into log using Javascript
Hi all,
I have the following log:
And I'd need to check if in the log I always have the good values: healthy, connected, more than 80 battery-charge and more than 230 voltage.
Probably a simple count would be fine because the 4 values always have to be there.
How can I do this in Javascript?
I have the following log:
Name Index Model Serial-Number Power-Feed State Connectivity-State Enabled-State Input Battery-Charge BBU-Load Voltage FW-Version Part-Number Brick-Name Index Cluster-Name Index
X1-XXX 1 Xxxxx 5X 9999 X999X99999 XXX-A healthy connected enabled on 80 21 231 02.08.0016 999-999-999 X1 1 xxxxxxxx09 1
X2-XXX 2 Xxxxx 5X 9999 X999X99999 XXX-B healthy connected enabled on 100 22 232 02.08.0016 999-999-999 X2 2 xxxxxxxx09 1
And I'd need to check if in the log I always have the good values: healthy, connected, more than 80 battery-charge and more than 230 voltage.
Probably a simple count would be fine because the 4 values always have to be there.
How can I do this in Javascript?
Where is the log data?
ASKER
Hi Julian!
You can find it in my question above.
Try this link if you cannot view it:
https://www.experts-exchange.com/viewCodeSnippet.jsp?codeSnippetId=10-28986076-1
You can find it in my question above.
Try this link if you cannot view it:
https://www.experts-exchange.com/viewCodeSnippet.jsp?codeSnippetId=10-28986076-1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No I meant - where does it live - how does the JavaScript access it?