mirror of
https://github.com/flashcatcloud/n9e-helm.git
synced 2026-03-02 17:08:52 +00:00
Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bde522e0c4 | ||
|
|
f83cfe085e | ||
|
|
a24bc86b81 | ||
|
|
688f66d624 | ||
|
|
9e5526ecb5 | ||
|
|
b1d46585b3 | ||
|
|
89cdbaf6c8 | ||
|
|
d6d13a9a89 | ||
|
|
a163822fa0 | ||
|
|
9cccf4bd6f | ||
|
|
8bb0ab0550 | ||
|
|
fcd8d91d64 | ||
|
|
3ad484ca84 | ||
|
|
f95dfd35a8 | ||
|
|
f97554b2c5 | ||
|
|
f1db740c9b | ||
|
|
ce847394b5 | ||
|
|
9f11668296 | ||
|
|
dc63b24296 | ||
|
|
60ff76ccbd | ||
|
|
733d67f6e3 | ||
|
|
a83db9aaaa | ||
|
|
54f1903b2e | ||
|
|
6eda186223 | ||
|
|
61168bcd38 | ||
|
|
bb11f65f5c | ||
|
|
1857ab8a7c | ||
|
|
d0586c3fb9 | ||
|
|
f668f5e9bc | ||
|
|
1bccc36803 | ||
|
|
6a1f6c68f5 | ||
|
|
054d202068 | ||
|
|
7a6ea64e20 | ||
|
|
a4c3f26455 | ||
|
|
0f44db31de | ||
|
|
8893668a0e | ||
|
|
1c3f40b39b | ||
|
|
26c249cbdc | ||
|
|
36ec573258 | ||
|
|
6c53644a26 | ||
|
|
1316ad9ef5 | ||
|
|
c68c2172b6 | ||
|
|
119b37612f | ||
|
|
43345dcf37 | ||
|
|
60b4dc50f1 | ||
|
|
38fac0006f | ||
|
|
a2035ef808 |
29
templates/n9e/tpl-cm.yaml → .github/Chart.yaml
vendored
29
templates/n9e/tpl-cm.yaml → .github/Chart.yaml
vendored
@@ -1,4 +1,3 @@
|
||||
{{/*
|
||||
# Copyright 2022 flashcat.cloud | 快猫星云
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -13,12 +12,24 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
*/}}
|
||||
{{- if eq .Values.n9e.type "internal" -}}
|
||||
annotations:
|
||||
catalog.cattle.io/release-name: flashcatcloud
|
||||
name: nightingale
|
||||
description: A Helm Chart for nightingale, cloud-native monitoring system
|
||||
keywords:
|
||||
- nightingale
|
||||
- monitoring
|
||||
- alerting
|
||||
- metrics
|
||||
- traces
|
||||
- logs
|
||||
home: https://n9e.github.io/charts
|
||||
sources:
|
||||
- https://github.com/ccfos/nightingale
|
||||
maintainers:
|
||||
- email: contact-us@flashcat.cloud
|
||||
name: flashcatcloud
|
||||
version: v8.0.0-beta12
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: n9e-template
|
||||
data:
|
||||
{{ (.Files.Glob "tpl/*.tpl").AsConfig | indent 2 }}
|
||||
{{- end -}}
|
||||
appVersion: 8.0.0-beta12
|
||||
icon: https://raw.githubusercontent.com/flashcatcloud/n9e-helm/master/n9e-icon.png
|
||||
62
.github/workflows/release.yaml
vendored
62
.github/workflows/release.yaml
vendored
@@ -1,28 +1,62 @@
|
||||
name: Release
|
||||
name: Release Chart
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
env:
|
||||
GO_VERSION: 1.18
|
||||
|
||||
env:
|
||||
USERNAME: flashcatcloud
|
||||
|
||||
permissions: {}
|
||||
jobs:
|
||||
goreleaser:
|
||||
release-chart:
|
||||
permissions:
|
||||
contents: write # to push chart release and create a release (helm/chart-releaser-action)
|
||||
packages: write # needed for ghcr access
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Go Environment
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "$USERNAME"
|
||||
git config user.email "$USERNAME@users.noreply.github.com"
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v4.2.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
|
||||
- name: Run chart-releaser
|
||||
uses: helm/chart-releaser-action@v1.6.0
|
||||
with:
|
||||
mark_as_latest: false
|
||||
charts_dir: .
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CR_OWNER: "flashcatcloud"
|
||||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}"
|
||||
CR_GENERATE_RELEASE_NOTES: false
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: $USERNAME
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Push charts to GHCR
|
||||
run: |
|
||||
shopt -s nullglob
|
||||
for pkg in .cr-release-packages/*; do
|
||||
if [ -z "${pkg:-}" ]; then
|
||||
break
|
||||
fi
|
||||
helm push "${pkg}" "oci://ghcr.io/$USERNAME/charts"
|
||||
done
|
||||
|
||||
@@ -18,12 +18,10 @@ archives:
|
||||
wrap_in_directory: true
|
||||
meta: true
|
||||
files:
|
||||
- integrations/*
|
||||
- categraf/*
|
||||
- metrics/*
|
||||
- scripts/*
|
||||
- templates/*
|
||||
- tpl/*
|
||||
- Chart.yaml
|
||||
- LICENSE
|
||||
- n9e-icon.png
|
||||
@@ -35,4 +33,4 @@ release:
|
||||
github:
|
||||
owner: flashcatcloud
|
||||
name: n9e-helm
|
||||
name_template: "v{{ .Version }}"
|
||||
name_template: "v{{ .Version }}"
|
||||
|
||||
@@ -25,11 +25,11 @@ keywords:
|
||||
- logs
|
||||
home: https://n9e.github.io
|
||||
sources:
|
||||
- https://github.com/didi/nightingale
|
||||
- https://github.com/ccfos/nightingale
|
||||
maintainers:
|
||||
- email: contact-us@flashcat.cloud
|
||||
name: flashcatcloud
|
||||
version: 0.2.7
|
||||
version: 0.2.11
|
||||
apiVersion: v1
|
||||
appVersion: 6.3.4
|
||||
appVersion: 8.0.0-beta12
|
||||
icon: https://raw.githubusercontent.com/flashcatcloud/n9e-helm/master/n9e-icon.png
|
||||
|
||||
@@ -1,232 +0,0 @@
|
||||
{
|
||||
"name": "nightingale",
|
||||
"tags": "",
|
||||
"configs": {
|
||||
"var": [],
|
||||
"panels": [
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "rate(n9e_server_samples_received_total[1m])"
|
||||
}
|
||||
],
|
||||
"name": "number of data points received per second",
|
||||
"options": {
|
||||
"tooltip": {
|
||||
"mode": "all",
|
||||
"sort": "none"
|
||||
},
|
||||
"legend": {
|
||||
"displayMode": "hidden"
|
||||
},
|
||||
"standardOptions": {},
|
||||
"thresholds": {}
|
||||
},
|
||||
"custom": {
|
||||
"drawStyle": "lines",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 0.5,
|
||||
"stack": "off"
|
||||
},
|
||||
"version": "2.0.0",
|
||||
"type": "timeseries",
|
||||
"layout": {
|
||||
"h": 4,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"i": "53fcb9dc-23f9-41e0-bc5e-121eed14c3a4",
|
||||
"isResizable": true
|
||||
},
|
||||
"id": "53fcb9dc-23f9-41e0-bc5e-121eed14c3a4"
|
||||
},
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "rate(n9e_server_alerts_total[10m])"
|
||||
}
|
||||
],
|
||||
"name": "number of alarm events generated per second",
|
||||
"options": {
|
||||
"tooltip": {
|
||||
"mode": "all",
|
||||
"sort": "none"
|
||||
},
|
||||
"legend": {
|
||||
"displayMode": "hidden"
|
||||
},
|
||||
"standardOptions": {},
|
||||
"thresholds": {}
|
||||
},
|
||||
"custom": {
|
||||
"drawStyle": "lines",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 0.5,
|
||||
"stack": "off"
|
||||
},
|
||||
"version": "2.0.0",
|
||||
"type": "timeseries",
|
||||
"layout": {
|
||||
"h": 4,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0,
|
||||
"i": "47fc6252-9cc8-4b53-8e27-0c5c59a47269",
|
||||
"isResizable": true
|
||||
},
|
||||
"id": "f70dcb8b-b58b-4ef9-9e48-f230d9e17140"
|
||||
},
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "n9e_server_alert_queue_size"
|
||||
}
|
||||
],
|
||||
"name": "queue length of alarm events",
|
||||
"options": {
|
||||
"tooltip": {
|
||||
"mode": "all",
|
||||
"sort": "none"
|
||||
},
|
||||
"legend": {
|
||||
"displayMode": "hidden"
|
||||
},
|
||||
"standardOptions": {},
|
||||
"thresholds": {}
|
||||
},
|
||||
"custom": {
|
||||
"drawStyle": "lines",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 0.5,
|
||||
"stack": "off"
|
||||
},
|
||||
"version": "2.0.0",
|
||||
"type": "timeseries",
|
||||
"layout": {
|
||||
"h": 4,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 4,
|
||||
"i": "ad1af16c-de0c-45f4-8875-cea4e85d51d0",
|
||||
"isResizable": true
|
||||
},
|
||||
"id": "caf23e58-d907-42b0-9ed6-722c8c6f3c5f"
|
||||
},
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "n9e_server_http_request_duration_seconds_sum/n9e_server_http_request_duration_seconds_count"
|
||||
}
|
||||
],
|
||||
"name": "The average response time of the data receiving interface (unit: seconds).",
|
||||
"options": {
|
||||
"tooltip": {
|
||||
"mode": "all",
|
||||
"sort": "desc"
|
||||
},
|
||||
"legend": {
|
||||
"displayMode": "hidden"
|
||||
},
|
||||
"standardOptions": {},
|
||||
"thresholds": {}
|
||||
},
|
||||
"custom": {
|
||||
"drawStyle": "lines",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 0.5,
|
||||
"stack": "noraml"
|
||||
},
|
||||
"version": "2.0.0",
|
||||
"type": "timeseries",
|
||||
"layout": {
|
||||
"h": 4,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 4,
|
||||
"i": "64c3abc2-404c-4462-a82f-c109a21dac91",
|
||||
"isResizable": true
|
||||
},
|
||||
"id": "6b8d2db1-efca-4b9e-b429-57a9d2272bc5"
|
||||
},
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "n9e_server_sample_queue_size"
|
||||
}
|
||||
],
|
||||
"name": "length of the in-memory data queue",
|
||||
"options": {
|
||||
"tooltip": {
|
||||
"mode": "all",
|
||||
"sort": "desc"
|
||||
},
|
||||
"legend": {
|
||||
"displayMode": "hidden"
|
||||
},
|
||||
"standardOptions": {},
|
||||
"thresholds": {}
|
||||
},
|
||||
"custom": {
|
||||
"drawStyle": "lines",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 0.5,
|
||||
"stack": "off"
|
||||
},
|
||||
"version": "2.0.0",
|
||||
"type": "timeseries",
|
||||
"layout": {
|
||||
"h": 4,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 8,
|
||||
"i": "1c7da942-58c2-40dc-b42f-983e4a35b89b",
|
||||
"isResizable": true
|
||||
},
|
||||
"id": "bd41677d-40d3-482e-bb6e-fbd25df46d87"
|
||||
},
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "avg(n9e_server_forward_duration_seconds_sum/n9e_server_forward_duration_seconds_count)"
|
||||
}
|
||||
],
|
||||
"name": "average time it takes to send data to TSDB (unit: seconds)",
|
||||
"options": {
|
||||
"tooltip": {
|
||||
"mode": "all",
|
||||
"sort": "desc"
|
||||
},
|
||||
"legend": {
|
||||
"displayMode": "hidden"
|
||||
},
|
||||
"standardOptions": {},
|
||||
"thresholds": {}
|
||||
},
|
||||
"custom": {
|
||||
"drawStyle": "lines",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 0.5,
|
||||
"stack": "noraml"
|
||||
},
|
||||
"version": "2.0.0",
|
||||
"type": "timeseries",
|
||||
"layout": {
|
||||
"h": 4,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 8,
|
||||
"i": "eed94a0b-954f-48ac-82e5-a2eada1c8a3d",
|
||||
"isResizable": true
|
||||
},
|
||||
"id": "c8642e72-f384-46a5-8410-1e6be2953c3c"
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 14 KiB |
111
metrics/ops.yaml
111
metrics/ops.yaml
@@ -1,111 +0,0 @@
|
||||
ops:
|
||||
- name: dashboards
|
||||
cname: 仪表盘
|
||||
ops:
|
||||
- "/dashboards"
|
||||
- "/dashboards/add"
|
||||
- "/dashboards/put"
|
||||
- "/dashboards/del"
|
||||
- "/dashboards-built-in"
|
||||
|
||||
- name: alert
|
||||
cname: 告警规则
|
||||
ops:
|
||||
- "/alert-rules"
|
||||
- "/alert-rules/add"
|
||||
- "/alert-rules/put"
|
||||
- "/alert-rules/del"
|
||||
- "/alert-rules-built-in"
|
||||
- name: alert-mutes
|
||||
cname: 告警静默管理
|
||||
ops:
|
||||
- "/alert-mutes"
|
||||
- "/alert-mutes/add"
|
||||
- "/alert-mutes/del"
|
||||
|
||||
- name: alert-subscribes
|
||||
cname: 告警订阅管理
|
||||
ops:
|
||||
- "/alert-subscribes"
|
||||
- "/alert-subscribes/add"
|
||||
- "/alert-subscribes/put"
|
||||
- "/alert-subscribes/del"
|
||||
|
||||
- name: alert-events
|
||||
cname: 告警事件管理
|
||||
ops:
|
||||
- "/alert-cur-events"
|
||||
- "/alert-cur-events/del"
|
||||
- "/alert-his-events"
|
||||
|
||||
- name: recording-rules
|
||||
cname: 记录规则管理
|
||||
ops:
|
||||
- "/recording-rules"
|
||||
- "/recording-rules/add"
|
||||
- "/recording-rules/put"
|
||||
- "/recording-rules/del"
|
||||
|
||||
- name: metric
|
||||
cname: 时序指标
|
||||
ops:
|
||||
- "/metric/explorer"
|
||||
- "/object/explorer"
|
||||
|
||||
- name: log
|
||||
cname: 日志分析
|
||||
ops:
|
||||
- "/log/explorer"
|
||||
|
||||
- name: trace
|
||||
cname: 链路追踪
|
||||
ops:
|
||||
- "/trace/explorer"
|
||||
- "/trace/dependencies"
|
||||
|
||||
- name: targets
|
||||
cname: 基础设施
|
||||
ops:
|
||||
- "/targets"
|
||||
- "/targets/add"
|
||||
- "/targets/put"
|
||||
- "/targets/del"
|
||||
|
||||
- name: job
|
||||
cname: 任务管理
|
||||
ops:
|
||||
- "/job-tpls"
|
||||
- "/job-tpls/add"
|
||||
- "/job-tpls/put"
|
||||
- "/job-tpls/del"
|
||||
- "/job-tasks"
|
||||
- "/job-tasks/add"
|
||||
- "/job-tasks/put"
|
||||
|
||||
- name: user
|
||||
cname: 用户管理
|
||||
ops:
|
||||
- "/users"
|
||||
- "/user-groups"
|
||||
- "/user-groups/add"
|
||||
- "/user-groups/put"
|
||||
- "/user-groups/del"
|
||||
|
||||
- name: busi-groups
|
||||
cname: 业务分组管理
|
||||
ops:
|
||||
- "/busi-groups"
|
||||
- "/busi-groups/add"
|
||||
- "/busi-groups/put"
|
||||
- "/busi-groups/del"
|
||||
|
||||
- name: system
|
||||
cname: 系统信息
|
||||
ops:
|
||||
- "/help/version"
|
||||
- "/help/servers"
|
||||
- "/help/source"
|
||||
- "/help/sso"
|
||||
- "/help/notification-tpls"
|
||||
- "/help/notification-settings"
|
||||
- "/help/migrate"
|
||||
1674
scripts/a-n9e.sql
1674
scripts/a-n9e.sql
File diff suppressed because it is too large
Load Diff
@@ -160,6 +160,26 @@ app: "{{ template "nightingale.name" . }}"
|
||||
{{- printf "80" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "nightingale.n9e.ibexEnable" -}}
|
||||
{{- if eq .Values.n9e.type "internal" -}}
|
||||
{{- .Values.n9e.internal.ibexEnable -}}
|
||||
{{- else -}}
|
||||
{{- .Values.n9e.external.ibexEnable -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "nightingale.n9e.ibexPort" -}}
|
||||
{{- if eq .Values.n9e.type "internal" -}}
|
||||
{{- .Values.n9e.internal.ibexPort -}}
|
||||
{{- else -}}
|
||||
{{- .Values.n9e.external.ibexPort -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "nightingale.n9e.ibexServicePort" -}}
|
||||
{{- printf "20090" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "nightingale.prometheus.host" -}}
|
||||
{{- if eq .Values.prometheus.type "internal" -}}
|
||||
{{- template "nightingale.prometheus" . }}
|
||||
@@ -215,6 +235,12 @@ app: "{{ template "nightingale.name" . }}"
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "nightingale.redis.username" -}}
|
||||
{{- with .Values.redis }}
|
||||
{{- ternary "" .external.username (eq .type "internal") }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "nightingale.redis.password" -}}
|
||||
{{- with .Values.redis }}
|
||||
{{- ternary "" .external.password (eq .type "internal") }}
|
||||
|
||||
@@ -55,6 +55,8 @@ spec:
|
||||
terminationGracePeriodSeconds: 120
|
||||
containers:
|
||||
- name: mysql
|
||||
args:
|
||||
- "--ignore-db-dir=lost+found"
|
||||
image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }}
|
||||
imagePullPolicy: {{ .Values.imagePullPolicy }}
|
||||
ports:
|
||||
|
||||
@@ -24,8 +24,6 @@ metadata:
|
||||
data:
|
||||
metrics.yaml: |-
|
||||
{{ .Files.Get "metrics/metrics.yaml" | indent 4 }}
|
||||
ops.yaml: |-
|
||||
{{ .Files.Get "metrics/ops.yaml" | indent 4 }}
|
||||
config.toml: |-
|
||||
[global]
|
||||
RunMode = "release"
|
||||
@@ -55,13 +53,11 @@ data:
|
||||
# [HTTP.APIForAgent.BasicAuth]
|
||||
# user001 = "ccc26da7b9aba533cbb263a36c07dcc5"
|
||||
[HTTP.APIForService]
|
||||
Enable = true
|
||||
Enable = false
|
||||
[HTTP.APIForService.BasicAuth]
|
||||
user001 = "ccc26da7b9aba533cbb263a36c07dcc5"
|
||||
|
||||
[HTTP.JWTAuth]
|
||||
# signing key
|
||||
SigningKey = "5b94a0fd640fe2765af826acfe42d151"
|
||||
# unit: min
|
||||
AccessExpired = 1500
|
||||
# unit: min
|
||||
@@ -86,12 +82,12 @@ data:
|
||||
MaxLifetime = 7200
|
||||
MaxOpenConns = 150
|
||||
MaxIdleConns = 50
|
||||
TablePrefix = ""
|
||||
|
||||
[Redis]
|
||||
Address = "{{ template "nightingale.redis.addr" . }}"
|
||||
Username = "{{ template "nightingale.redis.username" . }}"
|
||||
Password = "{{ template "nightingale.redis.password" . }}"
|
||||
RedisType = "{{ template "nightingale.redis.mode"}}"
|
||||
RedisType = "{{ template "nightingale.redis.mode" . }}"
|
||||
|
||||
[Alert]
|
||||
[Alert.Heartbeat]
|
||||
@@ -99,7 +95,7 @@ data:
|
||||
IP = ""
|
||||
# unit ms
|
||||
Interval = 1000
|
||||
ClusterName = "default"
|
||||
EngineName = "default"
|
||||
|
||||
[Center]
|
||||
MetricsYamlFile = "/app/etc/metrics.yaml"
|
||||
@@ -112,6 +108,7 @@ data:
|
||||
[Pushgw]
|
||||
# use target labels in database instead of in series
|
||||
LabelRewrite = true
|
||||
ForceUseServerTS = true
|
||||
|
||||
[[Pushgw.Writers]]
|
||||
Url = "http://{{ template "nightingale.prometheus.host" . }}:{{ template "nightingale.prometheus.servicePort" . }}/api/v1/write"
|
||||
@@ -131,4 +128,7 @@ data:
|
||||
MaxConnsPerHost = 0
|
||||
MaxIdleConns = 100
|
||||
MaxIdleConnsPerHost = 100
|
||||
[Ibex]
|
||||
Enable = false
|
||||
RPCListen = "0.0.0.0:{{ template "nightingale.n9e.ibexPort" . }}"
|
||||
{{- end -}}
|
||||
|
||||
@@ -57,14 +57,12 @@ spec:
|
||||
ports:
|
||||
- containerPort: {{ template "nightingale.n9e.port" . }}
|
||||
{{- if .Values.n9e.internal.resources }}
|
||||
resources:
|
||||
{{ toYaml .Values.n9e.internal.resources | indent 10 }}
|
||||
resources:
|
||||
{{ toYaml .Values.n9e.internal.resources | indent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /app/etc
|
||||
name: n9e-config
|
||||
- mountPath: /app/etc/template
|
||||
name: n9e-template
|
||||
- mountPath: /app/etc/script
|
||||
name: n9e-script
|
||||
# hostname: n9e
|
||||
@@ -73,9 +71,6 @@ spec:
|
||||
- name: n9e-config
|
||||
configMap:
|
||||
name: n9e-config
|
||||
- name: n9e-template
|
||||
configMap:
|
||||
name: n9e-template
|
||||
- name: n9e-script
|
||||
configMap:
|
||||
name: n9e-script
|
||||
|
||||
@@ -26,6 +26,9 @@ spec:
|
||||
- name: "port"
|
||||
port: {{ template "nightingale.n9e.servicePort" . }}
|
||||
targetPort: {{ template "nightingale.n9e.port" . }}
|
||||
- name: "ibex"
|
||||
port: {{ template "nightingale.n9e.ibexServicePort" . }}
|
||||
targetPort: {{ template "nightingale.n9e.ibexPort" . }}
|
||||
selector:
|
||||
{{ include "nightingale.matchLabels" . | indent 4 }}
|
||||
component: center
|
||||
|
||||
@@ -24,7 +24,7 @@ data:
|
||||
[
|
||||
{
|
||||
"targets": [
|
||||
"n9e: {{ template "nightingale.n9e.servicePort" . }}"
|
||||
"nightingale-center:{{ template "nightingale.n9e.servicePort" . }}"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -40,6 +40,13 @@ spec:
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: fix-permission
|
||||
image: busybox
|
||||
command: ["sh", "-c", "chown -R 65534:65534 /prometheus"]
|
||||
volumeMounts:
|
||||
- name: prometheus-data
|
||||
mountPath: /prometheus
|
||||
containers:
|
||||
- args:
|
||||
- --config.file=/etc/prometheus/prometheus.yml
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# 告警消息模版文件
|
||||
|
||||
模版中可以使用的变量参考`AlertCurEvent`对象
|
||||
模版语法如何使用可以参考[html/template](https://pkg.go.dev/html/template)
|
||||
|
||||
## 如何在告警模版中添加监控详情url
|
||||
|
||||
假设web的地址是http://127.0.0.1:18000/, 实际使用时用web地址替换该地址
|
||||
|
||||
在监控模版中添加以下行:
|
||||
|
||||
* dingtalk / wecom / feishu
|
||||
```markdown
|
||||
[监控详情](http://127.0.0.1:18000/metric/explorer?promql={{ .PromQl | escape }})
|
||||
```
|
||||
|
||||
* mailbody
|
||||
|
||||
```html
|
||||
<tr>
|
||||
<th>监控详情:</th>
|
||||
<td>
|
||||
<a href="http://127.0.0.1:18000/metric/explorer?promql={{ .PromQl | escape }}" target="_blank">点击查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
```
|
||||
@@ -1,11 +0,0 @@
|
||||
#### {{if .IsRecovered}}<font color="#008800">S{{.Severity}} - Recovered - {{.RuleName}}</font>{{else}}<font color="#FF0000">S{{.Severity}} - Triggered - {{.RuleName}}</font>{{end}}
|
||||
|
||||
---
|
||||
|
||||
- **规则标题**: {{.RuleName}}{{if .RuleNote}}
|
||||
- **规则备注**: {{.RuleNote}}{{end}}
|
||||
- **监控指标**: {{.TagsJSON}}
|
||||
- {{if .IsRecovered}}**恢复时间**:{{timeformat .LastEvalTime}}{{else}}**触发时间**: {{timeformat .TriggerTime}}
|
||||
- **触发时值**: {{.TriggerValue}}{{end}}
|
||||
- **发送时间**: {{timestamp}}
|
||||
|
||||
224
tpl/email.tpl
224
tpl/email.tpl
@@ -1,224 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>夜莺告警通知</title>
|
||||
<style type="text/css">
|
||||
.wrapper {
|
||||
background-color: #f8f8f8;
|
||||
padding: 15px;
|
||||
height: 100%;
|
||||
}
|
||||
.main {
|
||||
width: 600px;
|
||||
padding: 30px;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
font-size: 12px;
|
||||
font-family: verdana,'Microsoft YaHei',Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono';
|
||||
}
|
||||
header {
|
||||
border-radius: 2px 2px 0 0;
|
||||
}
|
||||
header .title {
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin: 0;
|
||||
}
|
||||
header .sub-desc {
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
hr {
|
||||
margin: 20px 0;
|
||||
height: 0;
|
||||
border: none;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
em {
|
||||
font-weight: 600;
|
||||
}
|
||||
table {
|
||||
margin: 20px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table tbody tr{
|
||||
font-weight: 200;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.succ {
|
||||
background-color: green;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.fail {
|
||||
background-color: red;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.succ th, .succ td, .fail th, .fail td {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
table tbody tr th {
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.body {
|
||||
margin-top: 24px;
|
||||
}
|
||||
.body-text {
|
||||
color: #666666;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
.body-extra {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
.body-extra.text-right a {
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
}
|
||||
.body-extra.text-right a:hover {
|
||||
color: #666;
|
||||
}
|
||||
.button {
|
||||
width: 200px;
|
||||
height: 50px;
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
border-radius: 2px;
|
||||
background: #2D77EE;
|
||||
line-height: 50px;
|
||||
font-size: 20px;
|
||||
color: #FFFFFF;
|
||||
cursor: pointer;
|
||||
}
|
||||
.button:hover {
|
||||
background: rgb(25, 115, 255);
|
||||
border-color: rgb(25, 115, 255);
|
||||
color: #fff;
|
||||
}
|
||||
footer {
|
||||
margin-top: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
.footer-logo {
|
||||
text-align: right;
|
||||
}
|
||||
.footer-logo-image {
|
||||
width: 108px;
|
||||
height: 27px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.copyright {
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="main">
|
||||
<header>
|
||||
<h3 class="title">{{.RuleName}}</h3>
|
||||
<p class="sub-desc"></p>
|
||||
</header>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="body">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tbody>
|
||||
{{if .IsRecovered}}
|
||||
<tr class="succ">
|
||||
<th>级别状态:</th>
|
||||
<td>S{{.Severity}} Recovered</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr class="fail">
|
||||
<th>级别状态:</th>
|
||||
<td>S{{.Severity}} Triggered</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
||||
<tr>
|
||||
<th>策略备注:</th>
|
||||
<td>{{.RuleNote}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备备注:</th>
|
||||
<td>{{.TargetNote}}</td>
|
||||
</tr>
|
||||
{{if not .IsRecovered}}
|
||||
<tr>
|
||||
<th>触发时值:</th>
|
||||
<td>{{.TriggerValue}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
||||
{{if .TargetIdent}}
|
||||
<tr>
|
||||
<th>监控对象:</th>
|
||||
<td>{{.TargetIdent}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
<tr>
|
||||
<th>监控指标:</th>
|
||||
<td>{{.TagsJSON}}</td>
|
||||
</tr>
|
||||
|
||||
{{if .IsRecovered}}
|
||||
<tr>
|
||||
<th>恢复时间:</th>
|
||||
<td>{{timeformat .LastEvalTime}}</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr>
|
||||
<th>触发时间:</th>
|
||||
<td>
|
||||
{{timeformat .TriggerTime}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
||||
<tr>
|
||||
<th>发送时间:</th>
|
||||
<td>
|
||||
{{timestamp}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>PromQL:</th>
|
||||
<td>
|
||||
{{.PromQl}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
|
||||
<footer>
|
||||
<div class="copyright" style="font-style: italic">
|
||||
我们希望与您一起,将监控这个事情,做到极致!
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +0,0 @@
|
||||
级别状态: S{{.Severity}} {{if .IsRecovered}}Recovered{{else}}Triggered{{end}}
|
||||
规则名称: {{.RuleName}}{{if .RuleNote}}
|
||||
规则备注: {{.RuleNote}}{{end}}
|
||||
监控指标: {{.TagsJSON}}
|
||||
{{if .IsRecovered}}恢复时间:{{timeformat .LastEvalTime}}{{else}}触发时间: {{timeformat .TriggerTime}}
|
||||
触发时值: {{.TriggerValue}}{{end}}
|
||||
发送时间: {{timestamp}}
|
||||
@@ -1 +0,0 @@
|
||||
{{if .IsRecovered}}Recovered{{else}}Triggered{{end}}: {{.RuleName}} {{.TagsJSON}}
|
||||
@@ -1,7 +0,0 @@
|
||||
级别状态: S{{.Severity}} {{if .IsRecovered}}Recovered{{else}}Triggered{{end}}
|
||||
规则名称: {{.RuleName}}{{if .RuleNote}}
|
||||
规则备注: {{.RuleNote}}{{end}}
|
||||
监控指标: {{.TagsJSON}}
|
||||
{{if .IsRecovered}}恢复时间:{{timeformat .LastEvalTime}}{{else}}触发时间: {{timeformat .TriggerTime}}
|
||||
触发时值: {{.TriggerValue}}{{end}}
|
||||
发送时间: {{timestamp}}
|
||||
@@ -1 +0,0 @@
|
||||
{{if .IsRecovered}}Recovered{{else}}Triggered{{end}}: {{.RuleName}} {{.TagsJSON}}
|
||||
@@ -1,7 +0,0 @@
|
||||
**级别状态**: {{if .IsRecovered}}<font color="info">S{{.Severity}} Recovered</font>{{else}}<font color="warning">S{{.Severity}} Triggered</font>{{end}}
|
||||
**规则标题**: {{.RuleName}}{{if .RuleNote}}
|
||||
**规则备注**: {{.RuleNote}}{{end}}
|
||||
**监控指标**: {{.TagsJSON}}
|
||||
{{if .IsRecovered}}**恢复时间**:{{timeformat .LastEvalTime}}{{else}}**触发时间**: {{timeformat .TriggerTime}}
|
||||
**触发时值**: {{.TriggerValue}}{{end}}
|
||||
**发送时间**: {{timestamp}}
|
||||
@@ -1,7 +0,0 @@
|
||||
**级别状态**: {{if .IsRecovered}}<font color="info">S{{.Severity}} Recovered</font>{{else}}<font color="warning">S{{.Severity}} Triggered</font>{{end}}
|
||||
**规则标题**: {{.RuleName}}{{if .RuleNote}}
|
||||
**规则备注**: {{.RuleNote}}{{end}}
|
||||
**监控指标**: {{.TagsJSON}}
|
||||
{{if .IsRecovered}}**恢复时间**:{{timeformat .LastEvalTime}}{{else}}**触发时间**: {{timeformat .TriggerTime}}
|
||||
**触发时值**: {{.TriggerValue}}{{end}}
|
||||
**发送时间**: {{timestamp}}
|
||||
11
values.yaml
11
values.yaml
@@ -161,6 +161,7 @@ redis:
|
||||
external:
|
||||
addr: "192.168.0.2:6379"
|
||||
sentinelMasterSet: ""
|
||||
username: ""
|
||||
password: ""
|
||||
mode: "standalone"
|
||||
podAnnotations: {}
|
||||
@@ -174,7 +175,7 @@ prometheus:
|
||||
automountServiceAccountToken: false
|
||||
image:
|
||||
repository: docker.io/prom/prometheus
|
||||
tag: latest
|
||||
tag: v2.54.1
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
@@ -201,7 +202,7 @@ categraf:
|
||||
## Parm: categraf.internal.docker_socket Desc: the path of docker socket on kubelet node.
|
||||
## "unix:///var/run/docker.sock" is default, if your kubernetes runtime is container or others, empty this variable.
|
||||
## docker_socket: ""
|
||||
docker_socket: unix:///var/run/docker.sock
|
||||
docker_socket: ""
|
||||
external:
|
||||
host: "192.168.0.3"
|
||||
port: "8094"
|
||||
@@ -216,7 +217,7 @@ n9e:
|
||||
automountServiceAccountToken: false
|
||||
image:
|
||||
repository: flashcatcloud/nightingale
|
||||
tag: 6.3.4
|
||||
tag: 8.0.0-beta.11
|
||||
resources: {}
|
||||
# requests:
|
||||
# memory: 512Mi
|
||||
@@ -225,7 +226,11 @@ n9e:
|
||||
tolerations: [ ]
|
||||
affinity: { }
|
||||
priorityClassName:
|
||||
ibexEnable: false
|
||||
ibexPort: "20090"
|
||||
external:
|
||||
host: "192.168.0.4"
|
||||
port: "17000"
|
||||
ibexEnable: false
|
||||
ibexPort: "20090"
|
||||
podAnnotations: { }
|
||||
|
||||
Reference in New Issue
Block a user