The table we want to make looks something like this:
---------- key | value --------
someName | someValue
someName1 | someValue1
where someName is a field name and someValue is a value of the field we got from our log file.
We're not sure if there is a way to insert a someName text into the table to display. Is this possible?
If you want to add a line with a fake events do
`
if this is just a presentation request.
try
<mysearch> | stats values(myfield) by myotherfield
or it you already have your data , try to rotate it.
<mysearch> | table key value | transpose
http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/Transpose
If my understanding is correct, are you trying to get all the field names and corresponding value(s) from your log? If yes, you can use command called "fieldsummary" which will give you list of fields in your log. Check this out
http://docs.splunk.com/Documentation/Splunk/6.0/SearchReference/Fieldsummary
Hi @momori
If someName is already a field name in your events from your search, you might find the rename command useful. Have you tried this option yet?
http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/Rename
No problem @momori 🙂 glad our combined responses helped solve your issue!
Patrick
using rename in conjunction with the tranpose from the above answer worked well. Thank you for your help
If you want to add a line with a fake events do
`
if this is just a presentation request.
try
<mysearch> | stats values(myfield) by myotherfield
or it you already have your data , try to rotate it.
<mysearch> | table key value | transpose
http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/Transpose
transpose worked. thanks!