Grafana 4.0版
Datasource InfluxDB
请认为我是初学者。 为此,如何在Grafana仪表板中设置警报?警报发送到电子邮件。
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="AdditionalResources">
<ItemGroup>
<AddFiles Include="$(ProjectDir)\App_Themes\**\Basic\Dynamic.css">
<CustomPath>App_themes\</CustomPath>
</AddFiles>
<AddFiles Include="C:\y\SharedDLL\Clients\Web\bin\**\*.dll">
<CustomPath>bin\</CustomPath>
</AddFiles>
<AddFiles Include="C:\y\SharedDLL\Clients\Web\resources\**\ctrl_res\**\*.*" />
<AddFiles Include="C:\y\SharedDLL\Clients\Web\resources\js\**\*.*">
<CustomPath>js\</CustomPath>
</AddFiles>
<AddFiles Include="C:\y\SharedDLL\Clients\Web\resources\**\ClientBin\**\*.xap" />
<AddFiles Include="C:\y\SharedDLL\Clients\Web\resources\FileUpload\**\*.js">
<CustomPath>js\</CustomPath>
</AddFiles>
<!-- Minified files should be copied last to override non-minified ones -->
<AddFiles Include="$(ProjectDir)\MINIFIED_FILES\**\*.*" />
</ItemGroup>
<ItemGroup>
<FilesForPackagingFromProject Include="%(AddFiles.Identity)">
<DestinationRelativePath>%(AddFiles.CustomPath)%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>
我写了这样的SMTP配置:
/etc/grafana/grafana.ini
当我在Grafana仪表板中设置警报时显示错误:
[smtp]
enabled = True
host = localhost:25
user =
If the password contains # or ; you have to wrap it with trippel
quotes. Ex """#password;"""
[emails]
welcome_email_on_sign_up = True
答案 0 :(得分:4)
将此/usr/share/grafana/conf/defaults.ini
文件配置如下:
[smtp]
enabled = true
host = smtp.gmail.com:587
user = Your_Email_Address@gmail.com
password = """Your_Password"""
cert_file =
key_file =
skip_verify = true
from_address = Your_Email_Address@gmail.com
from_name = Your_Name
ehlo_identity =
在此示例中,我使用SMTP设置了自己的Gmail帐户:
smtp.gmail.com
587(TLS)
端口。{/ p>
您应该找到包含其端口的SMTP电子邮件地址。
[注意强>]
别忘了将密码放在 password_field 。
答案 1 :(得分:0)
Windows \grafana-6.4.4.windows-amd64\grafana-6.4.4\conf\defaults.ini
的邮件警报grafana配置
[smtp]
enabled = true
host = smtp.gmail.com:587
;user =
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
;password =
;cert_file =
;key_file =
skip_verify = true
from_address = your_mail_id
from_name = Grafana
;ehlo_identity = dashboard.example.com