diff --git a/apps/prometheus/README.md b/apps/prometheus/README.md new file mode 100644 index 00000000..345f963f --- /dev/null +++ b/apps/prometheus/README.md @@ -0,0 +1,14 @@ +# Prometheus + +Prometheus 一个监控系统和时间序列数据库 + +## 主要功能: + +- 多维数据模型,其中时间序列数据由指标名称和键/值对标识 +- PromQL,一种利用此维度的灵活查询语言 +- 不依赖分布式存储; +- 单个服务器节点是自治的 +- 时间序列收集通过 HTTP 上的拉模型进行 +- 通过中间网关支持推送时间序列 +- 通过服务发现或静态配置发现目标 +- 多种图形和仪表板支持模式 diff --git a/apps/prometheus/data.yml b/apps/prometheus/data.yml new file mode 100644 index 00000000..07c66f1b --- /dev/null +++ b/apps/prometheus/data.yml @@ -0,0 +1,19 @@ +name: Prometheus +tags: + - 数据库 +title: Prometheus 一个监控系统和时间序列数据库 +type: 数据库 +description: Prometheus 是一个监控系统和时间序列数据库 +additionalProperties: + key: prometheus + name: Prometheus + tags: + - Database + shortDescZh: Prometheus 一个监控系统和时间序列数据库 + shortDescEn: The Prometheus monitoring system and time series database. + type: runtime + crossVersionUpdate: false + limit: 0 + website: https://prometheus.io + github: https://github.com/prometheus/prometheus + document: https://prometheus.io/docs/introduction/overview/ \ No newline at end of file diff --git a/apps/prometheus/logo.png b/apps/prometheus/logo.png new file mode 100644 index 00000000..a3a96013 Binary files /dev/null and b/apps/prometheus/logo.png differ diff --git a/apps/prometheus/v2.48.0/conf/prometheus.yml b/apps/prometheus/v2.48.0/conf/prometheus.yml new file mode 100644 index 00000000..d3131b31 --- /dev/null +++ b/apps/prometheus/v2.48.0/conf/prometheus.yml @@ -0,0 +1,25 @@ +global: + scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. + evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. + # scrape_timeout is set to the global default (10s). + +# Alertmanager configuration +alerting: + alertmanagers: + - static_configs: + - targets: + # - alertmanager:9093 + +# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. +rule_files: +# - "first_rules.yml" +# - "second_rules.yml" + +# 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=` to any timeseries scraped from this config. + - job_name: 'prometheus' + static_configs: + - targets: [ 'localhost:9090' ] + diff --git a/apps/prometheus/v2.48.0/data.yml b/apps/prometheus/v2.48.0/data.yml new file mode 100644 index 00000000..a9d231b4 --- /dev/null +++ b/apps/prometheus/v2.48.0/data.yml @@ -0,0 +1,10 @@ +additionalProperties: + formFields: + - default: 9090 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: Web 端口 + required: true + rule: paramPort + type: number diff --git a/apps/prometheus/v2.48.0/docker-compose.yml b/apps/prometheus/v2.48.0/docker-compose.yml new file mode 100644 index 00000000..7cfbe5a1 --- /dev/null +++ b/apps/prometheus/v2.48.0/docker-compose.yml @@ -0,0 +1,24 @@ +version: '3' +services: + clickhouse: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:9090" + volumes: + - ./conf:/etc/prometheus/ + - ./prometheus:/prometheus + image: prom/prometheus:v2.48.0 + command: + - '--config.file=/etc/prometheus/prometheus.yml' + - '--storage.tsdb.path=/prometheus' + - '--web.console.libraries=/etc/prometheus/console_libraries' + - '--web.console.templates=/etc/prometheus/consoles' + - '--storage.tsdb.retention=200h' + labels: + createdBy: "Apps" +networks: + 1panel-network: + external: true diff --git a/apps/prometheus/v2.48.0/prometheus/.gitkeep b/apps/prometheus/v2.48.0/prometheus/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/prometheus/v2.48.0/scripts/init.sh b/apps/prometheus/v2.48.0/scripts/init.sh new file mode 100644 index 00000000..85005648 --- /dev/null +++ b/apps/prometheus/v2.48.0/scripts/init.sh @@ -0,0 +1 @@ +chmod -R 777 prometheus \ No newline at end of file