Exam SPLK-1002 All QuestionsBrowse all questions from this exam
Question 91

In the following eval statement, what is the value of description if the status is 503? index=main | eval description=case(status==200, "OK", status==404, "Not found", status==500, "Internal Server Error")

    Correct Answer: A

    In the given eval statement using the case function, the description field is assigned a value based on the condition of the status field. The conditions specified are for status codes 200, 404, and 500. Since the status is 503, none of the conditions are met. According to the documentation of the case function in Splunk, if no conditions are true, the function defaults to NULL. Therefore, the description field would contain no value.

Discussion
mimi01Option: A

A. The description field would contain no value.

RayObbesOption: A

It's A as you can see in the example here: https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/ConditionalFunctions

spl_consumerOption: A

The right answer is A, checked in lab.

Min_93Option: A

The description field would contain no value.

nimanamiOption: A

answer is A, tested it on splunk version 7.2.7

IGoddard90Option: A

https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/ConditionalFunctions "The function defaults to NULL if none are true."

9314c9aOption: A

| makeresults | eval status=503 | eval description=case(status==200, "OK", status==404, "Not found", status==500, "Internal Server Error")

Sankardevarajan1986Option: C

correct answer C Reference link https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/ConditionalFunctions

hohohahahaho

bruh...

Dree_DoggOption: A

correct ans is A

arcswOption: A

Try it yourself

csgajavellyOption: A

The answer is "A". Please correct it.

meggidoOption: B

B -> pg 119 "if no value, default replacement value is 0"

lilsem

Only with fillnull command. So it is A.

Hudda

could you pls confirm the final answer friends? A or D?

ArDeKuOption: D

D is correct