Kubernetes_StatefulSets.json 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. {
  2. "__inputs": [],
  3. "__elements": [],
  4. "__requires": [
  5. {
  6. "type": "grafana",
  7. "id": "grafana",
  8. "name": "Grafana",
  9. "version": "8.3.2"
  10. },
  11. {
  12. "type": "panel",
  13. "id": "graph",
  14. "name": "Graph (old)",
  15. "version": ""
  16. },
  17. {
  18. "type": "datasource",
  19. "id": "prometheus",
  20. "name": "Prometheus",
  21. "version": "1.0.0"
  22. },
  23. {
  24. "type": "panel",
  25. "id": "stat",
  26. "name": "Stat",
  27. "version": ""
  28. }
  29. ],
  30. "annotations": {
  31. "list": [
  32. {
  33. "builtIn": 1,
  34. "datasource": "-- Grafana --",
  35. "enable": true,
  36. "hide": true,
  37. "iconColor": "rgba(0, 211, 255, 1)",
  38. "name": "Annotations & Alerts",
  39. "target": {
  40. "limit": 100,
  41. "matchAny": false,
  42. "tags": [],
  43. "type": "dashboard"
  44. },
  45. "type": "dashboard"
  46. }
  47. ]
  48. },
  49. "editable": false,
  50. "fiscalYearStartMonth": 0,
  51. "graphTooltip": 0,
  52. "id": null,
  53. "iteration": 1640160026561,
  54. "links": [],
  55. "liveNow": false,
  56. "panels": [
  57. {
  58. "datasource": {
  59. "uid": "$datasource"
  60. },
  61. "fieldConfig": {
  62. "defaults": {
  63. "color": {
  64. "fixedColor": "rgb(31, 120, 193)",
  65. "mode": "fixed"
  66. },
  67. "mappings": [
  68. {
  69. "options": {
  70. "match": "null",
  71. "result": {
  72. "text": "0"
  73. }
  74. },
  75. "type": "special"
  76. }
  77. ],
  78. "thresholds": {
  79. "mode": "absolute",
  80. "steps": [
  81. {
  82. "color": "green",
  83. "value": null
  84. },
  85. {
  86. "color": "red",
  87. "value": 80
  88. }
  89. ]
  90. },
  91. "unit": "none"
  92. },
  93. "overrides": []
  94. },
  95. "gridPos": {
  96. "h": 7,
  97. "w": 8,
  98. "x": 0,
  99. "y": 0
  100. },
  101. "id": 2,
  102. "links": [],
  103. "maxDataPoints": 100,
  104. "options": {
  105. "colorMode": "none",
  106. "graphMode": "area",
  107. "justifyMode": "auto",
  108. "orientation": "horizontal",
  109. "reduceOptions": {
  110. "calcs": [
  111. "lastNotNull"
  112. ],
  113. "fields": "",
  114. "values": false
  115. },
  116. "textMode": "auto"
  117. },
  118. "pluginVersion": "8.3.2",
  119. "targets": [
  120. {
  121. "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m]))",
  122. "format": "time_series",
  123. "intervalFactor": 2,
  124. "legendFormat": "",
  125. "refId": "A"
  126. }
  127. ],
  128. "title": "CPU",
  129. "type": "stat"
  130. },
  131. {
  132. "datasource": {
  133. "uid": "$datasource"
  134. },
  135. "fieldConfig": {
  136. "defaults": {
  137. "color": {
  138. "fixedColor": "rgb(31, 120, 193)",
  139. "mode": "fixed"
  140. },
  141. "mappings": [
  142. {
  143. "options": {
  144. "match": "null",
  145. "result": {
  146. "text": "0"
  147. }
  148. },
  149. "type": "special"
  150. }
  151. ],
  152. "thresholds": {
  153. "mode": "absolute",
  154. "steps": [
  155. {
  156. "color": "green",
  157. "value": null
  158. },
  159. {
  160. "color": "red",
  161. "value": 80
  162. }
  163. ]
  164. },
  165. "unit": "none"
  166. },
  167. "overrides": []
  168. },
  169. "gridPos": {
  170. "h": 7,
  171. "w": 8,
  172. "x": 8,
  173. "y": 0
  174. },
  175. "id": 3,
  176. "links": [],
  177. "maxDataPoints": 100,
  178. "options": {
  179. "colorMode": "none",
  180. "graphMode": "area",
  181. "justifyMode": "auto",
  182. "orientation": "horizontal",
  183. "reduceOptions": {
  184. "calcs": [
  185. "lastNotNull"
  186. ],
  187. "fields": "",
  188. "values": false
  189. },
  190. "textMode": "auto"
  191. },
  192. "pluginVersion": "8.3.2",
  193. "targets": [
  194. {
  195. "expr": "sum(container_memory_usage_bytes{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}) / 1024^3",
  196. "format": "time_series",
  197. "intervalFactor": 2,
  198. "legendFormat": "",
  199. "refId": "A"
  200. }
  201. ],
  202. "title": "Memory",
  203. "type": "stat"
  204. },
  205. {
  206. "datasource": {
  207. "uid": "$datasource"
  208. },
  209. "fieldConfig": {
  210. "defaults": {
  211. "color": {
  212. "fixedColor": "rgb(31, 120, 193)",
  213. "mode": "fixed"
  214. },
  215. "mappings": [
  216. {
  217. "options": {
  218. "match": "null",
  219. "result": {
  220. "text": "0"
  221. }
  222. },
  223. "type": "special"
  224. }
  225. ],
  226. "thresholds": {
  227. "mode": "absolute",
  228. "steps": [
  229. {
  230. "color": "green",
  231. "value": null
  232. },
  233. {
  234. "color": "red",
  235. "value": 80
  236. }
  237. ]
  238. },
  239. "unit": "none"
  240. },
  241. "overrides": []
  242. },
  243. "gridPos": {
  244. "h": 7,
  245. "w": 8,
  246. "x": 16,
  247. "y": 0
  248. },
  249. "id": 4,
  250. "links": [],
  251. "maxDataPoints": 100,
  252. "options": {
  253. "colorMode": "none",
  254. "graphMode": "area",
  255. "justifyMode": "auto",
  256. "orientation": "horizontal",
  257. "reduceOptions": {
  258. "calcs": [
  259. "lastNotNull"
  260. ],
  261. "fields": "",
  262. "values": false
  263. },
  264. "textMode": "auto"
  265. },
  266. "pluginVersion": "8.3.2",
  267. "targets": [
  268. {
  269. "expr": "sum(rate(container_network_transmit_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\",pod=~\"$statefulset.*\"}[3m]))",
  270. "format": "time_series",
  271. "intervalFactor": 2,
  272. "legendFormat": "",
  273. "refId": "A"
  274. }
  275. ],
  276. "title": "Network",
  277. "type": "stat"
  278. },
  279. {
  280. "datasource": {
  281. "uid": "$datasource"
  282. },
  283. "fieldConfig": {
  284. "defaults": {
  285. "color": {
  286. "mode": "thresholds"
  287. },
  288. "mappings": [
  289. {
  290. "options": {
  291. "match": "null",
  292. "result": {
  293. "text": "0"
  294. }
  295. },
  296. "type": "special"
  297. }
  298. ],
  299. "thresholds": {
  300. "mode": "absolute",
  301. "steps": [
  302. {
  303. "color": "green",
  304. "value": null
  305. },
  306. {
  307. "color": "red",
  308. "value": 80
  309. }
  310. ]
  311. },
  312. "unit": "none"
  313. },
  314. "overrides": []
  315. },
  316. "gridPos": {
  317. "h": 3,
  318. "w": 6,
  319. "x": 0,
  320. "y": 7
  321. },
  322. "id": 5,
  323. "links": [],
  324. "maxDataPoints": 100,
  325. "options": {
  326. "colorMode": "none",
  327. "graphMode": "none",
  328. "justifyMode": "auto",
  329. "orientation": "horizontal",
  330. "reduceOptions": {
  331. "calcs": [
  332. "lastNotNull"
  333. ],
  334. "fields": "",
  335. "values": false
  336. },
  337. "textMode": "auto"
  338. },
  339. "pluginVersion": "8.3.2",
  340. "targets": [
  341. {
  342. "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)",
  343. "format": "time_series",
  344. "intervalFactor": 2,
  345. "legendFormat": "",
  346. "refId": "A"
  347. }
  348. ],
  349. "title": "Desired Replicas",
  350. "type": "stat"
  351. },
  352. {
  353. "datasource": {
  354. "uid": "$datasource"
  355. },
  356. "fieldConfig": {
  357. "defaults": {
  358. "color": {
  359. "mode": "thresholds"
  360. },
  361. "mappings": [
  362. {
  363. "options": {
  364. "match": "null",
  365. "result": {
  366. "text": "0"
  367. }
  368. },
  369. "type": "special"
  370. }
  371. ],
  372. "thresholds": {
  373. "mode": "absolute",
  374. "steps": [
  375. {
  376. "color": "green",
  377. "value": null
  378. },
  379. {
  380. "color": "red",
  381. "value": 80
  382. }
  383. ]
  384. },
  385. "unit": "none"
  386. },
  387. "overrides": []
  388. },
  389. "gridPos": {
  390. "h": 3,
  391. "w": 6,
  392. "x": 6,
  393. "y": 7
  394. },
  395. "id": 6,
  396. "links": [],
  397. "maxDataPoints": 100,
  398. "options": {
  399. "colorMode": "none",
  400. "graphMode": "none",
  401. "justifyMode": "auto",
  402. "orientation": "horizontal",
  403. "reduceOptions": {
  404. "calcs": [
  405. "lastNotNull"
  406. ],
  407. "fields": "",
  408. "values": false
  409. },
  410. "textMode": "auto"
  411. },
  412. "pluginVersion": "8.3.2",
  413. "targets": [
  414. {
  415. "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)",
  416. "format": "time_series",
  417. "intervalFactor": 2,
  418. "legendFormat": "",
  419. "refId": "A"
  420. }
  421. ],
  422. "title": "Replicas of current version",
  423. "type": "stat"
  424. },
  425. {
  426. "datasource": {
  427. "uid": "$datasource"
  428. },
  429. "fieldConfig": {
  430. "defaults": {
  431. "color": {
  432. "mode": "thresholds"
  433. },
  434. "mappings": [
  435. {
  436. "options": {
  437. "match": "null",
  438. "result": {
  439. "text": "0"
  440. }
  441. },
  442. "type": "special"
  443. }
  444. ],
  445. "thresholds": {
  446. "mode": "absolute",
  447. "steps": [
  448. {
  449. "color": "green",
  450. "value": null
  451. },
  452. {
  453. "color": "red",
  454. "value": 80
  455. }
  456. ]
  457. },
  458. "unit": "none"
  459. },
  460. "overrides": []
  461. },
  462. "gridPos": {
  463. "h": 3,
  464. "w": 6,
  465. "x": 12,
  466. "y": 7
  467. },
  468. "id": 7,
  469. "links": [],
  470. "maxDataPoints": 100,
  471. "options": {
  472. "colorMode": "none",
  473. "graphMode": "none",
  474. "justifyMode": "auto",
  475. "orientation": "horizontal",
  476. "reduceOptions": {
  477. "calcs": [
  478. "lastNotNull"
  479. ],
  480. "fields": "",
  481. "values": false
  482. },
  483. "textMode": "auto"
  484. },
  485. "pluginVersion": "8.3.2",
  486. "targets": [
  487. {
  488. "expr": "max(kube_statefulset_status_observed_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)",
  489. "format": "time_series",
  490. "intervalFactor": 2,
  491. "legendFormat": "",
  492. "refId": "A"
  493. }
  494. ],
  495. "title": "Observed Generation",
  496. "type": "stat"
  497. },
  498. {
  499. "datasource": {
  500. "uid": "$datasource"
  501. },
  502. "fieldConfig": {
  503. "defaults": {
  504. "color": {
  505. "mode": "thresholds"
  506. },
  507. "mappings": [
  508. {
  509. "options": {
  510. "match": "null",
  511. "result": {
  512. "text": "0"
  513. }
  514. },
  515. "type": "special"
  516. }
  517. ],
  518. "thresholds": {
  519. "mode": "absolute",
  520. "steps": [
  521. {
  522. "color": "green",
  523. "value": null
  524. },
  525. {
  526. "color": "red",
  527. "value": 80
  528. }
  529. ]
  530. },
  531. "unit": "none"
  532. },
  533. "overrides": []
  534. },
  535. "gridPos": {
  536. "h": 3,
  537. "w": 6,
  538. "x": 18,
  539. "y": 7
  540. },
  541. "id": 8,
  542. "links": [],
  543. "maxDataPoints": 100,
  544. "options": {
  545. "colorMode": "none",
  546. "graphMode": "none",
  547. "justifyMode": "auto",
  548. "orientation": "horizontal",
  549. "reduceOptions": {
  550. "calcs": [
  551. "lastNotNull"
  552. ],
  553. "fields": "",
  554. "values": false
  555. },
  556. "textMode": "auto"
  557. },
  558. "pluginVersion": "8.3.2",
  559. "targets": [
  560. {
  561. "expr": "max(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)",
  562. "format": "time_series",
  563. "intervalFactor": 2,
  564. "legendFormat": "",
  565. "refId": "A"
  566. }
  567. ],
  568. "title": "Metadata Generation",
  569. "type": "stat"
  570. },
  571. {
  572. "aliasColors": {},
  573. "bars": false,
  574. "dashLength": 10,
  575. "dashes": false,
  576. "datasource": {
  577. "uid": "$datasource"
  578. },
  579. "fill": 1,
  580. "fillGradient": 0,
  581. "gridPos": {
  582. "h": 7,
  583. "w": 8,
  584. "x": 0,
  585. "y": 10
  586. },
  587. "hiddenSeries": false,
  588. "id": 9,
  589. "legend": {
  590. "alignAsTable": false,
  591. "avg": false,
  592. "current": false,
  593. "max": false,
  594. "min": false,
  595. "rightSide": false,
  596. "show": true,
  597. "total": false,
  598. "values": false
  599. },
  600. "lines": true,
  601. "linewidth": 1,
  602. "links": [],
  603. "nullPointMode": "null",
  604. "options": {
  605. "alertThreshold": true
  606. },
  607. "percentage": false,
  608. "pluginVersion": "8.3.2",
  609. "pointradius": 5,
  610. "points": false,
  611. "renderer": "flot",
  612. "seriesOverrides": [],
  613. "spaceLength": 10,
  614. "stack": false,
  615. "steppedLine": false,
  616. "targets": [
  617. {
  618. "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)",
  619. "format": "time_series",
  620. "intervalFactor": 2,
  621. "legendFormat": "replicas specified",
  622. "refId": "A"
  623. },
  624. {
  625. "expr": "max(kube_statefulset_status_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)",
  626. "format": "time_series",
  627. "intervalFactor": 2,
  628. "legendFormat": "replicas created",
  629. "refId": "B"
  630. },
  631. {
  632. "expr": "min(kube_statefulset_status_replicas_ready{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)",
  633. "format": "time_series",
  634. "intervalFactor": 2,
  635. "legendFormat": "ready",
  636. "refId": "C"
  637. },
  638. {
  639. "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)",
  640. "format": "time_series",
  641. "intervalFactor": 2,
  642. "legendFormat": "replicas of current version",
  643. "refId": "D"
  644. },
  645. {
  646. "expr": "min(kube_statefulset_status_replicas_updated{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)",
  647. "format": "time_series",
  648. "intervalFactor": 2,
  649. "legendFormat": "updated",
  650. "refId": "E"
  651. }
  652. ],
  653. "thresholds": [],
  654. "timeRegions": [],
  655. "title": "Replicas",
  656. "tooltip": {
  657. "shared": false,
  658. "sort": 0,
  659. "value_type": "individual"
  660. },
  661. "type": "graph",
  662. "xaxis": {
  663. "mode": "time",
  664. "show": true,
  665. "values": []
  666. },
  667. "yaxes": [
  668. {
  669. "format": "short",
  670. "logBase": 1,
  671. "show": true
  672. },
  673. {
  674. "format": "short",
  675. "logBase": 1,
  676. "show": true
  677. }
  678. ],
  679. "yaxis": {
  680. "align": false
  681. }
  682. }
  683. ],
  684. "refresh": "",
  685. "schemaVersion": 33,
  686. "style": "dark",
  687. "tags": [
  688. "kubernetes-mixin"
  689. ],
  690. "templating": {
  691. "list": [
  692. {
  693. "current": {
  694. "selected": false,
  695. "text": "default",
  696. "value": "default"
  697. },
  698. "hide": 0,
  699. "includeAll": false,
  700. "multi": false,
  701. "name": "datasource",
  702. "options": [],
  703. "query": "prometheus",
  704. "refresh": 1,
  705. "regex": "",
  706. "skipUrlSync": false,
  707. "type": "datasource"
  708. },
  709. {
  710. "current": {},
  711. "datasource": {
  712. "uid": "$datasource"
  713. },
  714. "definition": "",
  715. "hide": 2,
  716. "includeAll": false,
  717. "label": "cluster",
  718. "multi": false,
  719. "name": "cluster",
  720. "options": [],
  721. "query": {
  722. "query": "label_values(kube_statefulset_metadata_generation, cluster)",
  723. "refId": "Prometheus-cluster-Variable-Query"
  724. },
  725. "refresh": 2,
  726. "regex": "",
  727. "skipUrlSync": false,
  728. "sort": 1,
  729. "tagValuesQuery": "",
  730. "tagsQuery": "",
  731. "type": "query",
  732. "useTags": false
  733. },
  734. {
  735. "current": {},
  736. "datasource": {
  737. "uid": "$datasource"
  738. },
  739. "definition": "",
  740. "hide": 0,
  741. "includeAll": false,
  742. "label": "Namespace",
  743. "multi": false,
  744. "name": "namespace",
  745. "options": [],
  746. "query": {
  747. "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)",
  748. "refId": "Prometheus-namespace-Variable-Query"
  749. },
  750. "refresh": 2,
  751. "regex": "",
  752. "skipUrlSync": false,
  753. "sort": 1,
  754. "tagValuesQuery": "",
  755. "tagsQuery": "",
  756. "type": "query",
  757. "useTags": false
  758. },
  759. {
  760. "current": {},
  761. "datasource": {
  762. "uid": "$datasource"
  763. },
  764. "definition": "",
  765. "hide": 0,
  766. "includeAll": false,
  767. "label": "Name",
  768. "multi": false,
  769. "name": "statefulset",
  770. "options": [],
  771. "query": {
  772. "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\"}, statefulset)",
  773. "refId": "Prometheus-statefulset-Variable-Query"
  774. },
  775. "refresh": 2,
  776. "regex": "",
  777. "skipUrlSync": false,
  778. "sort": 1,
  779. "tagValuesQuery": "",
  780. "tagsQuery": "",
  781. "type": "query",
  782. "useTags": false
  783. }
  784. ]
  785. },
  786. "time": {
  787. "from": "now-1h",
  788. "to": "now"
  789. },
  790. "timepicker": {
  791. "refresh_intervals": [
  792. "5s",
  793. "10s",
  794. "30s",
  795. "1m",
  796. "5m",
  797. "15m",
  798. "30m",
  799. "1h",
  800. "2h",
  801. "1d"
  802. ],
  803. "time_options": [
  804. "5m",
  805. "15m",
  806. "1h",
  807. "6h",
  808. "12h",
  809. "24h",
  810. "2d",
  811. "7d",
  812. "30d"
  813. ]
  814. },
  815. "timezone": "UTC",
  816. "title": "Kubernetes / StatefulSets",
  817. "uid": "a31c1f46e6f727cb37c0d731a7245005",
  818. "version": 1,
  819. "weekStart": ""
  820. }