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!

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...