Newbie to Splunk and trying to resolve the following issue. Here's my search string:
index=ipdirectindex
|eval DOCSNRRdy=case(RxSNR=="n/a", "1", RxSNR >="30", "0", RxSNR <"30", "1")
| eval DOCTxPWRRdy=case(TxPwr=="n/a", "1", TxPwr < "57", "0", TxPwr >"57", "1")
| eval DOCRxPWRRdy=case(RxPwr=="n/a", "1", RxPwr >= "-15" OR RxPwr <="15", "0", RxPwr <"-15" OR RxPwr >"15", "1")
|eval Success=case(Success=="TRUE", "0", Success=="FALSE", "1")
|eval foo=DOCSNRRdy+DOCTxPWRRdy+DOCRxPWRRdy+Success
Basically what it does is check that the variables DOCSNRRdy,DOCTxPWRRdy and DOCRxPWRRdy fall within an acceptable range where they would be considered as passed or failed if outside the range:
|eval DOCSNRRdy=case(RxSNR=="n/a", "1", RxSNR >="30", "0", RxSNR <"30", "1")
| eval DOCTxPWRRdy=case(TxPwr=="n/a", "1", TxPwr < "57", "0", TxPwr >"57", "1")
| eval DOCRxPWRRdy=case(RxPwr=="n/a", "1", RxPwr >= "-15" OR RxPwr <="15", "0", RxPwr <"-15" OR RxPwr >"15", "1")
|eval Success=case(Success=="TRUE", "0", Success=="FALSE", "1")
|eval foo=DOCSNRRdy+DOCTxPWRRdy+DOCRxPWRRdy+Success
This part of the search string works fine.
I then sum the values of the four variables in:
|eval foo=DOCSNRRdy+DOCTxPWRRdy+DOCRxPWRRdy+Success
This also works fine and produces a table that shows the sum of the variables for each device that is being tested. What I need now is to be able to produce another table that shows how many times foo is 1, 2 or >2. Tried a few different things but so far none produce the result I'm after. Hope this makes sense. I am pretty new to Splunk so I'm sure there may be more efficient ways to accomplish my task. Just haven't figured them out yet :-). Appreciate your help.
... View more