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
Get Updates on the Splunk Community!

Getting Started with AIOps: Event Correlation Basics and Alert Storm Detection in ...

Getting Started with AIOps:Event Correlation Basics and Alert Storm Detection in Splunk IT Service ...

Register to Attend BSides SPL 2022 - It's all Happening October 18!

Join like-minded individuals for technical sessions on everything Splunk!  This is a community-led and run ...

What's New in Splunk Cloud Platform 9.0.2208?!

Howdy!  We are happy to share the newest updates in Splunk Cloud Platform 9.0.2208! Analysts can benefit ...