All Apps and Add-ons

Sendresults command strips carriage return. How to add the line break back into my results when sending the email?

robert_miller
Path Finder

I am running a stats query using the example command below. For this example, "field2" is a multivalue field. When not including the sendresults command, I am able to see the groupings where field2 has a carriage return. (which is what I want)

stats list(field1), list(field2) by manager, fullname

manager1 fullname1 field1 field2
manager2 fullname2 field1 field2A
field2B
manager2 fullname3 field1 field2

However, when adding the sendresults command to the end of that query, the carriage return is removed and my results in field2 are now separated by a space.

stats list(field1), list(field2) by host, os | eval email_to=manager | sendresults ...

manager1 fullname1 field1 field2
manager2 fullname2 field1 field2A field2B
manager2 fullname3 field1 field2

Any idea how to add the line break back into my results when sending the email?

Thanks

0 Karma

mockd
Path Finder

We have sorted out what the issue is and will be releasing an updated version of the command soon.

0 Karma

robert_miller
Path Finder

Have you had any luck? Thanks.

0 Karma

mockd
Path Finder

It's most likely caused by newlines and the HTML used to render the email message. I will do some testing and get a more formal answer.

0 Karma

aljohnson_splun
Splunk Employee
Splunk Employee

I can find documentation for sendresults. I'm wondering, are you using the sendemail command ?

0 Karma

robert_miller
Path Finder

I am using the App sendresults. Below are the variables I am using. This will recurse through my results and email each manager their employee results.

| eval email_to=manager | sendresults subject="Test." showemail=f

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...