Alerting

Why is my scheduled alert email not sending and getting error "'utf8' codec can't decode byte 0xa2 in position 24: invalid start byte"?

ryuch2002
Explorer

Splunk Enterprise ver: 6.3.1
OS: Windows7-64bit

email -server: local SMTP Server ./splunk cmd python -m smtpd -n -d -c DebuggingServer localhost:2500

Search App test:

index=_internal | head 1 | sendemail to="my_email_account" format="html" server=localhost:2500

no error occurred, but schedule Alert email error occureed (splunkd.log )

 Traceback (most recent call last):                                                          
   File "C:\Splunk\Python-2.7\Lib\logging\handlers.py", line 76, in emit                     
     if self.shouldRollover(record):                                                         
   File "C:\Splunk\Python-2.7\Lib\logging\handlers.py", line 156, in shouldRollover          
     msg = "%s\n" % self.format(record)                                                      
   File "C:\Splunk\Python-2.7\Lib\logging\__init__.py", line 732, in format                  
     return fmt.format(record)                                                               
   File "C:\Splunk\Python-2.7\Lib\logging\__init__.py", line 474, in format                  
     s = self._fmt % record.__dict__                                                         
 UnicodeDecodeError: 'utf8' codec can't decode byte 0xa2 in position 24: invalid start byte  
 Logged from file sendemail.py, line 112                                  

What's the problem? help!
I can't receive email alerts.

0 Karma

NOUMSSI
Builder

Hi,
It can't work because, It's not possible for you to install splunk on your computer and you him send mail to another server because your computer is a local server and it's not know by others.
It can work if your splunk is install on the cloud. Once it's done, the atribute server must be equals to tha adress of your splunk on cloud.
For example:

 index=_internal | head 1 | sendemail to="my_email_account" format="html" server=mail.example.com:2500

Or

 index=_internal | head 1 | sendemail to="my_email_account" format="html" server=192.168.1.9:2500
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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...