Repository navigation
Commit 4da4fa9
authored
fix(import): store SmokePing history under the configured target's id (#137)
`smoked import smokeping --apply` mints a UUID onto every imported target,
but `--history` stored each RRD's rows under the SmokePing path. The hub
resolves a target to its stable id, so the backfilled history never showed
on the target's graph or in /api/series.
`--history` now looks each SmokePing target up by path in the DB config
fragment and, when given, the YAML config passed with `--config`, and
stores its rows under that target's id. A target that matches no
configured target, or more than one (a path defined in both configs), is
named on stderr, counted as unresolved in the summary, and not imported;
the run exits 3 as for other partial failures. With no `--config` and no
targets in the DB config, rows keep their SmokePing path keys (the id of
a YAML target without an explicit id) and the run prints a note.
config.TargetIdentities lists each host node's path and storage id
exactly as Monitors names them, without inheritance or validation, so a
DB fragment can be indexed on its own; Monitors now shares its path and
id helpers.1 parent 1e603e6 commit 4da4fa9
7 files changed
Lines changed: 641 additions & 44 deletions
File tree
- cmd/smoked
- internal/config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
31 | 41 | | |
32 | 42 | | |
33 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
248 | 275 | | |
249 | 276 | | |
250 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| |||
0 commit comments