-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/openimsdk/open-im-server
- Loading branch information
Showing
192 changed files
with
12,868 additions
and
2,380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ COPY --from=builder $SERVER_DIR/start-config.yml $SERVER_DIR/ | |
COPY --from=builder $SERVER_DIR/go.mod $SERVER_DIR/ | ||
COPY --from=builder $SERVER_DIR/go.sum $SERVER_DIR/ | ||
|
||
RUN go get github.com/openimsdk/[email protected].13 | ||
RUN go get github.com/openimsdk/[email protected].14-alpha.5 | ||
|
||
# Set the command to run when the container starts | ||
ENTRYPOINT ["sh", "-c", "mage start && tail -f /dev/null"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,4 @@ func main() { | |
if err := cmd.NewApiCmd().Exec(); err != nil { | ||
program.ExitWithError(err) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
global: | ||
resolve_timeout: 5m | ||
smtp_from: [email protected] | ||
smtp_smarthost: smtp.163.com:465 | ||
smtp_auth_username: [email protected] | ||
smtp_auth_password: YOURAUTHPASSWORD | ||
smtp_require_tls: false | ||
smtp_hello: xxx | ||
|
||
templates: | ||
- /etc/alertmanager/email.tmpl | ||
|
||
route: | ||
group_by: [ 'alertname' ] | ||
group_wait: 5s | ||
group_interval: 5s | ||
repeat_interval: 5m | ||
receiver: email | ||
routes: | ||
- matchers: | ||
- alertname = "XXX" | ||
group_by: [ 'instance' ] | ||
group_wait: 5s | ||
group_interval: 5s | ||
repeat_interval: 5m | ||
receiver: email | ||
|
||
receivers: | ||
- name: email | ||
email_configs: | ||
- to: '[email protected]' | ||
html: '{{ template "email.to.html" . }}' | ||
headers: { Subject: "[OPENIM-SERVER]Alarm" } | ||
send_resolved: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{{ define "email.to.html" }} | ||
{{ if eq .Status "firing" }} | ||
{{ range .Alerts }} | ||
<!-- Begin of OpenIM Alert --> | ||
<div style="border:1px solid #ccc; padding:10px; margin-bottom:10px;"> | ||
<h3>OpenIM Alert</h3> | ||
<p><strong>Alert Status:</strong> firing</p> | ||
<p><strong>Alert Program:</strong> Prometheus Alert</p> | ||
<p><strong>Severity Level:</strong> {{ .Labels.severity }}</p> | ||
<p><strong>Alert Type:</strong> {{ .Labels.alertname }}</p> | ||
<p><strong>Affected Host:</strong> {{ .Labels.instance }}</p> | ||
<p><strong>Affected Service:</strong> {{ .Labels.job }}</p> | ||
<p><strong>Alert Subject:</strong> {{ .Annotations.summary }}</p> | ||
<p><strong>Trigger Time:</strong> {{ .StartsAt.Format "2006-01-02 15:04:05" }}</p> | ||
</div> | ||
{{ end }} | ||
|
||
|
||
{{ else if eq .Status "resolved" }} | ||
{{ range .Alerts }} | ||
<!-- Begin of OpenIM Alert --> | ||
<div style="border:1px solid #ccc; padding:10px; margin-bottom:10px;"> | ||
<h3>OpenIM Alert</h3> | ||
<p><strong>Alert Status:</strong> resolved</p> | ||
<p><strong>Alert Program:</strong> Prometheus Alert</p> | ||
<p><strong>Severity Level:</strong> {{ .Labels.severity }}</p> | ||
<p><strong>Alert Type:</strong> {{ .Labels.alertname }}</p> | ||
<p><strong>Affected Host:</strong> {{ .Labels.instance }}</p> | ||
<p><strong>Affected Service:</strong> {{ .Labels.job }}</p> | ||
<p><strong>Alert Subject:</strong> {{ .Annotations.summary }}</p> | ||
<p><strong>Trigger Time:</strong> {{ .StartsAt.Format "2006-01-02 15:04:05" }}</p> | ||
</div> | ||
{{ end }} | ||
<!-- End of OpenIM Alert --> | ||
{{ end }} | ||
{{ end }} |
Oops, something went wrong.