Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
FGadvancer committed Dec 12, 2023
2 parents 324ff57 + bb44633 commit 7d072d4
Show file tree
Hide file tree
Showing 9 changed files with 1,093 additions and 126 deletions.
36 changes: 36 additions & 0 deletions config/templates/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Examples Directory

Welcome to the `examples` directory of our project! This directory contains a collection of example files that demonstrate various configurations and setups for our software. These examples are designed to provide you with templates that can be used as a starting point for your own configurations.

## Overview

In this directory, you'll find examples for a variety of use cases. Each file is a template with default values and configurations that illustrate best practices and typical scenarios. Whether you're just getting started or looking to implement a complex setup, these examples should help you get on the right track.

## Structure

Here's a quick overview of what you'll find in this directory:

+ `env-example.yaml`: Demonstrates how to set up environment variables.
+ `openim-example.yaml`: A sample configuration file for the OpenIM application.
+ `prometheus-example.yml`: An example Prometheus configuration for monitoring.
+ `alertmanager-example.yml`: A template for setting up Alertmanager configurations.

## How to Use These Examples

To use these examples, simply copy the relevant file to your working directory and rename it as needed (e.g., removing the `-example` suffix). Then, modify the file according to your requirements.

### Tips for Using Example Files:

1. **Read the Comments**: Each file contains comments that explain various sections and settings. Make sure to read these comments for a better understanding of how to customize the file.
2. **Check for Required Changes**: Some examples might require mandatory changes (like setting specific environment variables) before they can be used effectively.
3. **Version Compatibility**: Ensure that the example files are compatible with the version of the software you are using.

## Contributing

If you have a configuration that you believe would be beneficial to others, please feel free to contribute by opening a pull request with your proposed changes. We appreciate contributions that expand our examples with new scenarios and use cases.

## Support

If you encounter any issues or have questions regarding the example files, please open an issue on our repository. Our community is here to help you navigate through any challenges you might face.

Thank you for exploring our examples, and we hope they will be helpful in setting up and configuring your environment!
33 changes: 33 additions & 0 deletions config/templates/alertmanager.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
###################### AlertManager Configuration ######################
# AlertManager configuration using environment variables
#
# Resolve timeout
# SMTP configuration for sending alerts
# Templates for email notifications
# Routing configurations for alerts
# Receiver configurations
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
receivers:
- name: email
email_configs:
- to: '[email protected]'
html: '{{ template "email.to.html" . }}'
headers: { Subject: "[OPENIM-SERVER]Alarm" }
send_resolved: true
Loading

0 comments on commit 7d072d4

Please sign in to comment.