Commit b0efd35c by lincyawer

添加compose file

parent 2387279b
services:
prometheus:
image: prom/prometheus
hostname: prometheus
ports:
- "10001:9090"
networks:
- monitoring
configs:
- source: prometheus-config
target: /etc/prometheus/mysqld_exporter.cnf
command: "--config.file=/etc/prometheus/mysqld_exporter.cnf"
volumes:
- prome-data:/prometheus
grafana:
image: grafana/grafana-enterprise
ports:
- "3000:3000"
networks:
- monitoring
configs:
- source: grafana-ini
target: /etc/grafana/grafana.ini
- source: grafana-ladp
target: /etc/grafana/ladp.toml
mysql-exportor-234:
image: prom/mysqld-exporter
ports:
- "10002:9104"
networks:
- monitoring
configs:
- source: mysqld234
target: /etc/prometheus/mysqld_exporter.cnf
command: "--config.my-cnf=/etc/prometheus/mysqld_exporter.cnf"
mysql-exportor-252:
image: prom/mysqld-exporter
ports:
- "10003:9104"
networks:
- monitoring
configs:
- source: mysqld252
target: /etc/prometheus/mysqld_exporter.cnf
command: "--config.my-cnf=/etc/prometheus/mysqld_exporter.cnf"
es-exporter:
image: quay.io/prometheuscommunity/elasticsearch-exporter:latest
ports:
- 10004:9114
networks:
- monitoring
command: "--es.uri=http://192.168.1.234:9200"
volumes:
prome-data:
name: "prometheus-data"
configs:
prometheus-config:
file: ./prometheus/prometheus.yml
grafana-ini:
file: ./grafana/grafana.ini
grafana-ladp:
file: ./grafana/ladp.toml
mysqld234:
file: ./mysql/mysql_exporter_234.cnf
mysqld252:
file: ./mysql/mysql_exporter_252.cnf
networks:
# The presence of these objects is sufficient to define them
monitoring: {}
\ No newline at end of file
# To troubleshoot and get more log info enable ldap debug logging in grafana.ini
# [log]
# filters = ldap:debug
[[servers]]
# Ldap server host (specify multiple hosts space separated)
host = "47.107.53.101"
# Default port is 389 or 636 if use_ssl = true
port = 389
# Set to true if LDAP server should use an encrypted TLS connection (either with STARTTLS or LDAPS)
use_ssl = false
# If set to true, use LDAP with STARTTLS instead of LDAPS
start_tls = false
# set to true if you want to skip ssl cert validation
ssl_skip_verify = false
# set to the path to your root CA certificate or leave unset to use system defaults
# root_ca_cert = "/path/to/certificate.crt"
# Authentication against LDAP servers requiring client certificates
# client_cert = "/path/to/client.crt"
# client_key = "/path/to/client.key"
# Search user bind dn
bind_dn = "cn=admin,dc=ichunt,dc=net"
# Search user bind password
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
bind_password = 'SZichunt2022123'
# Timeout in seconds (applies to each host specified in the 'host' entry (space separated))
timeout = 10
# User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"
search_filter = "(cn=%s)"
# An array of base dns to search through
search_base_dns = ["cn=RDC,ou=Group,dc=ichunt,dc=net"]
## For Posix or LDAP setups that does not support member_of attribute you can define the below settings
## Please check grafana LDAP docs for examples
#group_search_filter = "(&(objectClass=posixGroup)(memberUid=%s))"
#group_search_base_dns = ["ou=Group,dc=ichunt,dc=net"]
#group_search_filter_user_attribute = "uid"
# Specify names of the ldap attributes your ldap uses
[servers.attributes]
name = "givenName"
surname = "sn"
username = "cn"
member_of = "uidNumber"
email = "email"
# Map ldap groups to grafana org roles
#[[servers.group_mappings]]
#group_dn = "cn=RDC,ou=Group,dc=ichunt,dc=net"
#org_role = "Admin"
# To make user an instance admin (Grafana Admin) uncomment line below
# grafana_admin = true
# The Grafana organization database id, optional, if left out the default org (id 1) will be used
# org_id = 1
#[[servers.group_mappings]]
#group_dn = "cn=users,ou=groups,dc=grafana,dc=org"
#org_role = "Editor"
[[servers.group_mappings]]
# If you want to match all (or no ldap groups) then you can use wildcard
group_dn = "*"
org_role = "Viewer"
[client]
host=192.168.1.234
port=3306
user=dbacheck
password='dbcheck2021'
[client]
host=192.168.1.252
port=3306
user=dbacheck
password='dbcheck2021'
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- job_name: mysql # To get metrics about the mysql exporter’s targets
params:
# # Not required. Will match value to child in config file. Default value is `client`.
# auth_module: client.servers
static_configs:
- targets: ['192.168.1.234:9104','192.168.1.234:9105']
- job_name: 'node'
static_configs:
- targets: ['192.168.1.234:9100','192.168.1.252:9100']
- job_name: 'elastic_search'
static_configs:
- targets: ['192.168.1.234:9114']
- job_name: 'redis'
static_configs:
- targets: ['192.168.1.234:9121']
- job_name: 'mongodb'
static_configs:
- targets: ['192.168.1.234:9001']
- job_name: 'rabbitmq'
static_configs:
- targets: ['192.168.1.234:9419']
{
"rabbit_url": "http://192.168.1.252:15672",
"rabbit_user": "guest",
"rabbit_pass": "guest",
"publish_port": "9419",
"publish_addr": "192.168.1.234",
"output_format": "TTY",
"enabled_exporters": [
"exchange",
"node",
"overview",
"queue",
"aliveness"
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment