mirror of
https://github.com/flashcatcloud/n9e-helm.git
synced 2026-03-03 01:18:55 +00:00
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71944c64b4 | ||
|
|
219beae857 | ||
|
|
180552c1cb | ||
|
|
436a216b38 | ||
|
|
005a673cfa | ||
|
|
055ffb3002 | ||
|
|
584a00f668 | ||
|
|
c697ffa2dc | ||
|
|
6e09f7b074 | ||
|
|
b3cc4112db | ||
|
|
67f43473d7 | ||
|
|
36588e5e3d | ||
|
|
93740aa23f | ||
|
|
6872d2e5fe | ||
|
|
fa2abf8f33 | ||
|
|
6ddb9be9a0 | ||
|
|
8fe0978add | ||
|
|
8603f7d667 | ||
|
|
d7bb2eb5ea | ||
|
|
3464091f5b | ||
|
|
5348a4ab1f | ||
|
|
80c36d00d1 | ||
|
|
8b68709276 | ||
|
|
90acdccee9 | ||
|
|
0a14c37633 | ||
|
|
ee40d6f865 | ||
|
|
c0e0d614bc | ||
|
|
6a4bc21e6e | ||
|
|
27cfa3dd62 | ||
|
|
07ee7ed200 | ||
|
|
47bad75a42 | ||
|
|
ca4877f1a2 | ||
|
|
5aa37e029d | ||
|
|
253467398f |
@@ -27,7 +27,7 @@ sources:
|
||||
maintainers:
|
||||
- email: contact-us@flashcat.cloud
|
||||
name: flashcatcloud
|
||||
version: 0.1.2
|
||||
version: 0.1.3
|
||||
apiVersion: v1
|
||||
appVersion: 5.9.4
|
||||
appVersion: 5.9.6
|
||||
icon: https://raw.githubusercontent.com/flashcatcloud/n9e-helm/master/n9e-icon.png
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
232
dashboards/n9e_server.json
Normal file
232
dashboards/n9e_server.json
Normal file
@@ -0,0 +1,232 @@
|
||||
{
|
||||
"name": "夜莺大盘",
|
||||
"tags": "",
|
||||
"configs": {
|
||||
"var": [],
|
||||
"panels": [
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "rate(n9e_server_samples_received_total[1m])"
|
||||
}
|
||||
],
|
||||
"name": "每秒接收的数据点个数",
|
||||
"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": "每秒产生的告警事件个数",
|
||||
"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": "告警事件内存队列长度",
|
||||
"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": "数据接收接口平均响应时间(单位:秒)",
|
||||
"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": "内存数据队列长度",
|
||||
"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": "数据发往TSDB平均耗时(单位:秒)",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,10 @@ insert into `role_operation`(role_name, operation) values('Standard', '/job-tpls
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/job-tasks');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/job-tasks/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/job-tasks/put');
|
||||
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/recording-rules');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/recording-rules/add');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/recording-rules/put');
|
||||
insert into `role_operation`(role_name, operation) values('Standard', '/recording-rules/del');
|
||||
|
||||
-- for alert_rule | collect_rule | mute | dashboard grouping
|
||||
CREATE TABLE `busi_group` (
|
||||
@@ -341,6 +344,25 @@ CREATE TABLE `metric_view` (
|
||||
|
||||
insert into metric_view(name, cate, configs) values('Host View', 0, '{"filters":[{"oper":"=","label":"__name__","value":"cpu_usage_idle"}],"dynamicLabels":[],"dimensionLabels":[{"label":"ident","value":""}]}');
|
||||
|
||||
CREATE TABLE `recording_rule` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`group_id` bigint not null default '0' comment 'group_id',
|
||||
`cluster` varchar(128) not null,
|
||||
`name` varchar(255) not null comment 'new metric name',
|
||||
`note` varchar(255) not null comment 'rule note',
|
||||
`disabled` tinyint(1) not null comment '0:enabled 1:disabled',
|
||||
`prom_ql` varchar(8192) not null comment 'promql',
|
||||
`prom_eval_interval` int not null comment 'evaluate interval',
|
||||
`append_tags` varchar(255) default '' comment 'split by space: service=n9e mod=api',
|
||||
`create_at` bigint default '0',
|
||||
`create_by` varchar(64) default '',
|
||||
`update_at` bigint default '0',
|
||||
`update_by` varchar(64) default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `group_id` (`group_id`),
|
||||
KEY `update_at` (`update_at`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4;
|
||||
|
||||
CREATE TABLE `alert_aggr_view` (
|
||||
`id` bigint unsigned not null auto_increment,
|
||||
`name` varchar(191) not null default '',
|
||||
@@ -380,6 +402,7 @@ CREATE TABLE `alert_cur_event` (
|
||||
`notify_cur_number` int not null default 0 comment '',
|
||||
`target_ident` varchar(191) not null default '' comment 'target ident, also in tags',
|
||||
`target_note` varchar(191) not null default '' comment 'target note',
|
||||
`first_trigger_time` bigint,
|
||||
`trigger_time` bigint not null,
|
||||
`trigger_value` varchar(255) not null,
|
||||
`tags` varchar(1024) not null default '' comment 'merge data_tags rule_tags, split by ,,',
|
||||
@@ -414,6 +437,7 @@ CREATE TABLE `alert_his_event` (
|
||||
`notify_cur_number` int not null default 0 comment '',
|
||||
`target_ident` varchar(191) not null default '' comment 'target ident, also in tags',
|
||||
`target_note` varchar(191) not null default '' comment 'target note',
|
||||
`first_trigger_time` bigint,
|
||||
`trigger_time` bigint not null,
|
||||
`trigger_value` varchar(255) not null,
|
||||
`recover_time` bigint not null default 0,
|
||||
|
||||
@@ -240,6 +240,12 @@ app: "{{ template "nightingale.name" . }}"
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "nightingale.redis.mode" -}}
|
||||
{{- with .Values.redis }}
|
||||
{{- ternary "standalone" .external.mode (eq .type "internal") }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
/*scheme://[redis:password@]host:port[/master_set]*/
|
||||
{{- define "nightingale.redis.url" -}}
|
||||
{{- with .Values.redis }}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#
|
||||
*/}}
|
||||
{{- if eq .Values.categraf.type "internal" -}}
|
||||
{{- $categraf := .Values.persistence.persistentVolumeClaim.telgraf -}}
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
@@ -38,6 +37,10 @@ spec:
|
||||
{{ toYaml .Values.categraf.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
@@ -93,8 +96,10 @@ spec:
|
||||
name: input-net
|
||||
- mountPath: /etc/categraf/conf/input.netstat
|
||||
name: input-netstat
|
||||
{{- if and ( eq .Values.categraf.type "internal") ( .Values.categraf.internal.docker_socket) }}
|
||||
- mountPath: /etc/categraf/conf/input.docker
|
||||
name: input-docker
|
||||
{{- end }}
|
||||
- mountPath: /etc/categraf/conf/input.kubernetes
|
||||
name: input-kubernetes
|
||||
- mountPath: /etc/categraf/conf/input.prometheus
|
||||
@@ -115,8 +120,10 @@ spec:
|
||||
- mountPath: /hostfs
|
||||
name: hostrofs
|
||||
readOnly: true
|
||||
{{- if and ( eq .Values.categraf.type "internal") ( .Values.categraf.internal.docker_socket) }}
|
||||
- name: docker-socket
|
||||
mountPath: {{ trimPrefix "unix://" .Values.categraf.internal.docker_socket }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: categraf-config
|
||||
configMap:
|
||||
@@ -144,9 +151,11 @@ spec:
|
||||
- name: input-netstat
|
||||
configMap:
|
||||
name: input-netstat
|
||||
{{- if and ( eq .Values.categraf.type "internal") ( .Values.categraf.internal.docker_socket) }}
|
||||
- name: input-docker
|
||||
configMap:
|
||||
name: input-docker
|
||||
{{- end }}
|
||||
- name: input-kubernetes
|
||||
configMap:
|
||||
name: input-kubernetes
|
||||
@@ -174,8 +183,10 @@ spec:
|
||||
- name: hostroutmp
|
||||
hostPath:
|
||||
path: /var/run/utmp
|
||||
{{- if and ( eq .Values.categraf.type "internal") ( .Values.categraf.internal.docker_socket) }}
|
||||
- name: docker-socket
|
||||
hostPath:
|
||||
path: {{ trimPrefix "unix://" .Values.categraf.internal.docker_socket }}
|
||||
type: Socket
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#
|
||||
*/}}
|
||||
{{- if eq .Values.categraf.type "internal" -}}
|
||||
{{- if .Values.categraf.internal.docker_socket -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
@@ -22,4 +23,5 @@ metadata:
|
||||
data:
|
||||
{{ (.Files.Glob "categraf/conf/input.docker/*.toml").AsConfig | indent 2 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ spec:
|
||||
- mountPath: /var/lib/mysql/
|
||||
name: database-data
|
||||
- mountPath: /etc/my.cnf
|
||||
subPath: my.cnf
|
||||
name: database-config
|
||||
- mountPath: /docker-entrypoint-initdb.d
|
||||
name: database-initdb-config
|
||||
|
||||
@@ -87,8 +87,9 @@ data:
|
||||
[Redis]
|
||||
Address = "{{ template "nightingale.redis.addr" . }}"
|
||||
Password = "{{ template "nightingale.redis.password" . }}"
|
||||
RedisType = "{{ template "nightingale.redis.mode"}}"
|
||||
[DB]
|
||||
DSN="{{ template "nightingale.database.username" . }}:{{ template "nightingale.database.rawPassword" . }}@tcp({{ template "nightingale.database" . }}:{{ template "nightingale.database.servicePort" . }})/{{ template "nightingale.database.name" . }}?charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true"
|
||||
DSN="{{ template "nightingale.database.username" . }}:{{ template "nightingale.database.rawPassword" . }}@tcp({{ template "nightingale.database.host" . }}:{{ template "nightingale.database.port" . }})/{{ template "nightingale.database.name" . }}?charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true"
|
||||
Debug = false
|
||||
DBType = "mysql"
|
||||
MaxLifetime = 7200
|
||||
@@ -116,8 +117,8 @@ data:
|
||||
Url = "http://{{ template "nightingale.prometheus.host" . }}:{{ template "nightingale.prometheus.servicePort" . }}/api/v1/write"
|
||||
BasicAuthUser = "{{ template "nightingale.prometheus.username" . }}"
|
||||
BasicAuthPass = "{{ template "nightingale.prometheus.rawPassword" . }}"
|
||||
Timeout = 30000
|
||||
DialTimeout = 10000
|
||||
Timeout = 10000
|
||||
DialTimeout = 3000
|
||||
TLSHandshakeTimeout = 30000
|
||||
ExpectContinueTimeout = 1000
|
||||
IdleConnTimeout = 90000
|
||||
|
||||
@@ -38,6 +38,10 @@ spec:
|
||||
{{ toYaml .Values.nserver.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- args:
|
||||
- /app/n9e
|
||||
@@ -62,7 +66,7 @@ spec:
|
||||
name: nserver-template
|
||||
- mountPath: /app/etc/script
|
||||
name: nserver-script
|
||||
hostname: nserver
|
||||
# hostname: nserver
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: nserver-config
|
||||
|
||||
@@ -27,6 +27,8 @@ data:
|
||||
MetricsYamlFile = "/app/etc/metrics.yaml"
|
||||
BuiltinAlertsDir = "/app/etc/alerts"
|
||||
BuiltinDashboardsDir = "/app/etc/dashboards"
|
||||
ClustersFrom = "config"
|
||||
ClustersFromAPIs = []
|
||||
[[NotifyChannels]]
|
||||
Label = "邮箱"
|
||||
Key = "email"
|
||||
@@ -69,6 +71,10 @@ data:
|
||||
AccessExpired = 1500
|
||||
RefreshExpired = 10080
|
||||
RedisKeyPrefix = "/jwt/"
|
||||
[ProxyAuth]
|
||||
Enable = false
|
||||
HeaderUserNameKey = "X-User-Name"
|
||||
DefaultRoles = ["Standard"]
|
||||
[BasicAuth]
|
||||
user001 = "ccc26da7b9aba533cbb263a36c07dcc5"
|
||||
[AnonymousAccess]
|
||||
@@ -105,8 +111,9 @@ data:
|
||||
[Redis]
|
||||
Address = "{{ template "nightingale.redis.addr" . }}"
|
||||
Password = "{{ template "nightingale.redis.password" . }}"
|
||||
RedisType = "{{ template "nightingale.redis.mode" . }}"
|
||||
[DB]
|
||||
DSN = "{{ template "nightingale.database.username" . }}:{{ template "nightingale.database.rawPassword" . }}@tcp({{ template "nightingale.database" . }}:{{ template "nightingale.database.servicePort" . }})/{{ template "nightingale.database.name" . }}?charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true"
|
||||
DSN = "{{ template "nightingale.database.username" . }}:{{ template "nightingale.database.rawPassword" . }}@tcp({{ template "nightingale.database.host" . }}:{{ template "nightingale.database.port" . }})/{{ template "nightingale.database.name" . }}?charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true"
|
||||
Debug = true
|
||||
DBType = "mysql"
|
||||
MaxLifetime = 7200
|
||||
@@ -119,17 +126,15 @@ data:
|
||||
BasicAuthUser = ""
|
||||
BasicAuthPass = ""
|
||||
Timeout = 30000
|
||||
DialTimeout = 10000
|
||||
TLSHandshakeTimeout = 30000
|
||||
ExpectContinueTimeout = 1000
|
||||
IdleConnTimeout = 90000
|
||||
KeepAlive = 30000
|
||||
MaxConnsPerHost = 0
|
||||
MaxIdleConns = 100
|
||||
DialTimeout = 3000
|
||||
MaxIdleConnsPerHost = 100
|
||||
[Ibex]
|
||||
Address = "http://ibex:10090"
|
||||
BasicAuthUser = "ibex"
|
||||
BasicAuthPass = "ibex"
|
||||
Timeout = 3000
|
||||
[TargetMetrics]
|
||||
TargetUp = '''max(max_over_time(target_up{ident=~"(%s)"}[%dm])) by (ident)'''
|
||||
LoadPerCore = '''max(max_over_time(system_load_norm_1{ident=~"(%s)"}[%dm])) by (ident)'''
|
||||
MemUtil = '''100-max(max_over_time(mem_available_percent{ident=~"(%s)"}[%dm])) by (ident)'''
|
||||
{{- end -}}
|
||||
|
||||
@@ -38,6 +38,10 @@ spec:
|
||||
{{ toYaml .Values.nwebapi.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- args:
|
||||
- /app/n9e
|
||||
|
||||
@@ -36,6 +36,10 @@ spec:
|
||||
{{ include "nightingale.labels" . | indent 8 }}
|
||||
component: prometheus
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- args:
|
||||
- --config.file=/etc/prometheus/prometheus.yml
|
||||
|
||||
26
tpl/README.md
Normal file
26
tpl/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# 告警消息模版文件
|
||||
|
||||
模版中可以使用的变量参考`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>
|
||||
```
|
||||
14
values.yaml
14
values.yaml
@@ -162,6 +162,7 @@ redis:
|
||||
addr: "192.168.0.2:6379"
|
||||
sentinelMasterSet: ""
|
||||
password: ""
|
||||
mode: "standalone"
|
||||
podAnnotations: {}
|
||||
|
||||
prometheus:
|
||||
@@ -192,11 +193,14 @@ categraf:
|
||||
automountServiceAccountToken: false
|
||||
image:
|
||||
repository: flashcatcloud/categraf
|
||||
tag: v0.1.12
|
||||
tag: latest
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
priorityClassName:
|
||||
## 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
|
||||
external:
|
||||
host: "192.168.0.3"
|
||||
@@ -211,8 +215,8 @@ nwebapi:
|
||||
serviceAccountName: ""
|
||||
automountServiceAccountToken: false
|
||||
image:
|
||||
repository: docker.io/ulric2019/nightingale
|
||||
tag: 5.9.4
|
||||
repository: flashcatcloud/nightingale
|
||||
tag: 5.10.3
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
@@ -229,8 +233,8 @@ nserver:
|
||||
serviceAccountName: ""
|
||||
automountServiceAccountToken: false
|
||||
image:
|
||||
repository: docker.io/ulric2019/nightingale
|
||||
tag: 5.9.4
|
||||
repository: flashcatcloud/nightingale
|
||||
tag: 5.10.3
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
|
||||
Reference in New Issue
Block a user