add some doc

This commit is contained in:
Ulric Qin 2022-06-13 15:58:26 +08:00
parent 30cc8caaba
commit 3716ef612e
6 changed files with 187 additions and 7 deletions

View File

@ -1,11 +1,11 @@
# # collect interval # # collect interval
# interval = 15 # interval = 15
[[instances]] # [[instances]]
targets = [ # targets = [
"http://localhost", # "http://localhost",
"https://www.baidu.com" # "https://www.baidu.com"
] # ]
# # append some labels for series # # append some labels for series
# labels = { region="cloud", product="n9e" } # labels = { region="cloud", product="n9e" }

View File

@ -1,4 +1,8 @@
### code meanings # http_response
HTTP 探测插件,用于检测 HTTP 地址的连通性、延迟、HTTPS证书过期时间
## code meanings
``` ```
Success = 0 Success = 0
@ -8,4 +12,37 @@ DNSError = 3
AddressError = 4 AddressError = 4
BodyMismatch = 5 BodyMismatch = 5
CodeMismatch = 6 CodeMismatch = 6
``` ```
## Configuration
最核心的配置就是 targets 配置,配置目标地址,比如想要监控两个地址:
```toml
[[instances]]
targets = [
"http://localhost:8080",
"https://www.baidu.com"
]
```
instances 下面的所有 targets 共享同一个 `[[instances]]` 下面的配置比如超时时间HTTP方法等如果有些配置不同可以拆成多个不同的 `[[instances]]`,比如:
```toml
[[instances]]
targets = [
"http://localhost:8080",
"https://www.baidu.com"
]
method = "GET"
[[instances]]
targets = [
"http://localhost:9090"
]
method = "POST"
```
## 监控大盘和告警规则
该 README 的同级目录下,提供了 dashboard.json 就是监控大盘的配置alerts.json 是告警规则,可以导入夜莺使用。

7
inputs/kernel/README.md Normal file
View File

@ -0,0 +1,7 @@
# kernel
采集本机的内核信息,比如 OS 启动时间,上下文切换的次数等
## 监控大盘
该插件没有单独的监控大盘OS 的监控大盘统一放到 system 下面了

View File

@ -0,0 +1,126 @@
# kernel_vmstat
该监控插件采集的是 `/proc/vmstat` 的指标数据,需要较高版本的 kernel`/proc/vmstat`内容较多,配置文件中给了一个白名单的配置,大家按需启用,只有启用了才会采集。
```ini
[white_list]
oom_kill = 1
nr_free_pages = 0
nr_alloc_batch = 0
nr_inactive_anon = 0
nr_active_anon = 0
nr_inactive_file = 0
nr_active_file = 0
nr_unevictable = 0
nr_mlock = 0
nr_anon_pages = 0
nr_mapped = 0
nr_file_pages = 0
nr_dirty = 0
nr_writeback = 0
nr_slab_reclaimable = 0
nr_slab_unreclaimable = 0
nr_page_table_pages = 0
nr_kernel_stack = 0
nr_unstable = 0
nr_bounce = 0
nr_vmscan_write = 0
nr_vmscan_immediate_reclaim = 0
nr_writeback_temp = 0
nr_isolated_anon = 0
nr_isolated_file = 0
nr_shmem = 0
nr_dirtied = 0
nr_written = 0
numa_hit = 0
numa_miss = 0
numa_foreign = 0
numa_interleave = 0
numa_local = 0
numa_other = 0
workingset_refault = 0
workingset_activate = 0
workingset_nodereclaim = 0
nr_anon_transparent_hugepages = 0
nr_free_cma = 0
nr_dirty_threshold = 0
nr_dirty_background_threshold = 0
pgpgin = 0
pgpgout = 0
pswpin = 0
pswpout = 0
pgalloc_dma = 0
pgalloc_dma32 = 0
pgalloc_normal = 0
pgalloc_movable = 0
pgfree = 0
pgactivate = 0
pgdeactivate = 0
pgfault = 0
pgmajfault = 0
pglazyfreed = 0
pgrefill_dma = 0
pgrefill_dma32 = 0
pgrefill_normal = 0
pgrefill_movable = 0
pgsteal_kswapd_dma = 0
pgsteal_kswapd_dma32 = 0
pgsteal_kswapd_normal = 0
pgsteal_kswapd_movable = 0
pgsteal_direct_dma = 0
pgsteal_direct_dma32 = 0
pgsteal_direct_normal = 0
pgsteal_direct_movable = 0
pgscan_kswapd_dma = 0
pgscan_kswapd_dma32 = 0
pgscan_kswapd_normal = 0
pgscan_kswapd_movable = 0
pgscan_direct_dma = 0
pgscan_direct_dma32 = 0
pgscan_direct_normal = 0
pgscan_direct_movable = 0
pgscan_direct_throttle = 0
zone_reclaim_failed = 0
pginodesteal = 0
slabs_scanned = 0
kswapd_inodesteal = 0
kswapd_low_wmark_hit_quickly = 0
kswapd_high_wmark_hit_quickly = 0
pageoutrun = 0
allocstall = 0
pgrotated = 0
drop_pagecache = 0
drop_slab = 0
numa_pte_updates = 0
numa_huge_pte_updates = 0
numa_hint_faults = 0
numa_hint_faults_local = 0
numa_pages_migrated = 0
pgmigrate_success = 0
pgmigrate_fail = 0
compact_migrate_scanned = 0
compact_free_scanned = 0
compact_isolated = 0
compact_stall = 0
compact_fail = 0
compact_success = 0
htlb_buddy_alloc_success = 0
htlb_buddy_alloc_fail = 0
unevictable_pgs_culled = 0
unevictable_pgs_scanned = 0
unevictable_pgs_rescued = 0
unevictable_pgs_mlocked = 0
unevictable_pgs_munlocked = 0
unevictable_pgs_cleared = 0
unevictable_pgs_stranded = 0
thp_fault_alloc = 0
thp_fault_fallback = 0
thp_collapse_alloc = 0
thp_collapse_alloc_failed = 0
thp_split = 0
thp_zero_page_alloc = 0
thp_zero_page_alloc_failed = 0
balloon_inflate = 0
balloon_deflate = 0
balloon_migrate = 0
```

View File

@ -0,0 +1,3 @@
# linux_sysctl_fs
采集一些 /proc/sys/fs 下的内容

7
inputs/mem/README.md Normal file
View File

@ -0,0 +1,7 @@
# mem
内存采集插件,维持默认配置即可。
## 监控大盘
该插件没有单独的监控大盘OS 的监控大盘统一放到 system 下面了